All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Junichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	device-mapper development <dm-devel@redhat.com>,
	Kent Overstreet <kmo@daterainc.com>
Subject: Re: [PATCH 1/4] dm: remove nr_iovecs parameter from alloc_tio()
Date: Fri, 3 Oct 2014 16:01:30 -0400	[thread overview]
Message-ID: <20141003200129.GA13982@redhat.com> (raw)
In-Reply-To: <542E8EA4.2010704@ce.jp.nec.com>

On Fri, Oct 03 2014 at  7:55am -0400,
Junichi Nomura <j-nomura@ce.jp.nec.com> wrote:

> alloc_tio() allocates a bio for clone. It takes the number of
> bvecs to allocate for the clone-bio.
> However, with the introduction of bio_clone_fast() in v3.14,
> we no longer need to allocate bvecs and nr_iovecs is always 0.
> 
> __clone_and_map_simple_bio() looks like passing non-zero
> nr_iovecs, but its value is always within the range of
> inline bvecs and no allocation actually happens.
> If allocation happened, BUG_ON() in __bio_clone_fast() would
> trigger.
> 
> This patch removes the nr_iovecs parameter from alloc_tio()
> to prevent possible future mis-use of the interface.
> 
> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>

I picked this patch up and staged in linux-dm.git's for-next, see:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=8d59090cdc0ea91ffc390f78d0406baf8f66ae38

  reply	other threads:[~2014-10-03 20:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 11:48 [PATCH 0/4] dm: reduce memory overhead of DM devices Junichi Nomura
2014-10-03 11:55 ` [PATCH 1/4] dm: remove nr_iovecs parameter from alloc_tio() Junichi Nomura
2014-10-03 20:01   ` Mike Snitzer [this message]
2014-10-03 11:55 ` [PATCH 2/4] block: use bio_clone_fast() in blk_rq_prep_clone() Junichi Nomura
2014-10-03 11:55 ` [PATCH 3/4] block: add bioset_nobvec_create() Junichi Nomura
2014-10-03 13:16   ` Mike Snitzer
2014-10-03 11:55 ` [PATCH 4/4] dm: use bioset_nobvec_create() Junichi Nomura
2014-10-03 13:23 ` [PATCH 0/4] dm: reduce memory overhead of DM devices Mike Snitzer
2014-10-03 20:48   ` Mike Snitzer
2014-10-03 20:57     ` Jens Axboe
2014-10-03 21:04       ` Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 1/4] dm: remove nr_iovecs parameter from alloc_tio() Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 2/4] block: use bio_clone_fast() in blk_rq_prep_clone() Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 3/4] block: add bioset_create_nobvec() Mike Snitzer
2014-10-03 21:27     ` [PATCH v2 4/4] dm: use bioset_create_nobvec() Mike Snitzer
2014-10-05 23:06       ` Junichi Nomura
2014-10-06  0:24         ` Mike Snitzer
2014-10-04 17:01 ` [PATCH 0/4] dm: reduce memory overhead of DM devices Christoph Hellwig

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=20141003200129.GA13982@redhat.com \
    --to=snitzer@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=kmo@daterainc.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.