diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-07-02 18:39:38 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-07-02 18:40:05 +0200 |
commit | 5bb46e3e180d28c7ee6715f47c344be366a3fcc8 (patch) | |
tree | 77742ba38d13667139519c36bc92662017c724fa /fs/xfs/libxfs/xfs_shared.h | |
parent | xfs: remove XFS_TRANS_NOFS (diff) | |
download | linux-5bb46e3e180d28c7ee6715f47c344be366a3fcc8.tar.xz linux-5bb46e3e180d28c7ee6715f47c344be366a3fcc8.zip |
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_shared.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_shared.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_shared.h b/fs/xfs/libxfs/xfs_shared.h index c45acbd3add9..e0641b7337b3 100644 --- a/fs/xfs/libxfs/xfs_shared.h +++ b/fs/xfs/libxfs/xfs_shared.h @@ -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__ */ |