diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-04-12 21:35:44 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-04-20 20:57:52 +0200 |
commit | f26c5719b2d7b00de69eb83eb1c1c831759fdc9b (patch) | |
tree | d2f4dc917d539e7dae0424d7722affdc1cdd2006 /include | |
parent | dax: introduce dax_direct_access() (diff) | |
download | linux-f26c5719b2d7b00de69eb83eb1c1c831759fdc9b.tar.xz linux-f26c5719b2d7b00de69eb83eb1c1c831759fdc9b.zip |
dm: add dax_device and dax_operations support
Allocate a dax_device to represent the capacity of a device-mapper
instance. Provide a ->direct_access() method via the new dax_operations
indirection that mirrors the functionality of the current direct_access
support via block_device_operations. Once fs/dax.c has been converted
to use dax_operations the old dm_blk_direct_access() will be removed.
A new helper dm_dax_get_live_target() is introduced to separate some of
the dm-specifics from the direct_access implementation.
This enabling is only for the top-level dm representation to upper
layers. Converting target direct_access implementations is deferred to a
separate patch.
Cc: Toshi Kani <toshi.kani@hpe.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device-mapper.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index a7e6903866fd..bcba4d89089c 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -130,6 +130,7 @@ typedef int (*dm_busy_fn) (struct dm_target *ti); */ typedef long (*dm_direct_access_fn) (struct dm_target *ti, sector_t sector, void **kaddr, pfn_t *pfn, long size); +#define PAGE_SECTORS (PAGE_SIZE / 512) void dm_error(const char *message); |