diff options
| author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2015-02-16 18:58:53 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-16 20:56:03 -0500 |
| commit | fbbbad4bc2101e452b24e6e65d3d5e11314a0b5f (patch) | |
| tree | 7d12515701e867b88856b0c7f78c9abd7a61785b /include/linux/fs.h | |
| parent | 2e4cdab0584fa884e0a81c4f45b93ce875c9fcaa (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 <matthew.r.wilcox@intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Boaz Harrosh <boaz@plexistor.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 6 |
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 { | |||
| 1677 | #define S_IMA 1024 /* Inode has an associated IMA struct */ | 1677 | #define S_IMA 1024 /* Inode has an associated IMA struct */ |
| 1678 | #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ | 1678 | #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ |
| 1679 | #define S_NOSEC 4096 /* no suid or xattr security attributes */ | 1679 | #define S_NOSEC 4096 /* no suid or xattr security attributes */ |
| 1680 | #ifdef CONFIG_FS_XIP | ||
| 1681 | #define S_DAX 8192 /* Direct Access, avoiding the page cache */ | ||
| 1682 | #else | ||
| 1683 | #define S_DAX 0 /* Make all the DAX code disappear */ | ||
| 1684 | #endif | ||
| 1680 | 1685 | ||
| 1681 | /* | 1686 | /* |
| 1682 | * Note that nosuid etc flags are inode-specific: setting some file-system | 1687 | * Note that nosuid etc flags are inode-specific: setting some file-system |
| @@ -1714,6 +1719,7 @@ struct super_operations { | |||
| 1714 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) | 1719 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) |
| 1715 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) | 1720 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) |
| 1716 | #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) | 1721 | #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) |
| 1722 | #define IS_DAX(inode) ((inode)->i_flags & S_DAX) | ||
| 1717 | 1723 | ||
| 1718 | #define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \ | 1724 | #define IS_WHITEOUT(inode) (S_ISCHR(inode->i_mode) && \ |
| 1719 | (inode)->i_rdev == WHITEOUT_DEV) | 1725 | (inode)->i_rdev == WHITEOUT_DEV) |
