mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
block: check bio_mergeable() early before merging
After bio splitting is introduced, one bio can be splitted and it is marked as NOMERGE because it is too fat to be merged, so check bio_mergeable() earlier to avoid to try to merge it unnecessarily. Signed-off-by: Ming Lei <[email protected]> Reviewed-by: Jeff Moyer <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
e18378a60e
commit
7460d389c0
1 changed files with 1 additions and 1 deletions
|
|
@ -420,7 +420,7 @@ int elv_merge(struct request_queue *q, struct request **req, struct bio *bio)
|
|||
* noxmerges: Only simple one-hit cache try
|
||||
* merges: All merge tries attempted
|
||||
*/
|
||||
if (blk_queue_nomerges(q))
|
||||
if (blk_queue_nomerges(q) || !bio_mergeable(bio))
|
||||
return ELEVATOR_NO_MERGE;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue