aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-11-06 17:30:36 -0500
committerEric Sandeen <sandeen@sandeen.net>2019-11-06 17:30:36 -0500
commitb8e62724da7b32d04e10d5ec23ef8a480cb9d61e (patch)
tree02a5a43f3ca364c0f8b2a9d2f936ad5ff5c20d35
parent35b65bcfff84ea7fed36dd5f7fec906d595103c1 (diff)
downloadxfsprogs-dev-b8e62724da7b32d04e10d5ec23ef8a480cb9d61e.tar.gz
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 <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--scrub/inodes.c2
-rw-r--r--scrub/inodes.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/scrub/inodes.c b/scrub/inodes.c
index a2aa63845e..7b3284db6b 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 3affaa0032..f03180458a 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);