Skip to content

Commit

Permalink
block: avoid to merge splitted bio
Browse files Browse the repository at this point in the history
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>
Ming Lei authored and axboe committed Oct 21, 2015
1 parent bdced43 commit 6ac45ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/blk-merge.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 6ac45ae

Please sign in to comment.