aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dax.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-05-12 18:29:16 +0200
committerRoss Zwisler <ross.zwisler@linux.intel.com>2016-05-19 15:14:55 -0600
commite804315dd0f574b56155c5a2406ab5e0318104f7 (patch)
tree4f32114d6642bf2f4a1863ac58d684e6c7ce5cda /include/linux/dax.h
parentdax: Make huge page handling depend of CONFIG_BROKEN (diff)
downloadlinux-dev-e804315dd0f574b56155c5a2406ab5e0318104f7.tar.xz
linux-dev-e804315dd0f574b56155c5a2406ab5e0318104f7.zip
dax: Define DAX lock bit for radix tree exceptional entry
We will use lowest available bit in the radix tree exceptional entry for locking of the entry. Define it. Also clean up definitions of DAX entry type bits in DAX exceptional entries to use defined constants instead of hardcoding numbers and cleanup checking of these bits to not rely on how other bits in the entry are set. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Diffstat (limited to 'include/linux/dax.h')
-rw-r--r--include/linux/dax.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/dax.h b/include/linux/dax.h
index 72dc81de3ddb..70600b63083f 100644
--- a/include/linux/dax.h
+++ b/include/linux/dax.h
@@ -5,6 +5,9 @@
#include <linux/mm.h>
#include <asm/pgtable.h>
+/* We use lowest available exceptional entry bit for locking */
+#define RADIX_DAX_ENTRY_LOCK (1 << RADIX_TREE_EXCEPTIONAL_SHIFT)
+
ssize_t dax_do_io(struct kiocb *, struct inode *, struct iov_iter *, loff_t,
get_block_t, dio_iodone_t, int flags);
int dax_zero_page_range(struct inode *, loff_t from, unsigned len, get_block_t);