diff options
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5a843c1f4d64..00c768860818 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1768,7 +1768,6 @@ static struct mapped_device *alloc_dev(int minor) | |||
1768 | md->queue->backing_dev_info.congested_fn = dm_any_congested; | 1768 | md->queue->backing_dev_info.congested_fn = dm_any_congested; |
1769 | md->queue->backing_dev_info.congested_data = md; | 1769 | md->queue->backing_dev_info.congested_data = md; |
1770 | blk_queue_make_request(md->queue, dm_request); | 1770 | blk_queue_make_request(md->queue, dm_request); |
1771 | blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN, NULL); | ||
1772 | blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY); | 1771 | blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY); |
1773 | md->queue->unplug_fn = dm_unplug_all; | 1772 | md->queue->unplug_fn = dm_unplug_all; |
1774 | blk_queue_merge_bvec(md->queue, dm_merge_bvec); | 1773 | blk_queue_merge_bvec(md->queue, dm_merge_bvec); |
@@ -2201,6 +2200,16 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *table) | |||
2201 | goto out; | 2200 | goto out; |
2202 | } | 2201 | } |
2203 | 2202 | ||
2203 | /* | ||
2204 | * It is enought that blk_queue_ordered() is called only once when | ||
2205 | * the first bio-based table is bound. | ||
2206 | * | ||
2207 | * This setting should be moved to alloc_dev() when request-based dm | ||
2208 | * supports barrier. | ||
2209 | */ | ||
2210 | if (!md->map && dm_table_bio_based(table)) | ||
2211 | blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN, NULL); | ||
2212 | |||
2204 | __unbind(md); | 2213 | __unbind(md); |
2205 | r = __bind(md, table, &limits); | 2214 | r = __bind(md, table, &limits); |
2206 | 2215 | ||