[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180613144818.GD4693@infradead.org>
Date: Wed, 13 Jun 2018 07:48:18 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Ming Lei <ming.lei@...hat.com>
Cc: Jens Axboe <axboe@...com>, Christoph Hellwig <hch@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Kent Overstreet <kent.overstreet@...il.com>,
David Sterba <dsterba@...e.cz>,
Huang Ying <ying.huang@...el.com>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
Theodore Ts'o <tytso@....edu>,
"Darrick J . Wong" <darrick.wong@...cle.com>,
Coly Li <colyli@...e.de>, Filipe Manana <fdmanana@...il.com>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH V6 13/30] block: introduce rq_for_each_chunk()
On Sat, Jun 09, 2018 at 08:29:57PM +0800, Ming Lei wrote:
> There are still cases in which rq_for_each_chunk() is required, for
> example, loop.
>
> Signed-off-by: Ming Lei <ming.lei@...hat.com>
> ---
> include/linux/blkdev.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index bca3a92eb55f..4eaba73c784a 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -941,6 +941,10 @@ struct req_iterator {
> __rq_for_each_bio(_iter.bio, _rq) \
> bio_for_each_segment(bvl, _iter.bio, _iter.iter)
>
> +#define rq_for_each_chunk(bvl, _rq, _iter) \
> + __rq_for_each_bio(_iter.bio, _rq) \
> + bio_for_each_chunk(bvl, _iter.bio, _iter.iter)
We have a single users of this in the loop driver. I'd rather
see the obvious loop open coded.
Powered by blists - more mailing lists