From: Kent Overstreet <kent.overstreet@gmail.com>
To: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Ming Lei <tom.leiming@gmail.com>, Ming Lei <ming.lei@redhat.com>,
Jens Axboe <axboe@kernel.dk>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>, Mike Snitzer <snitzer@redhat.com>,
Hannes Reinecke <hare@suse.com>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH] block: Make __bio_clone_fast() copy bi_vcnt
Date: Sat, 30 Jun 2018 19:38:30 -0400 [thread overview]
Message-ID: <20180630233830.GC31305@kmo-pixel> (raw)
In-Reply-To: <914493fc-d2c0-19a1-533e-c9e72340c8e9@wdc.com>
On Fri, Jun 29, 2018 at 01:00:33PM -0700, Bart Van Assche wrote:
> On 06/28/18 17:04, Kent Overstreet wrote:
> > On Thu, Jun 28, 2018 at 04:54:44PM -0700, Bart Van Assche wrote:
> > > Thanks for chiming in. The linux-block mailing list is archived by multiple
> > > websites. The entire e-mail thread is available on e.g.
> > > https://www.mail-archive.com/linux-block@vger.kernel.org/msg23006.html.
> > >
> > > I have a question for you: at least in kernel v4.17 bio_clone_bioset()
> > > copies bi_vcnt from the source to the destination bio. However,
> > > __bio_clone_fast() doesn't copy bi_vcnt. Isn't that an inconsistency?
> >
> > No - when you use bio_clone_bioset() you get a bio that you own and can do
> > whatever you want with, so it does make sense for it to initialize bi_vcnt.
> >
> > e.g. you could use bio_clone_bioset() when you're going to be bouncing a bio,
> > iterating over each bvec and allocating a new page and copying data from the old
> > page to the new page.
>
> Hello Kent,
>
> Have you considered to explain this in a comment above __bio_clone_fast() to
> avoid that the next person who reads that function gets confused?
Well, there is a large comment in bio_clone_bioset() that you must have found...
next prev parent reply other threads:[~2018-06-30 23:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-27 20:12 [PATCH] block: Make __bio_clone_fast() copy bi_vcnt Bart Van Assche
2018-06-27 23:50 ` Ming Lei
2018-06-27 23:59 ` Bart Van Assche
2018-06-28 0:30 ` Ming Lei
2018-06-28 15:21 ` Bart Van Assche
2018-06-28 15:32 ` Mike Snitzer
2018-06-28 23:10 ` [PATCH] " Ming Lei
2018-06-28 23:16 ` Kent Overstreet
2018-06-28 23:54 ` Bart Van Assche
2018-06-29 0:04 ` Kent Overstreet
2018-06-29 20:00 ` Bart Van Assche
2018-06-30 23:38 ` Kent Overstreet [this message]
2018-06-29 2:18 ` Jens Axboe
2018-06-28 15:53 ` Jens Axboe
2018-06-28 22:53 ` Ming Lei
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=20180630233830.GC31305@kmo-pixel \
--to=kent.overstreet@gmail.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=snitzer@redhat.com \
--cc=tom.leiming@gmail.com \
/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