diff options
| author | Anna Schumaker <Anna.Schumaker@netapp.com> | 2014-11-25 13:18:15 -0500 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-11-25 16:38:32 -0500 |
| commit | f4ac1674f5da420ef17896f0f222c5215ebcde80 (patch) | |
| tree | 5ad22eac7b8ef584ce1b39b618aeb0b242dcccb7 /include/linux | |
| parent | e9f456ca50e579dfacd996f50637f0bb0a585dfc (diff) | |
nfs: Add ALLOCATE support
This patch adds support for using the NFS v4.2 operation ALLOCATE to
preallocate data in a file.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfs4.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs_sb.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 14 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 356acc2846fd..2b28a21edcd0 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -490,6 +490,7 @@ enum { | |||
| 490 | 490 | ||
| 491 | /* nfs42 */ | 491 | /* nfs42 */ |
| 492 | NFSPROC4_CLNT_SEEK, | 492 | NFSPROC4_CLNT_SEEK, |
| 493 | NFSPROC4_CLNT_ALLOCATE, | ||
| 493 | }; | 494 | }; |
| 494 | 495 | ||
| 495 | /* nfs41 types */ | 496 | /* nfs41 types */ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index a32ba0d7a98f..df6ed429b406 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -231,5 +231,6 @@ struct nfs_server { | |||
| 231 | #define NFS_CAP_ATOMIC_OPEN_V1 (1U << 17) | 231 | #define NFS_CAP_ATOMIC_OPEN_V1 (1U << 17) |
| 232 | #define NFS_CAP_SECURITY_LABEL (1U << 18) | 232 | #define NFS_CAP_SECURITY_LABEL (1U << 18) |
| 233 | #define NFS_CAP_SEEK (1U << 19) | 233 | #define NFS_CAP_SEEK (1U << 19) |
| 234 | #define NFS_CAP_ALLOCATE (1U << 20) | ||
| 234 | 235 | ||
| 235 | #endif | 236 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 47ebb4fafd87..467c84efb596 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -1243,6 +1243,20 @@ nfs_free_pnfs_ds_cinfo(struct pnfs_ds_commit_info *cinfo) | |||
| 1243 | #endif /* CONFIG_NFS_V4_1 */ | 1243 | #endif /* CONFIG_NFS_V4_1 */ |
| 1244 | 1244 | ||
| 1245 | #ifdef CONFIG_NFS_V4_2 | 1245 | #ifdef CONFIG_NFS_V4_2 |
| 1246 | struct nfs42_falloc_args { | ||
| 1247 | struct nfs4_sequence_args seq_args; | ||
| 1248 | |||
| 1249 | struct nfs_fh *falloc_fh; | ||
| 1250 | nfs4_stateid falloc_stateid; | ||
| 1251 | u64 falloc_offset; | ||
| 1252 | u64 falloc_length; | ||
| 1253 | }; | ||
| 1254 | |||
| 1255 | struct nfs42_falloc_res { | ||
| 1256 | struct nfs4_sequence_res seq_res; | ||
| 1257 | unsigned int status; | ||
| 1258 | }; | ||
| 1259 | |||
| 1246 | struct nfs42_seek_args { | 1260 | struct nfs42_seek_args { |
| 1247 | struct nfs4_sequence_args seq_args; | 1261 | struct nfs4_sequence_args seq_args; |
| 1248 | 1262 | ||
