diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-07-03 17:45:37 +0900 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 18:24:14 +0200 |
commit | 144d6ed551ce430084489b198826c89bac5680dc (patch) | |
tree | 78b59ca5c4487784bfc2a16bcd91c0cb41631f8a /drivers/md/dm.c | |
parent | 98d8c8f40ed72d997e50bc107a5cc1a6cee19e76 (diff) | |
download | linux-144d6ed551ce430084489b198826c89bac5680dc.tar.bz2 |
dm: stop using q->prepare_flush_fn
use REQ_FLUSH flag instead.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Alasdair G Kergon <agk@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index d6f77baeafd6..00c810551814 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1455,20 +1455,9 @@ static int dm_request(struct request_queue *q, struct bio *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) { - if (rq->cmd_type == REQ_TYPE_LINUX_BLOCK && - rq->cmd[0] == REQ_LB_OP_FLUSH) + if (rq->cmd_flags & REQ_FLUSH) return true; else return false; @@ -1912,8 +1901,7 @@ static struct mapped_device *alloc_dev(int minor) blk_queue_softirq_done(md->queue, dm_softirq_done); blk_queue_prep_rq(md->queue, dm_prep_fn); blk_queue_lld_busy(md->queue, dm_lld_busy); - blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, - dm_rq_prepare_flush); + blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL); md->disk = alloc_disk(1); if (!md->disk) |