diff options
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) | |||
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 | */ | ||
1462 | static 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 | |||
1468 | static bool dm_rq_is_flush_request(struct request *rq) | 1458 | static 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) |