On Fri, Aug 30, 2019 at 08:00:45AM +1000, Dave Chinner wrote: > On Thu, Aug 29, 2019 at 09:22:29AM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > > > 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@xxxxxxxxxx> > > Looks fine to me. One nit: > > > diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h > > index fa3cd8ab9aba..0099053d2a18 100644 > > --- a/fs/xfs/libxfs/xfs_btree.h > > +++ b/fs/xfs/libxfs/xfs_btree.h > > @@ -466,7 +466,6 @@ unsigned long long xfs_btree_calc_size(uint *limits, unsigned long long len); > > > > /* return codes */ > > #define XFS_BTREE_QUERY_RANGE_CONTINUE (XFS_ITER_CONTINUE) /* keep iterating */ > > -#define XFS_BTREE_QUERY_RANGE_ABORT (XFS_ITER_ABORT) /* stop iterating */ > > typedef int (*xfs_btree_query_range_fn)(struct xfs_btree_cur *cur, > > union xfs_btree_rec *rec, void *priv); > > Can you add an explicit comment to describe the iteration return > values here so that a reader will know what behaviour to expect > from the query range functions... > > I'd suggest the same thing for each of the iteration functions > that we're removing the special defines from if they don't already > have them. > > Same for the next patch, which also looks fine apart from > describing the "return 0 means continue" comments. Ok will do. --D > Cheers, > > Dave. > -- > Dave Chinner > david@xxxxxxxxxxxxx