diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-06-25 23:24:46 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-07-06 01:11:06 +0200 |
commit | 651b0e702981304f77091b82870a01480705f4fe (patch) | |
tree | 27c5134920cb995716b419e9b6a4635e03b639c9 /fs/nfs/internal.h | |
parent | NFS: Remove unused function nfs_revalidate_mapping_protected() (diff) | |
download | linux-651b0e702981304f77091b82870a01480705f4fe.tar.xz linux-651b0e702981304f77091b82870a01480705f4fe.zip |
NFS: Do not aggressively cache file attributes in the case of O_DIRECT
A file that is open for O_DIRECT is by definition not obeying
close-to-open cache consistency semantics, so let's not cache
the attributes too aggressively either.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r-- | fs/nfs/internal.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 159b64ede82a..01dccf18da0a 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -419,6 +419,11 @@ extern void nfs_end_io_write(struct inode *inode); extern void nfs_start_io_direct(struct inode *inode); extern void nfs_end_io_direct(struct inode *inode); +static inline bool nfs_file_io_is_buffered(struct nfs_inode *nfsi) +{ + return test_bit(NFS_INO_ODIRECT, &nfsi->flags) == 0; +} + /* namespace.c */ #define NFS_PATH_CANONICAL 1 extern char *nfs_path(char **p, struct dentry *dentry, |