diff options
author | Christoph Hellwig <hch@infradead.org> | 2014-02-07 10:22:38 -0800 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-02-07 11:58:54 -0700 |
commit | 4f7f418c4835d3ce1b66d00502df41f324d13ec0 (patch) | |
tree | ab5cd97067a6bf0350e639da9e0df8c7c1369652 /block | |
parent | 6f5ba581c0d3ba0a76fe138123c1c2817ffcbeb1 (diff) | |
download | renesas_kernel-4f7f418c4835d3ce1b66d00502df41f324d13ec0.tar.gz renesas_kernel-4f7f418c4835d3ce1b66d00502df41f324d13ec0.tar.bz2 renesas_kernel-4f7f418c4835d3ce1b66d00502df41f324d13ec0.zip |
blk-mq: handle dma_drain_size
Make blk-mq handle the dma_drain_size field the same way as the old request
path.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-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 c9306e3403f..a99bea45545 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) list_del_init(&rq->queuelist); blk_mq_start_request(rq); + if (q->dma_drain_size && blk_rq_bytes(rq)) { + /* + * make sure space for the drain appears we + * know we can do this because max_hw_segments + * has been adjusted to be one fewer than the + * device can handle + */ + rq->nr_phys_segments++; + } + /* * Last request in the series. Flag it as such, this * enables drivers to know when IO should be kicked off, |