]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md: deal with merge_bvec_fn in component devices better.
authorNeilBrown <neilb@suse.de>
Wed, 31 Mar 2010 01:07:16 +0000 (12:07 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:48:03 +0000 (07:48 -0700)
commit11d0dfa8ce268e40b625e26537f21cf5b74007af
treec1b6533fec346cf7203c56ceafdfaa97fe8dcc03
parente6813c83b2ef1fe0abb88fca3c4dfc4c5a01f473
md: deal with merge_bvec_fn in component devices better.

commit 627a2d3c29427637f4c5d31ccc7fcbd8d312cd71 upstream.

If a component device has a merge_bvec_fn then as we never call it
we must ensure we never need to.  Currently this is done by setting
max_sector to 1 PAGE, however this does not stop a bio being created
with several sub-page iovecs that would violate the merge_bvec_fn.

So instead set max_phys_segments to 1 and set the segment boundary to the
same as a page boundary to ensure there is only ever one single-page
segment of IO requested at a time.

This can particularly be an issue when 'xen' is used as it is
known to submit multiple small buffers in a single bio.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/linear.c
drivers/md/multipath.c
drivers/md/raid0.c
drivers/md/raid10.c