aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@netapp.com>2014-09-26 13:58:48 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-09-30 16:24:56 -0400
commit1c6dcbe5ceff81c2cf8d929646af675cd59fe7c0 (patch)
tree1e432e1decca1b3a6de427db31db5737d997a7f5 /include/linux
parent4a3a0ebad1360696125bf34d89de55d71c4d0eaa (diff)
NFS: Implement SEEK
The SEEK operation is used when an application makes an lseek call with either the SEEK_HOLE or SEEK_DATA flags set. I fall back on nfs_file_llseek() if the server does not have SEEK support. 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.h3
-rw-r--r--include/linux/nfs_fs_sb.h1
-rw-r--r--include/linux/nfs_xdr.h19
3 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 026b0c042c40..356acc2846fd 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -487,6 +487,9 @@ enum {
487 NFSPROC4_CLNT_GETDEVICELIST, 487 NFSPROC4_CLNT_GETDEVICELIST,
488 NFSPROC4_CLNT_BIND_CONN_TO_SESSION, 488 NFSPROC4_CLNT_BIND_CONN_TO_SESSION,
489 NFSPROC4_CLNT_DESTROY_CLIENTID, 489 NFSPROC4_CLNT_DESTROY_CLIENTID,
490
491 /* nfs42 */
492 NFSPROC4_CLNT_SEEK,
490}; 493};
491 494
492/* nfs41 types */ 495/* nfs41 types */
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 922be2e050f5..a32ba0d7a98f 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -230,5 +230,6 @@ struct nfs_server {
230#define NFS_CAP_STATEID_NFSV41 (1U << 16) 230#define NFS_CAP_STATEID_NFSV41 (1U << 16)
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 234
234#endif 235#endif
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 0040629894df..0051b1ad2b37 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1239,6 +1239,25 @@ struct pnfs_ds_commit_info {
1239 1239
1240#endif /* CONFIG_NFS_V4_1 */ 1240#endif /* CONFIG_NFS_V4_1 */
1241 1241
1242#ifdef CONFIG_NFS_V4_2
1243struct nfs42_seek_args {
1244 struct nfs4_sequence_args seq_args;
1245
1246 struct nfs_fh *sa_fh;
1247 nfs4_stateid sa_stateid;
1248 u64 sa_offset;
1249 u32 sa_what;
1250};
1251
1252struct nfs42_seek_res {
1253 struct nfs4_sequence_res seq_res;
1254 unsigned int status;
1255
1256 u32 sr_eof;
1257 u64 sr_offset;
1258};
1259#endif
1260
1242struct nfs_page; 1261struct nfs_page;
1243 1262
1244#define NFS_PAGEVEC_SIZE (8U) 1263#define NFS_PAGEVEC_SIZE (8U)