aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 13:39:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 13:39:41 -0500
commit61845143febe6b88349acad4732adc54894009a3 (patch)
treebed6a23efe05b9867b8b4d1f4d251fc1c562e7e4 /include/linux/fs.h
parenta26be149facb22d30cd92cadb26f651d6fe802c9 (diff)
parentc23ae6017835b5bc9b9ec9d5d9c2b1523053f503 (diff)
Merge branch 'for-3.20' of git://linux-nfs.org/~bfields/linux
Pull nfsd updates from Bruce Fields: "The main change is the pNFS block server support from Christoph, which allows an NFS client connected to shared disk to do block IO to the shared disk in place of NFS reads and writes. This also requires xfs patches, which should arrive soon through the xfs tree, barring unexpected problems. Support for other filesystems is also possible if there's interest. Thanks also to Chuck Lever for continuing work to get NFS/RDMA into shape" * 'for-3.20' of git://linux-nfs.org/~bfields/linux: (32 commits) nfsd: default NFSv4.2 to on nfsd: pNFS block layout driver exportfs: add methods for block layout exports nfsd: add trace events nfsd: update documentation for pNFS support nfsd: implement pNFS layout recalls nfsd: implement pNFS operations nfsd: make find_any_file available outside nfs4state.c nfsd: make find/get/put file available outside nfs4state.c nfsd: make lookup/alloc/unhash_stid available outside nfs4state.c nfsd: add fh_fsid_match helper nfsd: move nfsd_fh_match to nfsfh.h fs: add FL_LAYOUT lease type fs: track fl_owner for leases nfs: add LAYOUT_TYPE_MAX enum value nfsd: factor out a helper to decode nfstime4 values sunrpc/lockd: fix references to the BKL nfsd: fix year-2038 nfs4 state problem svcrdma: Handle additional inline content svcrdma: Move read list XDR round-up logic ...
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f125b88443bd..cdcb1e9d9613 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -873,6 +873,7 @@ static inline struct file *get_file(struct file *f)
873#define FL_DOWNGRADE_PENDING 256 /* Lease is being downgraded */ 873#define FL_DOWNGRADE_PENDING 256 /* Lease is being downgraded */
874#define FL_UNLOCK_PENDING 512 /* Lease is being broken */ 874#define FL_UNLOCK_PENDING 512 /* Lease is being broken */
875#define FL_OFDLCK 1024 /* lock is "owned" by struct file */ 875#define FL_OFDLCK 1024 /* lock is "owned" by struct file */
876#define FL_LAYOUT 2048 /* outstanding pNFS layout */
876 877
877/* 878/*
878 * Special return value from posix_lock_file() and vfs_lock_file() for 879 * Special return value from posix_lock_file() and vfs_lock_file() for
@@ -2035,6 +2036,16 @@ static inline int break_deleg_wait(struct inode **delegated_inode)
2035 return ret; 2036 return ret;
2036} 2037}
2037 2038
2039static inline int break_layout(struct inode *inode, bool wait)
2040{
2041 smp_mb();
2042 if (inode->i_flctx && !list_empty_careful(&inode->i_flctx->flc_lease))
2043 return __break_lease(inode,
2044 wait ? O_WRONLY : O_WRONLY | O_NONBLOCK,
2045 FL_LAYOUT);
2046 return 0;
2047}
2048
2038#else /* !CONFIG_FILE_LOCKING */ 2049#else /* !CONFIG_FILE_LOCKING */
2039static inline int locks_mandatory_locked(struct file *file) 2050static inline int locks_mandatory_locked(struct file *file)
2040{ 2051{
@@ -2090,6 +2101,11 @@ static inline int break_deleg_wait(struct inode **delegated_inode)
2090 return 0; 2101 return 0;
2091} 2102}
2092 2103
2104static inline int break_layout(struct inode *inode, bool wait)
2105{
2106 return 0;
2107}
2108
2093#endif /* CONFIG_FILE_LOCKING */ 2109#endif /* CONFIG_FILE_LOCKING */
2094 2110
2095/* fs/open.c */ 2111/* fs/open.c */