[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACVXFVMjf0trmc8jggdYUm8k1HS+vHa26=godzJ-jQ_23yha0w@mail.gmail.com>
Date: Tue, 28 Feb 2017 20:15:37 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Shaohua Li <shli@...nel.org>, Jens Axboe <axboe@...com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:SOFTWARE RAID (Multiple Disks) SUPPORT"
<linux-raid@...r.kernel.org>,
linux-block <linux-block@...r.kernel.org>
Subject: Re: [PATCH v1 01/14] block: introduce bio_segments_all()
On Sun, Feb 26, 2017 at 2:22 AM, Christoph Hellwig <hch@...radead.org> wrote:
>> +static inline unsigned bio_segments_all(struct bio *bio)
>> +{
>> + WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED));
>> +
>> + return bio->bi_vcnt;
>> +}
>
> I don't think this helpers really adds any benefit.
IMO the first benefit is that misusing of .bi_vcnt can be warned, and
another one is that we have to introduce this helper if multipage bvec
is supported.
Thanks,
Ming Lei
Powered by blists - more mailing lists