dm: remove nr_iovecs parameter from alloc_tio()
authorJunichi Nomura <j-nomura@ce.jp.nec.com>
Fri, 3 Oct 2014 11:55:16 +0000 (11:55 +0000)
committerMike Snitzer <snitzer@redhat.com>
Mon, 6 Oct 2014 00:03:34 +0000 (20:03 -0400)
commit997782735c0f1e2e069337129fe0d5738d83d19b
tree981b35bf9ae43c10ddb668eb254827b3ad775e04
parentd8f429e1669b9709f5b669aac9d734dbe0640891
dm: remove nr_iovecs parameter from alloc_tio()

alloc_tio() uses bio_alloc_bioset() to allocate a clone-bio for a bio.
alloc_tio() takes the number of bvecs to allocate for the clone-bio.
However, with v3.14's immutable biovec changes DM now uses
__bio_clone_fast() and no longer needs to allocate bvecs.

In practice, the 'nr_iovecs' passed to alloc_tio() is always effectively
0.  __clone_and_map_simple_bio() looked like it was passing non-zero
nr_iovecs, but its value was always within the range of inline bvecs and
no allocation actually happened.  If allocation happened, the BUG_ON() in
__bio_clone_fast() would've triggered.

Remove the nr_iovecs parameter from alloc_tio() to prevent possible
future bio_alloc_bioset() mis-use of a new bioset interface that will no
longer allow bvecs to be allocated.

Also fix extra whitespace before the __bio_clone_fast() call in
__clone_and_map_simple_bio().

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c
This page took 0.026645 seconds and 5 git commands to generate.