]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix bio splitting on max sectors
authorMing Lei <tom.leiming@gmail.com>
Sat, 23 Jan 2016 00:05:33 +0000 (08:05 +0800)
committerJens Axboe <axboe@fb.com>
Sat, 23 Jan 2016 03:42:30 +0000 (20:42 -0700)
commit239c5c533da943ce71133e6626b82739719443d0
tree3c8d2fd4fe59ab2c278d26a2bc37209ba4765195
parentabc029882fcda686daf06904f5fd7134c94766c2
block: fix bio splitting on max sectors

After commit b26fb5ba353c(block: split bios to maxpossible length),
bio can be splitted in the middle of a vector entry, then it
is easy to split out one bio which size isn't aligned with block
size, especially when the block size is bigger than 512.

This patch fixes the issue by making the max io size aligned
to logical block size.

Fixes: b26fb5ba353c(block: split bios to maxpossible length)
Reported-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Cc: Keith Busch <keith.busch@intel.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-merge.c