Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dm: prevent DAX mounts if not supported
Currently device_supports_dax() just checks to see if the QUEUE_FLAG_DAX flag is set on the device's request queue to decide whether or not the device supports filesystem DAX. Really we should be using bdev_dax_supported() like filesystems do at mount time. This performs other tests like checking to make sure the dax_direct_access() path works. We also explicitly clear QUEUE_FLAG_DAX on the DM device's request queue if any of the underlying devices do not support DAX. This makes the handling of QUEUE_FLAG_DAX consistent with the setting/clearing of most other flags in dm_table_set_restrictions(). Now that bdev_dax_supported() explicitly checks for QUEUE_FLAG_DAX, this will ensure that filesystems built upon DM devices will only be able to mount with DAX if all underlying devices also support DAX. Signed-off-by: Ross Zwisler <[email protected]> Fixes: commit 545ed20 ("dm: add infrastructure for DAX support") Cc: [email protected] Acked-by: Dan Williams <[email protected]> Reviewed-by: Toshi Kani <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
- Loading branch information