From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "linux-bcache@vger.kernel.org" <linux-bcache@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"mlyle@lyle.org" <mlyle@lyle.org>
Cc: "hch@lst.de" <hch@lst.de>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH] bio: ensure __bio_clone_fast copies bi_partno
Date: Fri, 17 Nov 2017 16:50:39 +0000 [thread overview]
Message-ID: <1510937438.2846.16.camel@wdc.com> (raw)
In-Reply-To: <20171117074725.22536-1-mlyle@lyle.org>
On Thu, 2017-11-16 at 23:47 -0800, Michael Lyle wrote:
> diff --git a/block/bio.c b/block/bio.c
> index 101c2a9b5481..33fa6b4af312 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -597,6 +597,7 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
> * so we don't set nor calculate new physical/hw segment counts here
> */
> bio->bi_disk = bio_src->bi_disk;
> + bio->bi_partno = bio_src->bi_partno;
> bio_set_flag(bio, BIO_CLONED);
> bio->bi_opf = bio_src->bi_opf;
> bio->bi_write_hint = bio_src->bi_write_hint;
Have you considered to use bio_copy_dev() instead of open-coding it?
Additionally, there is more code that copies these fields, e.g. the code in
bio_clone_bioset(). Shouldn't that code be modified such that it also copies
bi_partno?
How about the following class of assignments in drivers/md/raid1.c:
mbio->bi_disk = (void *)conf->mirrors[i].rdev;
Should these assignments perhaps be followed by a mbio->bi_partno assignment?
How about the following class of assignments in the NVMe code:
bio->bi_disk = disk;
Should these assignments perhaps be followed by a bio->bi_partno assignment?
Thanks,
Bart.
next prev parent reply other threads:[~2017-11-17 16:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 7:47 [PATCH] bio: ensure __bio_clone_fast copies bi_partno Michael Lyle
2017-11-17 11:04 ` Coly Li
2017-11-17 11:34 ` Ming Lei
2017-11-17 15:08 ` Christoph Hellwig
2017-11-17 15:27 ` Jens Axboe
2017-11-17 16:50 ` Bart Van Assche [this message]
2017-11-17 17:02 ` Michael Lyle
2017-11-17 17:18 ` hch
2017-11-17 20:25 ` Campbell Steven
2017-11-21 15:38 ` Pavel Goran
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=1510937438.2846.16.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=mlyle@lyle.org \
--cc=stable@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