diff options
author | Toshi Kani <toshi.kani@hpe.com> | 2016-06-23 01:54:53 +0200 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-07-21 05:49:49 +0200 |
commit | 545ed20e6df68a4d2584a29a2a28ee8b2f7e9547 (patch) | |
tree | 2d826caf0e6cfdf27d6a21401dea468cfb03e0d1 /drivers/md/dm.h | |
parent | Merge remote-tracking branch 'jens/for-4.8/core' into dm-4.8 (diff) | |
download | linux-545ed20e6df68a4d2584a29a2a28ee8b2f7e9547.tar.xz linux-545ed20e6df68a4d2584a29a2a28ee8b2f7e9547.zip |
dm: add infrastructure for DAX support
Change mapped device to implement direct_access function,
dm_blk_direct_access(), which calls a target direct_access function.
'struct target_type' is extended to have target direct_access interface.
This function limits direct accessible size to the dm_target's limit
with max_io_len().
Add dm_table_supports_dax() to iterate all targets and associated block
devices to check for DAX support. To add DAX support to a DM target the
target must only implement the direct_access function.
Add a new dm type, DM_TYPE_DAX_BIO_BASED, which indicates that mapped
device supports DAX and is bio based. This new type is used to assure
that all target devices have DAX support and remain that way after
QUEUE_FLAG_DAX is set in mapped device.
At initial table load, QUEUE_FLAG_DAX is set to mapped device when setting
DM_TYPE_DAX_BIO_BASED to the type. Any subsequent table load to the
mapped device must have the same type, or else it fails per the check in
table_load().
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r-- | drivers/md/dm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 2e0e4a53a312..f0aad08b9654 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -68,6 +68,7 @@ unsigned dm_table_get_type(struct dm_table *t); struct target_type *dm_table_get_immutable_target_type(struct dm_table *t); struct dm_target *dm_table_get_immutable_target(struct dm_table *t); struct dm_target *dm_table_get_wildcard_target(struct dm_table *t); +bool dm_table_bio_based(struct dm_table *t); bool dm_table_request_based(struct dm_table *t); bool dm_table_all_blk_mq_devices(struct dm_table *t); void dm_table_free_md_mempools(struct dm_table *t); |