From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] xfs: remove all *_ITER_ABORT values
Date: Thu, 29 Aug 2019 15:13:29 -0700 [thread overview]
Message-ID: <20190829221329.GD5360@magnolia> (raw)
In-Reply-To: <20190829220045.GV1119@dread.disaster.area>
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@oracle.com>
> >
> > 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>
>
> 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@fromorbit.com
next prev parent reply other threads:[~2019-08-29 22:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 16:21 [PATCH 0/2] xfs: get rid of _ITER_{ABORT,CONTINUE} Darrick J. Wong
2019-08-29 16:22 ` [PATCH 1/2] xfs: remove all *_ITER_ABORT values Darrick J. Wong
2019-08-29 22:00 ` Dave Chinner
2019-08-29 22:13 ` Darrick J. Wong [this message]
2019-08-29 16:23 ` [PATCH 2/2] xfs: remove all *_ITER_CONTINUE values Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2019-08-30 0:25 [PATCH v2 0/2] xfs: get rid of _ITER_{ABORT,CONTINUE} Darrick J. Wong
2019-08-30 0:30 ` [PATCH 1/2] xfs: remove all *_ITER_ABORT values Darrick J. Wong
2019-08-30 0:41 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190829221329.GD5360@magnolia \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox