aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2017-12-04 23:28:32 -0500
committerMike Snitzer <snitzer@redhat.com>2017-12-13 12:33:32 -0500
commitad3793fc3945173f64d82d05d3ecde41f6c0435c (patch)
treeef751eaaf1e7997bf33766e9fde6eaa67962607b /drivers
parent3d7f45625a84696f61c6470a887bdc65180937a9 (diff)
dm: set QUEUE_FLAG_DAX accordingly in dm_table_set_restrictions()
Rather than having DAX support be unique by setting it based on table type in dm_setup_md_queue(). Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-table.c2
-rw-r--r--drivers/md/dm.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 7b22cc8d30f4..504e79bc3a55 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1823,6 +1823,8 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
1823 } 1823 }
1824 blk_queue_write_cache(q, wc, fua); 1824 blk_queue_write_cache(q, wc, fua);
1825 1825
1826 if (dm_table_supports_dax(t))
1827 queue_flag_set_unlocked(QUEUE_FLAG_DAX, q);
1826 if (dm_table_supports_dax_write_cache(t)) 1828 if (dm_table_supports_dax_write_cache(t))
1827 dax_write_cache(t->md->dax_dev, true); 1829 dax_write_cache(t->md->dax_dev, true);
1828 1830
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 4e7682afebfa..308d178fff73 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2034,9 +2034,6 @@ int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t)
2034 case DM_TYPE_DAX_BIO_BASED: 2034 case DM_TYPE_DAX_BIO_BASED:
2035 dm_init_normal_md_queue(md); 2035 dm_init_normal_md_queue(md);
2036 blk_queue_make_request(md->queue, dm_make_request); 2036 blk_queue_make_request(md->queue, dm_make_request);
2037
2038 if (type == DM_TYPE_DAX_BIO_BASED)
2039 queue_flag_set_unlocked(QUEUE_FLAG_DAX, md->queue);
2040 break; 2037 break;
2041 case DM_TYPE_NONE: 2038 case DM_TYPE_NONE:
2042 WARN_ON_ONCE(true); 2039 WARN_ON_ONCE(true);