OSDN Git Service

dm: enable synchronous dax
authorPankaj Gupta <pagupta@redhat.com>
Fri, 5 Jul 2019 14:03:25 +0000 (19:33 +0530)
committerDan Williams <dan.j.williams@intel.com>
Fri, 5 Jul 2019 22:19:10 +0000 (15:19 -0700)
commit2e9ee0955d3c2d3db56aa02ba6f948ba35d5e9c1
treee26bac2332a122e668c0b5378bdb440f1443b09a
parentfefc1d97fa4b5e016bbe15447dc3edcd9e1bcb9f
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>
drivers/md/dm-table.c
drivers/md/dm.c
drivers/md/dm.h