Commit 144d6ed5 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Jens Axboe

dm: stop using q->prepare_flush_fn

use REQ_FLUSH flag instead.
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 98d8c8f4
...@@ -1455,20 +1455,9 @@ static int dm_request(struct request_queue *q, struct bio *bio) ...@@ -1455,20 +1455,9 @@ static int dm_request(struct request_queue *q, struct bio *bio)
return _dm_request(q, bio); return _dm_request(q, bio);
} }
/*
* Mark this request as flush request, so that dm_request_fn() can
* recognize.
*/
static void dm_rq_prepare_flush(struct request_queue *q, struct request *rq)
{
rq->cmd_type = REQ_TYPE_LINUX_BLOCK;
rq->cmd[0] = REQ_LB_OP_FLUSH;
}
static bool dm_rq_is_flush_request(struct request *rq) static bool dm_rq_is_flush_request(struct request *rq)
{ {
if (rq->cmd_type == REQ_TYPE_LINUX_BLOCK && if (rq->cmd_flags & REQ_FLUSH)
rq->cmd[0] == REQ_LB_OP_FLUSH)
return true; return true;
else else
return false; return false;
...@@ -1912,8 +1901,7 @@ static struct mapped_device *alloc_dev(int minor) ...@@ -1912,8 +1901,7 @@ static struct mapped_device *alloc_dev(int minor)
blk_queue_softirq_done(md->queue, dm_softirq_done); blk_queue_softirq_done(md->queue, dm_softirq_done);
blk_queue_prep_rq(md->queue, dm_prep_fn); blk_queue_prep_rq(md->queue, dm_prep_fn);
blk_queue_lld_busy(md->queue, dm_lld_busy); blk_queue_lld_busy(md->queue, dm_lld_busy);
blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL);
dm_rq_prepare_flush);
md->disk = alloc_disk(1); md->disk = alloc_disk(1);
if (!md->disk) if (!md->disk)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment