aboutsummaryrefslogtreecommitdiff
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorMing Lei2015-10-20 23:13:53 +0800
committerJens Axboe2015-10-21 15:00:51 -0600
commit6ac45aeb6bcad38a2783a7d6e5da4c469497eeb0 (patch)
tree666a97a544ba4a465be7839989fce19746c73a8a /block/blk-merge.c
parentbdced438acd83ad83a6c6fc7f50099b820245ddb (diff)
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>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 22293fdf6514..de5716d8e525 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -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;