[dm-devel] [PATCH 1/4] dm: remove nr_iovecs parameter from alloc_tio()

Mike Snitzer snitzer at redhat.com
Fri Oct 3 20:01:30 UTC 2014


On Fri, Oct 03 2014 at  7:55am -0400,
Junichi Nomura <j-nomura at 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 at 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




More information about the dm-devel mailing list