md: deal with merge_bvec_fn in component devices better.
authorNeilBrown <neilb@suse.de>
Mon, 8 Mar 2010 05:44:38 +0000 (16:44 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 16 Mar 2010 06:04:24 +0000 (17:04 +1100)
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_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>
Cc: stable@kernel.org

No differences found