]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
fuse2fs: don't record every errno in the superblock as an fs failure
authorDarrick J. Wong <djwong@kernel.org>
Fri, 25 Jul 2025 15:56:10 +0000 (08:56 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 31 Jul 2025 14:46:02 +0000 (10:46 -0400)
commitbed461d69f4c14b35f86ff25bad220ba3c5d500e
tree6208250b9f7dd1b5d23bbb285fdc179a9df75c3b
parentf79abd8554e600eacc2a7c864a8332b670c9e262
fuse2fs: don't record every errno in the superblock as an fs failure

fstests just blew up because somewhere in the fuse iomap code we
returned an ESTALE, which was then passed to translate_error.  That
function decided it was a Serious Error and wrote it to the superblock,
so every subsequent mount attempt failed.

I should go figure out why the iomap cache upsert operation returned
ESTALE, but that's not a sign that the *ondisk* filesystem is corrupt.
Prior to commit 71f046a788adba we wouldn't have written that to the
superblock either.

Fix this by isolating the handful of errno that usually mean corruption
problems in filesystems and writing those to the superblock; the other
errno are merely operational errors that can be passed back to the
kernel and up to userspace.

I'm not sure why e2fsck doesn't flag when s_error_count > 0.  That might
be an error on its own.

Cc: linux-ext4@vger.kernel.org # v1.47.3
Fixes: 71f046a788adba ("fuse2fs: correctly handle system errno values in __translate_error()")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20250725155610.GP2672022@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c