block: avoid to merge splitted bio
authorMing Lei <ming.lei@canonical.com>
Tue, 20 Oct 2015 15:13:53 +0000 (23:13 +0800)
committerJens Axboe <axboe@fb.com>
Wed, 21 Oct 2015 21:00:51 +0000 (15:00 -0600)
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>
block/blk-merge.c

index 22293fdf651433837d93830ec9aa7970197eced8..de5716d8e525969e7849767a775aabec9e4d8b96 100644 (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;