block: avoid to merge splitted bio

The splitted bio has been already too fat to merge, so mark it
as NOMERGE.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Ming Lei 2015-10-20 23:13:53 +08:00 committed by Jens Axboe
parent bdced438ac
commit 6ac45aeb6b
1 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,9 @@ void blk_queue_split(struct request_queue *q, struct bio **bio,
bio_set_flag(res, BIO_SEG_VALID);
if (split) {
/* there isn't chance to merge the splitted bio */
split->bi_rw |= REQ_NOMERGE;
bio_chain(split, *bio);
generic_make_request(*bio);
*bio = split;