diff options
-rw-r--r-- | block/blk-mq.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index c9306e3403fe..a99bea455452 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -582,6 +582,16 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) | |||
582 | list_del_init(&rq->queuelist); | 582 | list_del_init(&rq->queuelist); |
583 | blk_mq_start_request(rq); | 583 | blk_mq_start_request(rq); |
584 | 584 | ||
585 | if (q->dma_drain_size && blk_rq_bytes(rq)) { | ||
586 | /* | ||
587 | * make sure space for the drain appears we | ||
588 | * know we can do this because max_hw_segments | ||
589 | * has been adjusted to be one fewer than the | ||
590 | * device can handle | ||
591 | */ | ||
592 | rq->nr_phys_segments++; | ||
593 | } | ||
594 | |||
585 | /* | 595 | /* |
586 | * Last request in the series. Flag it as such, this | 596 | * Last request in the series. Flag it as such, this |
587 | * enables drivers to know when IO should be kicked off, | 597 | * enables drivers to know when IO should be kicked off, |