From: Johannes Thumshirn <jthumshirn@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>,
Hannes Reinecke <hare@suse.de>, Ming Lei <ming.lei@redhat.com>,
Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Qu Wenruo <quwenruo.btrfs@gmx.com>,
linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Omar Sandoval <osandov@fb.com>
Subject: Re: [PATCH] block: don't use for-inside-for in bio_for_each_segment_all
Date: Tue, 9 Apr 2019 12:25:58 +0200 [thread overview]
Message-ID: <20190409102558.GC5099@linux-x5ow.site> (raw)
In-Reply-To: <20190409094839.GA6827@lst.de>
On Tue, Apr 09, 2019 at 11:48:39AM +0200, Christoph Hellwig wrote:
> On Mon, Apr 08, 2019 at 07:12:04AM -0700, Matthew Wilcox wrote:
> > On Mon, Apr 08, 2019 at 08:07:55AM +0200, Hannes Reinecke wrote:
> > > Oh yes, please do.
> > > The macros are fast becoming unparseable :-)
> >
> > I think something that would help is removing the mandatory 'i' parameter
> > to this iterator. Most of the users don't use it, and the ones that do
> > can implement it themselves. eg:
>
> Yeah, I quickly hacked this up during a meeting yesterday and we have
> exactly two users of the iterator. Patch against the for-linus tree
> below, although it conflicts with some of the 5.2 work. Maybe it is
> best to merge this just after the next rc1..
>
> --
> From 6a872f0186846a64a898b149be54d385f9f03f8b Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> Date: Mon, 8 Apr 2019 18:11:44 +0200
> Subject: block: remove the i argument to bio_for_each_segment_all
>
> We only have two callers that need the simple loop iterator, and
> they can easily do it themselves.
>
> Suggested-by: Matthew Wilcox <willy@infradead.org>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Nice cleanup!
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn SUSE Labs Filesystems
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
next prev parent reply other threads:[~2019-04-09 10:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 21:54 [PATCH] block: don't use for-inside-for in bio_for_each_segment_all Ming Lei
2019-04-07 6:52 ` Christoph Hellwig
2019-04-07 7:37 ` Ming Lei
2019-04-07 7:38 ` Christoph Hellwig
2019-04-07 7:54 ` Ming Lei
2019-04-07 7:58 ` Christoph Hellwig
2019-04-07 8:13 ` Ming Lei
2019-04-08 6:07 ` Hannes Reinecke
2019-04-08 14:12 ` Matthew Wilcox
2019-04-09 9:48 ` Christoph Hellwig
2019-04-09 10:25 ` Johannes Thumshirn [this message]
2019-04-09 11:38 ` Matthew Wilcox
2019-04-09 15:36 ` David Sterba
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=20190409102558.GC5099@linux-x5ow.site \
--to=jthumshirn@suse.de \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=osandov@fb.com \
--cc=quwenruo.btrfs@gmx.com \
--cc=willy@infradead.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;
as well as URLs for NNTP newsgroup(s).