Whamcloud - gitweb
e2fsck: fix kernel compat functions to use kernel error return conventions
authorTheodore Ts'o <tytso@mit.edu>
Wed, 4 Jul 2018 04:18:30 +0000 (00:18 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Jul 2018 04:18:30 +0000 (00:18 -0400)
commitd8cbb80348aac26c007f6d13eb879e080c9b01f4
treef9ef8902940bf5b0aa6345fd42610b061ca01d6e
parent6e2863e445044758518fc4c5276128610da4d203
e2fsck: fix kernel compat functions to use kernel error return conventions

Fix journal_bmap() and sync_blockdev() to use the kernel error
convetions (e.g., -EIO instead of EIO) since they are called by
reovery.c, which is shared userspace / kernel code.

Without this, e2fsck might print an error message like this:

/sbin/e2fsck: Unknown code ____ 251 while recovering journal of /dev/mapper/thin-vol

instead of what it should have printed which was this:

/sbin/e2fsck: Input/output error while recovering journal of /dev/mapper/thin-vol

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/journal.c