]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix bio_add_page for non trivial merge_bvec_fn case
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 27 Jan 2010 19:44:36 +0000 (22:44 +0300)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 28 Jan 2010 14:08:29 +0000 (15:08 +0100)
commit5cc8c662a163cb5641a1fdaf074ccca190dfe4f9
treea9d68cfc0e838490d12963aa917ef78a54ae2073
parenta877b835a23e266b6b02326281caf8d08e8c6ec3
block: fix bio_add_page for non trivial merge_bvec_fn case

We have to properly decrease bi_size in order to merge_bvec_fn return
right result.  Otherwise this result in false merge rejects for two
absolutely valid bio_vecs.  This may cause significant performance
penalty for example fs_block_size == 1k and block device is raid0 with
small chunk_size = 8k. Then it is impossible to merge 7-th fs-block in
to bio which already has 6 fs-blocks.

Cc: <stable@kernel.org>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/bio.c