xfs: create iterator error codes

Currently, xfs doesn't have generic error codes defined for "stop
iterating"; we just reuse the XFS_BTREE_QUERY_* return values.  This
looks a little weird if we're not actually iterating a btree index.
Before we start adding more iterators, we should create general
XFS_ITER_{CONTINUE,ABORT} return values and define the XFS_BTREE_QUERY_*
ones from that.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
Darrick J. Wong 2019-07-02 09:39:38 -07:00
parent 73d30d4874
commit 5bb46e3e18
6 changed files with 14 additions and 8 deletions

View file

@ -177,4 +177,10 @@ struct xfs_ino_geometry {
unsigned int agino_log; /* #bits for agino in inum */
};
/* Keep iterating the data structure. */
#define XFS_ITER_CONTINUE (0)
/* Stop iterating the data structure. */
#define XFS_ITER_ABORT (1)
#endif /* __XFS_SHARED_H__ */