diff options
author | Christoph Hellwig <hch@lst.de> | 2021-11-29 11:21:58 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-12-04 08:58:53 -0800 |
commit | 952da06375c8f3aa58474fff718d9ae8442531b9 (patch) | |
tree | 8fce857c95365fd0340d4975d7bf83bc071e6761 /include/linux/iomap.h | |
parent | 740fd671e04f8a977018eb9cfe440b4817850f0d (diff) | |
download | linux-952da06375c8f3aa58474fff718d9ae8442531b9.tar.gz linux-952da06375c8f3aa58474fff718d9ae8442531b9.tar.bz2 linux-952da06375c8f3aa58474fff718d9ae8442531b9.zip |
iomap: add a IOMAP_DAX flag
Add a flag so that the file system can easily detect DAX operations
based just on the iomap operation requested instead of looking at
inode state using IS_DAX. This will be needed to apply the to be
added partition offset only for operations that actually use DAX,
but not things like fiemap that are based on the block device.
In the long run it should also allow turning the bdev, dax_dev
and inline_data into a union.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20211129102203.2243509-25-hch@lst.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/iomap.h')
-rw-r--r-- | include/linux/iomap.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 6d1b08d0ae93..5b9432f9f79e 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -141,6 +141,11 @@ struct iomap_page_ops { #define IOMAP_NOWAIT (1 << 5) /* do not block */ #define IOMAP_OVERWRITE_ONLY (1 << 6) /* only pure overwrites allowed */ #define IOMAP_UNSHARE (1 << 7) /* unshare_file_range */ +#ifdef CONFIG_FS_DAX +#define IOMAP_DAX (1 << 8) /* DAX mapping */ +#else +#define IOMAP_DAX 0 +#endif /* CONFIG_FS_DAX */ struct iomap_ops { /* |