diff options
author | Andy Adamson <andros@netapp.com> | 2011-03-23 09:27:54 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-23 15:29:04 -0400 |
commit | 863a3c6c686d5773f7192a4818769e15db12ce08 (patch) | |
tree | 3ff8bf04c583aa0c16ae30b0821bc9148d49a47a /fs/nfs/pnfs.h | |
parent | e0c2b3801828aadb65dec9f67f7c6b7a675ad007 (diff) |
NFSv4.1: layoutcommit
The filelayout driver sends LAYOUTCOMMIT only when COMMIT goes to
the data server (as opposed to the MDS) and the data server WRITE
is not NFS_FILE_SYNC.
Only whole file layout support means that there is only one IOMODE_RW layout
segment.
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Alexandros Batsakis <batsakis@netapp.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Dean Hildebrand <dhildeb@us.ibm.com>
Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Mingyang Guo <guomingyang@nrchpc.ac.cn>
Signed-off-by: Tao Guo <guotao@nrchpc.ac.cn>
Signed-off-by: Zhang Jingwang <zhangjingwang@nrchpc.ac.cn>
Tested-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.h')
-rw-r--r-- | fs/nfs/pnfs.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 5370f1b9aa43..0806c77862b6 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h | |||
@@ -43,6 +43,8 @@ struct pnfs_layout_segment { | |||
43 | atomic_t pls_refcount; | 43 | atomic_t pls_refcount; |
44 | unsigned long pls_flags; | 44 | unsigned long pls_flags; |
45 | struct pnfs_layout_hdr *pls_layout; | 45 | struct pnfs_layout_hdr *pls_layout; |
46 | struct rpc_cred *pls_lc_cred; /* LAYOUTCOMMIT credential */ | ||
47 | loff_t pls_end_pos; /* LAYOUTCOMMIT write end */ | ||
46 | }; | 48 | }; |
47 | 49 | ||
48 | enum pnfs_try_status { | 50 | enum pnfs_try_status { |
@@ -152,7 +154,8 @@ bool pnfs_roc(struct inode *ino); | |||
152 | void pnfs_roc_release(struct inode *ino); | 154 | void pnfs_roc_release(struct inode *ino); |
153 | void pnfs_roc_set_barrier(struct inode *ino, u32 barrier); | 155 | void pnfs_roc_set_barrier(struct inode *ino, u32 barrier); |
154 | bool pnfs_roc_drain(struct inode *ino, u32 *barrier); | 156 | bool pnfs_roc_drain(struct inode *ino, u32 *barrier); |
155 | 157 | void pnfs_set_layoutcommit(struct nfs_write_data *wdata); | |
158 | int pnfs_layoutcommit_inode(struct inode *inode, int sync); | ||
156 | 159 | ||
157 | static inline int lo_fail_bit(u32 iomode) | 160 | static inline int lo_fail_bit(u32 iomode) |
158 | { | 161 | { |
@@ -325,6 +328,10 @@ static inline void pnfs_clear_request_commit(struct nfs_page *req) | |||
325 | { | 328 | { |
326 | } | 329 | } |
327 | 330 | ||
331 | static inline int pnfs_layoutcommit_inode(struct inode *inode, int sync) | ||
332 | { | ||
333 | return 0; | ||
334 | } | ||
328 | #endif /* CONFIG_NFS_V4_1 */ | 335 | #endif /* CONFIG_NFS_V4_1 */ |
329 | 336 | ||
330 | #endif /* FS_NFS_PNFS_H */ | 337 | #endif /* FS_NFS_PNFS_H */ |