diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:05:44 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-14 14:16:26 -0700 |
commit | 68a312deb494321b85c6a468ac2fb7db7d7e8b93 (patch) | |
tree | 44cb362cc2f351255ba0f13ed012d115c81eb206 | |
parent | ddddae6e35f0c8582e8835706cfd7aabb49d6a07 (diff) |
xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbedscrub-fix-return-value_2022-10-14
If we tried to repair something but the repair failed with -EDEADLOCK or
-EAGAIN, that means that the repair function couldn't grab some resource
it needed and wants us to try again. If we try again (with TRY_HARDER)
but still can't do it, exit back to userspace, since xfs_scrub_metadata
requires xrep_attempt to return -EAGAIN.
This makes the return value diagnostics look less weird, and fixes a
wart that remains from very early in the repair implementation.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-rw-r--r-- | fs/xfs/scrub/repair.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index f6c4cb013346..34fc0dc5f200 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -69,9 +69,9 @@ xrep_attempt( /* * We tried harder but still couldn't grab all the resources * we needed to fix it. The corruption has not been fixed, - * so report back to userspace. + * so exit to userspace. */ - return -EFSCORRUPTED; + return 0; case -EAGAIN: /* Repair functions should return EDEADLOCK, not EAGAIN. */ ASSERT(0); |