mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: remove all *_ITER_ABORT values
Use -ECANCELED to signal "stop iterating" instead of these magical *_ITER_ABORT values, since it's duplicative. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
7f313eda8f
commit
e7ee96dfb8
15 changed files with 54 additions and 44 deletions
|
@ -18,9 +18,6 @@ struct xfs_ibulk {
|
|||
/* Only iterate within the same AG as startino */
|
||||
#define XFS_IBULK_SAME_AG (XFS_IWALK_SAME_AG)
|
||||
|
||||
/* Return value that means we want to abort the walk. */
|
||||
#define XFS_IBULK_ABORT (XFS_IWALK_ABORT)
|
||||
|
||||
/*
|
||||
* Advance the user buffer pointer by one record of the given size. If the
|
||||
* buffer is now full, return the appropriate error code.
|
||||
|
@ -34,13 +31,21 @@ xfs_ibulk_advance(
|
|||
|
||||
breq->ubuffer = b + bytes;
|
||||
breq->ocount++;
|
||||
return breq->ocount == breq->icount ? XFS_IBULK_ABORT : 0;
|
||||
return breq->ocount == breq->icount ? -ECANCELED : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return stat information in bulk (by-inode) for the filesystem.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Return codes for the formatter function are 0 to continue iterating, and
|
||||
* non-zero to stop iterating. Any non-zero value will be passed up to the
|
||||
* bulkstat/inumbers caller. The special value -ECANCELED can be used to stop
|
||||
* iteration, as neither bulkstat nor inumbers will ever generate that error
|
||||
* code on their own.
|
||||
*/
|
||||
|
||||
typedef int (*bulkstat_one_fmt_pf)(struct xfs_ibulk *breq,
|
||||
const struct xfs_bulkstat *bstat);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue