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 /include/linux | |
| 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 'include/linux')
| -rw-r--r-- | include/linux/nfs4.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 23 |
3 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 134716e5e350..bf22cfaaeee5 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -560,6 +560,7 @@ enum { | |||
| 560 | NFSPROC4_CLNT_RECLAIM_COMPLETE, | 560 | NFSPROC4_CLNT_RECLAIM_COMPLETE, |
| 561 | NFSPROC4_CLNT_LAYOUTGET, | 561 | NFSPROC4_CLNT_LAYOUTGET, |
| 562 | NFSPROC4_CLNT_GETDEVICEINFO, | 562 | NFSPROC4_CLNT_GETDEVICEINFO, |
| 563 | NFSPROC4_CLNT_LAYOUTCOMMIT, | ||
| 563 | }; | 564 | }; |
| 564 | 565 | ||
| 565 | /* nfs41 types */ | 566 | /* nfs41 types */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 807e07c86b26..1b93b9c60e55 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -228,6 +228,7 @@ struct nfs_inode { | |||
| 228 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 228 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
| 229 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | 229 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ |
| 230 | #define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */ | 230 | #define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */ |
| 231 | #define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */ | ||
| 231 | 232 | ||
| 232 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 233 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
| 233 | { | 234 | { |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index ac0c0e51786e..84f3585c5728 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -236,6 +236,29 @@ struct nfs4_getdeviceinfo_res { | |||
| 236 | struct nfs4_sequence_res seq_res; | 236 | struct nfs4_sequence_res seq_res; |
| 237 | }; | 237 | }; |
| 238 | 238 | ||
| 239 | struct nfs4_layoutcommit_args { | ||
| 240 | nfs4_stateid stateid; | ||
| 241 | __u64 lastbytewritten; | ||
| 242 | struct inode *inode; | ||
| 243 | const u32 *bitmask; | ||
| 244 | struct nfs4_sequence_args seq_args; | ||
| 245 | }; | ||
| 246 | |||
| 247 | struct nfs4_layoutcommit_res { | ||
| 248 | struct nfs_fattr *fattr; | ||
| 249 | const struct nfs_server *server; | ||
| 250 | struct nfs4_sequence_res seq_res; | ||
| 251 | }; | ||
| 252 | |||
| 253 | struct nfs4_layoutcommit_data { | ||
| 254 | struct rpc_task task; | ||
| 255 | struct nfs_fattr fattr; | ||
| 256 | struct pnfs_layout_segment *lseg; | ||
| 257 | struct rpc_cred *cred; | ||
| 258 | struct nfs4_layoutcommit_args args; | ||
| 259 | struct nfs4_layoutcommit_res res; | ||
| 260 | }; | ||
| 261 | |||
| 239 | /* | 262 | /* |
| 240 | * Arguments to the open call. | 263 | * Arguments to the open call. |
| 241 | */ | 264 | */ |
