summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/nlinks.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-14 11:06:20 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-14 14:16:43 -0700
commite00e3099a6c5adc6d334e14424e9d936f4b9c3c3 (patch)
treef172389011466a73e55f57c8f71a0b48727f54d0 /fs/xfs/scrub/nlinks.c
parent11a7ac8ab58347241fb9d1172d234328b766fa21 (diff)
xfs: teach repair to fix file nlinksscrub-nlinks_2022-10-14
Fix the nlinks now too. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/nlinks.c')
-rw-r--r--fs/xfs/scrub/nlinks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/scrub/nlinks.c b/fs/xfs/scrub/nlinks.c
index 9b15687386d8..2d75095a365a 100644
--- a/fs/xfs/scrub/nlinks.c
+++ b/fs/xfs/scrub/nlinks.c
@@ -60,7 +60,9 @@ xchk_setup_nlinks(
* set the INCOMPLETE flag even when a negative errno is returned. This care
* must be taken with certain errno values (i.e. EFSBADCRC, EFSCORRUPTED,
* ECANCELED) that are absorbed into a scrub state flag update by
- * xchk_*_process_error.
+ * xchk_*_process_error. Scrub and repair share the same incore data
+ * structures, so the INCOMPLETE flag is critical to prevent a repair based on
+ * insufficient information.
*
* Because we are scanning a live filesystem, it's possible that another thread
* will try to update the link counts for an inode that we've already scanned.