[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVNhB5i_5VJ4596ktLRnEM03GhqhZD-x+E_QwK1kZydTJg@mail.gmail.com>
Date: Mon, 6 Feb 2017 18:43:32 +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>,
NeilBrown <neilb@...e.com>
Subject: Re: [PATCH 4/4] md: fast clone bio in bio_clone_mddev()
On Mon, Feb 6, 2017 at 4:54 PM, Christoph Hellwig <hch@...radead.org> wrote:
> On Sun, Feb 05, 2017 at 02:22:13PM +0800, Ming Lei wrote:
>> Firstly bio_clone_mddev() is used in raid normal I/O and isn't
>> in resync I/O path.
>>
>> Secondly all the direct access to bvec table in raid happens on
>> resync I/O except for write behind of raid1, in which we still
>> use bio_clone() for allocating new bvec table.
>>
>> So this patch replaces bio_clone() with bio_clone_fast()
>> in bio_clone_mddev().
>
> Having the _fast in the name would be really useful for the
> reader. And as far as I can tell in the callers mddev is never
> NULL and neither is ->bio_set, so replacing bio_clone_mddev with
In theory, ->bio_set still might be NULL in case of failed memory allocation,
please see md_run().
> raw calls to bio_clone_fast would be my preference.
Thanks,
Ming Lei
Powered by blists - more mailing lists