]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_scrub: remove XFS_ITERATE_INODES_ABORT from inode iterator
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 6 Nov 2019 22:30:36 +0000 (17:30 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 6 Nov 2019 22:30:36 +0000 (17:30 -0500)
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>
scrub/inodes.c
scrub/inodes.h

index a2aa63845e15e5a8adad7b51d1bbf485e74916f5..7b3284db6b28a20e9ce21037e9ad38d9c83f3460 100644 (file)
@@ -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:
index 3affaa0032e95c1b64280c6cfeab686d62415b06..f03180458ab924b6e53f03d061190e96e60b51ee 100644 (file)
  * 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);