diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-11-07 04:03:17 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-11-17 02:25:02 +0300 |
commit | 6bf2f87915970160ded16c310e2e8887deff97a2 (patch) | |
tree | 4b2c026f4a838ee161c3d771dc437a2f927c1fe2 /fs/xfs/scrub | |
parent | 0a713bd41ea2b19904232b9c5278012c4361bc04 (diff) | |
download | linux-6bf2f87915970160ded16c310e2e8887deff97a2.tar.xz |
xfs: don't retry repairs harder when EAGAIN is returned
Repair functions will not return EAGAIN -- if they were not able to
obtain resources, they should return EDEADLOCK (like the rest of online
fsck) to signal that we need to grab all the resources and try again.
Hence we don't need to deal with this case except as a debugging
assertion.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/repair.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index 22335619c84e..7323bd9fddfb 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -61,7 +61,6 @@ xrep_attempt( sc->flags |= XREP_ALREADY_FIXED; return -EAGAIN; case -EDEADLOCK: - case -EAGAIN: /* Tell the caller to try again having grabbed all the locks. */ if (!(sc->flags & XCHK_TRY_HARDER)) { sc->flags |= XCHK_TRY_HARDER; @@ -74,6 +73,11 @@ xrep_attempt( */ return -EFSCORRUPTED; default: + /* + * EAGAIN tells the caller to re-scrub, so we cannot return + * that here. + */ + ASSERT(error != -EAGAIN); return error; } } |