All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@wdc.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] block: Simplify the bio cloning implementation
Date: Wed, 27 Jun 2018 16:55:20 -0700	[thread overview]
Message-ID: <6d9bb0d0-52fd-8f16-6443-dcd8867bdb7c@wdc.com> (raw)
In-Reply-To: <20180627232039.GA7583@ming.t460p>

On 06/27/18 16:21, Ming Lei wrote:
> What we need to do is to only copy the 1st bvec for WRITE_SAME, your patch
> changes to copy (bio->bi_iter.bi_size / block size) bvecs, then memory corruption
> may be triggered. So bio_for_each_segment() can't be used here.

Has it been considered to use memcpy() to copy the bi_vcnt bio_vecs 
instead of using bio_for_each_segment() in bio_clone_bioset()? That will 
in this context probably be even faster than using bio_for_each_segment().

Bart.

  reply	other threads:[~2018-06-27 23:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 22:26 [PATCH] block: Simplify the bio cloning implementation Bart Van Assche
2018-06-27  1:13 ` Ming Lei
2018-06-27 17:48   ` Bart Van Assche
2018-06-27 23:20     ` Ming Lei
2018-06-27 23:55       ` Bart Van Assche [this message]
2018-06-28  0:08         ` 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=6d9bb0d0-52fd-8f16-6443-dcd8867bdb7c@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.