aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-06-25 17:24:46 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-07-05 19:11:06 -0400
commit651b0e702981304f77091b82870a01480705f4fe (patch)
tree27c5134920cb995716b419e9b6a4635e03b639c9 /fs/nfs/internal.h
parentNFS: Remove unused function nfs_revalidate_mapping_protected() (diff)
downloadlinux-dev-651b0e702981304f77091b82870a01480705f4fe.tar.xz
linux-dev-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.h5
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,