summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorPankaj Gupta2019-07-05 16:03:25 +0200
committerDan Williams2019-07-06 00:19:10 +0200
commit2e9ee0955d3c2d3db56aa02ba6f948ba35d5e9c1 (patch)
treee26bac2332a122e668c0b5378bdb440f1443b09a /drivers/md/dm.c
parentlibnvdimm: add dax_dev sync flag (diff)
downloadkernel-qcow2-linux-2e9ee0955d3c2d3db56aa02ba6f948ba35d5e9c1.tar.gz
kernel-qcow2-linux-2e9ee0955d3c2d3db56aa02ba6f948ba35d5e9c1.tar.xz
kernel-qcow2-linux-2e9ee0955d3c2d3db56aa02ba6f948ba35d5e9c1.zip
dm: enable synchronous dax
This patch sets dax device 'DAXDEV_SYNC' flag if all the target devices of device mapper support synchrononous DAX. If device mapper consists of both synchronous and asynchronous dax devices, we don't set 'DAXDEV_SYNC' flag. 'dm_table_supports_dax' is refactored to pass 'iterate_devices_fn' as argument so that the callers can pass the appropriate functions. Suggested-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Pankaj Gupta <pagupta@redhat.com> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index b1caa7188209..b92c42a72ad4 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1119,7 +1119,7 @@ static bool dm_dax_supported(struct dax_device *dax_dev, struct block_device *bd
if (!map)
return false;
- ret = dm_table_supports_dax(map, blocksize);
+ ret = dm_table_supports_dax(map, device_supports_dax, &blocksize);
dm_put_live_table(md, srcu_idx);