mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-04 05:24:03 +00:00
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>
This commit is contained in:
parent
3d7f45625a
commit
ad3793fc39
2 changed files with 2 additions and 3 deletions
|
@ -1823,6 +1823,8 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
|
||||||
}
|
}
|
||||||
blk_queue_write_cache(q, wc, fua);
|
blk_queue_write_cache(q, wc, fua);
|
||||||
|
|
||||||
|
if (dm_table_supports_dax(t))
|
||||||
|
queue_flag_set_unlocked(QUEUE_FLAG_DAX, q);
|
||||||
if (dm_table_supports_dax_write_cache(t))
|
if (dm_table_supports_dax_write_cache(t))
|
||||||
dax_write_cache(t->md->dax_dev, true);
|
dax_write_cache(t->md->dax_dev, true);
|
||||||
|
|
||||||
|
|
|
@ -2034,9 +2034,6 @@ int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t)
|
||||||
case DM_TYPE_DAX_BIO_BASED:
|
case DM_TYPE_DAX_BIO_BASED:
|
||||||
dm_init_normal_md_queue(md);
|
dm_init_normal_md_queue(md);
|
||||||
blk_queue_make_request(md->queue, dm_make_request);
|
blk_queue_make_request(md->queue, dm_make_request);
|
||||||
|
|
||||||
if (type == DM_TYPE_DAX_BIO_BASED)
|
|
||||||
queue_flag_set_unlocked(QUEUE_FLAG_DAX, md->queue);
|
|
||||||
break;
|
break;
|
||||||
case DM_TYPE_NONE:
|
case DM_TYPE_NONE:
|
||||||
WARN_ON_ONCE(true);
|
WARN_ON_ONCE(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue