aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-07-03 04:45:37 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 12:24:14 -0400
commit144d6ed551ce430084489b198826c89bac5680dc (patch)
tree78b59ca5c4487784bfc2a16bcd91c0cb41631f8a
parent98d8c8f40ed72d997e50bc107a5cc1a6cee19e76 (diff)
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>
-rw-r--r--drivers/md/dm.c16
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)
1455 return _dm_request(q, bio); 1455 return _dm_request(q, bio);
1456} 1456}
1457 1457
1458/*
1459 * Mark this request as flush request, so that dm_request_fn() can
1460 * recognize.
1461 */
1462static void dm_rq_prepare_flush(struct request_queue *q, struct request *rq)
1463{
1464 rq->cmd_type = REQ_TYPE_LINUX_BLOCK;
1465 rq->cmd[0] = REQ_LB_OP_FLUSH;
1466}
1467
1468static bool dm_rq_is_flush_request(struct request *rq) 1458static bool dm_rq_is_flush_request(struct request *rq)
1469{ 1459{
1470 if (rq->cmd_type == REQ_TYPE_LINUX_BLOCK && 1460 if (rq->cmd_flags & REQ_FLUSH)
1471 rq->cmd[0] == REQ_LB_OP_FLUSH)
1472 return true; 1461 return true;
1473 else 1462 else
1474 return false; 1463 return false;
@@ -1912,8 +1901,7 @@ static struct mapped_device *alloc_dev(int minor)
1912 blk_queue_softirq_done(md->queue, dm_softirq_done); 1901 blk_queue_softirq_done(md->queue, dm_softirq_done);
1913 blk_queue_prep_rq(md->queue, dm_prep_fn); 1902 blk_queue_prep_rq(md->queue, dm_prep_fn);
1914 blk_queue_lld_busy(md->queue, dm_lld_busy); 1903 blk_queue_lld_busy(md->queue, dm_lld_busy);
1915 blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, 1904 blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN_FLUSH, NULL);
1916 dm_rq_prepare_flush);
1917 1905
1918 md->disk = alloc_disk(1); 1906 md->disk = alloc_disk(1);
1919 if (!md->disk) 1907 if (!md->disk)