summaryrefslogtreecommitdiff
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 123d1a3a358e..1134ceed800f 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -2064,17 +2064,9 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
dm_table_any_dev_attr(t, device_is_not_random, NULL))
blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q);
- /*
- * For a zoned target, the number of zones should be updated for the
- * correct value to be exposed in sysfs queue/nr_zones. For a BIO based
- * target, this is all that is needed.
- */
-#ifdef CONFIG_BLK_DEV_ZONED
- if (blk_queue_is_zoned(q)) {
- WARN_ON_ONCE(queue_is_mq(q));
- q->nr_zones = blkdev_nr_zones(t->md->disk);
- }
-#endif
+ /* For a zoned target, setup the zones related queue attributes */
+ if (blk_queue_is_zoned(q))
+ dm_set_zones_restrictions(t, q);
dm_update_keyslot_manager(q, t);
blk_queue_update_readahead(q);