aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h70
1 files changed, 67 insertions, 3 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 2c2c67d2eb42..78b101e487ea 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/nfsacl.h> 4#include <linux/nfsacl.h>
5#include <linux/nfs3.h> 5#include <linux/nfs3.h>
6#include <linux/sunrpc/gss_api.h>
6 7
7/* 8/*
8 * To change the maximum rsize and wsize supported by the NFS client, adjust 9 * To change the maximum rsize and wsize supported by the NFS client, adjust
@@ -14,6 +15,9 @@
14#define NFS_DEF_FILE_IO_SIZE (4096U) 15#define NFS_DEF_FILE_IO_SIZE (4096U)
15#define NFS_MIN_FILE_IO_SIZE (1024U) 16#define NFS_MIN_FILE_IO_SIZE (1024U)
16 17
18/* Forward declaration for NFS v3 */
19struct nfs4_secinfo_flavors;
20
17struct nfs_fsid { 21struct nfs_fsid {
18 uint64_t major; 22 uint64_t major;
19 uint64_t minor; 23 uint64_t minor;
@@ -78,6 +82,7 @@ struct nfs_fattr {
78#define NFS_ATTR_FATTR_CHANGE (1U << 17) 82#define NFS_ATTR_FATTR_CHANGE (1U << 17)
79#define NFS_ATTR_FATTR_PRECHANGE (1U << 18) 83#define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
80#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ 84#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */
85#define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */
81 86
82#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ 87#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
83 | NFS_ATTR_FATTR_MODE \ 88 | NFS_ATTR_FATTR_MODE \
@@ -190,8 +195,9 @@ struct nfs4_get_lease_time_res {
190#define PNFS_LAYOUT_MAXSIZE 4096 195#define PNFS_LAYOUT_MAXSIZE 4096
191 196
192struct nfs4_layoutdriver_data { 197struct nfs4_layoutdriver_data {
198 struct page **pages;
199 __u32 pglen;
193 __u32 len; 200 __u32 len;
194 void *buf;
195}; 201};
196 202
197struct pnfs_layout_range { 203struct pnfs_layout_range {
@@ -209,6 +215,7 @@ struct nfs4_layoutget_args {
209 struct nfs_open_context *ctx; 215 struct nfs_open_context *ctx;
210 struct nfs4_sequence_args seq_args; 216 struct nfs4_sequence_args seq_args;
211 nfs4_stateid stateid; 217 nfs4_stateid stateid;
218 struct nfs4_layoutdriver_data layout;
212}; 219};
213 220
214struct nfs4_layoutget_res { 221struct nfs4_layoutget_res {
@@ -216,8 +223,8 @@ struct nfs4_layoutget_res {
216 struct pnfs_layout_range range; 223 struct pnfs_layout_range range;
217 __u32 type; 224 __u32 type;
218 nfs4_stateid stateid; 225 nfs4_stateid stateid;
219 struct nfs4_layoutdriver_data layout;
220 struct nfs4_sequence_res seq_res; 226 struct nfs4_sequence_res seq_res;
227 struct nfs4_layoutdriver_data *layoutp;
221}; 228};
222 229
223struct nfs4_layoutget { 230struct nfs4_layoutget {
@@ -236,6 +243,29 @@ struct nfs4_getdeviceinfo_res {
236 struct nfs4_sequence_res seq_res; 243 struct nfs4_sequence_res seq_res;
237}; 244};
238 245
246struct nfs4_layoutcommit_args {
247 nfs4_stateid stateid;
248 __u64 lastbytewritten;
249 struct inode *inode;
250 const u32 *bitmask;
251 struct nfs4_sequence_args seq_args;
252};
253
254struct nfs4_layoutcommit_res {
255 struct nfs_fattr *fattr;
256 const struct nfs_server *server;
257 struct nfs4_sequence_res seq_res;
258};
259
260struct nfs4_layoutcommit_data {
261 struct rpc_task task;
262 struct nfs_fattr fattr;
263 struct pnfs_layout_segment *lseg;
264 struct rpc_cred *cred;
265 struct nfs4_layoutcommit_args args;
266 struct nfs4_layoutcommit_res res;
267};
268
239/* 269/*
240 * Arguments to the open call. 270 * Arguments to the open call.
241 */ 271 */
@@ -936,6 +966,38 @@ struct nfs4_fs_locations_res {
936 struct nfs4_sequence_res seq_res; 966 struct nfs4_sequence_res seq_res;
937}; 967};
938 968
969struct nfs4_secinfo_oid {
970 unsigned int len;
971 char data[GSS_OID_MAX_LEN];
972};
973
974struct nfs4_secinfo_gss {
975 struct nfs4_secinfo_oid sec_oid4;
976 unsigned int qop4;
977 unsigned int service;
978};
979
980struct nfs4_secinfo_flavor {
981 unsigned int flavor;
982 struct nfs4_secinfo_gss gss;
983};
984
985struct nfs4_secinfo_flavors {
986 unsigned int num_flavors;
987 struct nfs4_secinfo_flavor flavors[0];
988};
989
990struct nfs4_secinfo_arg {
991 const struct nfs_fh *dir_fh;
992 const struct qstr *name;
993 struct nfs4_sequence_args seq_args;
994};
995
996struct nfs4_secinfo_res {
997 struct nfs4_secinfo_flavors *flavors;
998 struct nfs4_sequence_res seq_res;
999};
1000
939#endif /* CONFIG_NFS_V4 */ 1001#endif /* CONFIG_NFS_V4 */
940 1002
941struct nfstime4 { 1003struct nfstime4 {
@@ -1040,6 +1102,7 @@ struct nfs_write_data {
1040 struct nfs_writeres res; /* result struct */ 1102 struct nfs_writeres res; /* result struct */
1041 struct pnfs_layout_segment *lseg; 1103 struct pnfs_layout_segment *lseg;
1042 struct nfs_client *ds_clp; /* pNFS data server */ 1104 struct nfs_client *ds_clp; /* pNFS data server */
1105 int ds_commit_index;
1043 const struct rpc_call_ops *mds_ops; 1106 const struct rpc_call_ops *mds_ops;
1044 int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); 1107 int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data);
1045#ifdef CONFIG_NFS_V4 1108#ifdef CONFIG_NFS_V4
@@ -1071,7 +1134,7 @@ struct nfs_rpc_ops {
1071 struct nfs_fattr *); 1134 struct nfs_fattr *);
1072 int (*setattr) (struct dentry *, struct nfs_fattr *, 1135 int (*setattr) (struct dentry *, struct nfs_fattr *,
1073 struct iattr *); 1136 struct iattr *);
1074 int (*lookup) (struct inode *, struct qstr *, 1137 int (*lookup) (struct rpc_clnt *clnt, struct inode *, struct qstr *,
1075 struct nfs_fh *, struct nfs_fattr *); 1138 struct nfs_fh *, struct nfs_fattr *);
1076 int (*access) (struct inode *, struct nfs_access_entry *); 1139 int (*access) (struct inode *, struct nfs_access_entry *);
1077 int (*readlink)(struct inode *, struct page *, unsigned int, 1140 int (*readlink)(struct inode *, struct page *, unsigned int,
@@ -1118,6 +1181,7 @@ struct nfs_rpc_ops {
1118 struct iattr *iattr); 1181 struct iattr *iattr);
1119 int (*init_client) (struct nfs_client *, const struct rpc_timeout *, 1182 int (*init_client) (struct nfs_client *, const struct rpc_timeout *,
1120 const char *, rpc_authflavor_t, int); 1183 const char *, rpc_authflavor_t, int);
1184 int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
1121}; 1185};
1122 1186
1123/* 1187/*