diff options
author | Ming Lei <ming.lei@canonical.com> | 2014-09-25 11:23:43 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-25 17:22:40 -0400 |
commit | 7c94e1c157a227837b04f02f5edeff8301410ba2 (patch) | |
tree | 3b592095b0204ebad61dd22b77aa1e72595dbc3a /block/blk-core.c | |
parent | 7ddab5de5b80d3111f9e6765714e728b2c4f1c07 (diff) |
block: introduce blk_flush_queue to drive flush machinery
This patch introduces 'struct blk_flush_queue' and puts all
flush machinery related fields into this structure, so that
- flush implementation details aren't exposed to driver
- it is easy to convert to per dispatch-queue flush machinery
This patch is basically a mechanical replacement.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 222fe84d6ac4..cfaca8ca6cc4 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -390,11 +390,13 @@ static void __blk_drain_queue(struct request_queue *q, bool drain_all) | |||
390 | * be drained. Check all the queues and counters. | 390 | * be drained. Check all the queues and counters. |
391 | */ | 391 | */ |
392 | if (drain_all) { | 392 | if (drain_all) { |
393 | struct blk_flush_queue *fq = blk_get_flush_queue(q); | ||
393 | drain |= !list_empty(&q->queue_head); | 394 | drain |= !list_empty(&q->queue_head); |
394 | for (i = 0; i < 2; i++) { | 395 | for (i = 0; i < 2; i++) { |
395 | drain |= q->nr_rqs[i]; | 396 | drain |= q->nr_rqs[i]; |
396 | drain |= q->in_flight[i]; | 397 | drain |= q->in_flight[i]; |
397 | drain |= !list_empty(&q->flush_queue[i]); | 398 | if (fq) |
399 | drain |= !list_empty(&fq->flush_queue[i]); | ||
398 | } | 400 | } |
399 | } | 401 | } |
400 | 402 | ||