summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/repair.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-18 11:18:51 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-14 14:16:26 -0700
commitddddae6e35f0c8582e8835706cfd7aabb49d6a07 (patch)
treea44895a58db90df3f0e5ebab2abffc858733c730 /fs/xfs/scrub/repair.c
parentd3a8f9c3bf5db0adb8128312c90dbfbaad0b34f0 (diff)
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>
Diffstat (limited to 'fs/xfs/scrub/repair.c')
-rw-r--r--fs/xfs/scrub/repair.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c
index 92c661b98892..f6c4cb013346 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;
@@ -73,6 +72,10 @@ xrep_attempt(
* so report back to userspace.
*/
return -EFSCORRUPTED;
+ case -EAGAIN:
+ /* Repair functions should return EDEADLOCK, not EAGAIN. */
+ ASSERT(0);
+ fallthrough;
default:
return error;
}