aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMatthew Wilcox <[email protected]>2015-02-16 15:58:53 -0800
committerLinus Torvalds <[email protected]>2015-02-16 17:56:03 -0800
commitfbbbad4bc2101e452b24e6e65d3d5e11314a0b5f (patch)
tree7d12515701e867b88856b0c7f78c9abd7a61785b /include/linux
parent2e4cdab0584fa884e0a81c4f45b93ce875c9fcaa (diff)
vfs,ext2: introduce IS_DAX(inode)
Use an inode flag to tag inodes which should avoid using the page cache. Convert ext2 to use it instead of mapping_is_xip(). Prevent I/Os to files tagged with the DAX flag from falling back to buffered I/O. Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Mathieu Desnoyers <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: Boaz Harrosh <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Ross Zwisler <[email protected]> Cc: Theodore Ts'o <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e49f10cc8a73..fb373bb5cf03 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1677,6 +1677,11 @@ struct super_operations {
#define S_IMA 1024 /* Inode has an associated IMA struct */
#define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */
#define S_NOSEC 4096 /* no suid or xattr security attributes */
+#ifdef CONFIG_FS_XIP
+#define S_DAX 8192 /* Direct Access, avoiding the page cache */
+#else
+#define S_DAX 0 /* Make all the DAX code disappear */
+#endif
/*
* Note that nosuid etc flags are inode-specific: setting some file-system
@@ -1714,6 +1719,7 @@ struct super_operations {
#define IS_IMA(inode) ((inode)->i_flags & S_IMA)
#define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT)
#define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC)
+#define IS_DAX(inode) ((inode)->i_flags & S_DAX)
#define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \
(inode)->i_rdev == WHITEOUT_DEV)