From b8e62724da7b32d04e10d5ec23ef8a480cb9d61e Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 6 Nov 2019 17:30:36 -0500 Subject: [PATCH] xfs_scrub: remove XFS_ITERATE_INODES_ABORT from inode iterator Remove the _ABORT code since nobody uses it and we're slowly moving to ECANCELED anyway. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- scrub/inodes.c | 2 +- scrub/inodes.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scrub/inodes.c b/scrub/inodes.c index a2aa63845..7b3284db6 100644 --- a/scrub/inodes.c +++ b/scrub/inodes.c @@ -187,7 +187,7 @@ scan_ag_inodes( _("Changed too many times during scan; giving up.")); break; } - case XFS_ITERATE_INODES_ABORT: + case ECANCELED: error = 0; /* fall thru */ default: diff --git a/scrub/inodes.h b/scrub/inodes.h index 3affaa003..f03180458 100644 --- a/scrub/inodes.h +++ b/scrub/inodes.h @@ -10,12 +10,13 @@ * Visit each space mapping of an inode fork. Return 0 to continue iteration * or a positive error code to interrupt iteraton. If ESTALE is returned, * iteration will be restarted from the beginning of the inode allocation - * group. Any other non zero value will stop iteration. + * group. Any other non zero value will stop iteration. The special return + * value ECANCELED can be used to stop iteration, because the inode iteration + * function never generates that error code on its own. */ typedef int (*scrub_inode_iter_fn)(struct scrub_ctx *ctx, struct xfs_handle *handle, struct xfs_bulkstat *bs, void *arg); -#define XFS_ITERATE_INODES_ABORT (-1) int scrub_scan_all_inodes(struct scrub_ctx *ctx, scrub_inode_iter_fn fn, void *arg); -- 2.39.2