~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/linux/nfs_xdr.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
#include <linux/nfsacl.h>
5
5
#include <linux/nfs3.h>
 
6
#include <linux/sunrpc/gss_api.h>
6
7
 
7
8
/*
8
9
 * To change the maximum rsize and wsize supported by the NFS client, adjust
14
15
#define NFS_DEF_FILE_IO_SIZE    (4096U)
15
16
#define NFS_MIN_FILE_IO_SIZE    (1024U)
16
17
 
 
18
/* Forward declaration for NFS v3 */
 
19
struct nfs4_secinfo_flavors;
 
20
 
17
21
struct nfs_fsid {
18
22
        uint64_t                major;
19
23
        uint64_t                minor;
46
50
        } du;
47
51
        struct nfs_fsid         fsid;
48
52
        __u64                   fileid;
 
53
        __u64                   mounted_on_fileid;
49
54
        struct timespec         atime;
50
55
        struct timespec         mtime;
51
56
        struct timespec         ctime;
78
83
#define NFS_ATTR_FATTR_CHANGE           (1U << 17)
79
84
#define NFS_ATTR_FATTR_PRECHANGE        (1U << 18)
80
85
#define NFS_ATTR_FATTR_V4_REFERRAL      (1U << 19)      /* NFSv4 referral */
 
86
#define NFS_ATTR_FATTR_MOUNTPOINT       (1U << 20)      /* Treat as mountpoint */
 
87
#define NFS_ATTR_FATTR_MOUNTED_ON_FILEID                (1U << 21)
81
88
 
82
89
#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
83
90
                | NFS_ATTR_FATTR_MODE \
151
158
 
152
159
/* nfs41 sessions channel attributes */
153
160
struct nfs4_channel_attrs {
154
 
        u32                     headerpadsz;
155
161
        u32                     max_rqst_sz;
156
162
        u32                     max_resp_sz;
157
163
        u32                     max_resp_sz_cached;
190
196
#define PNFS_LAYOUT_MAXSIZE 4096
191
197
 
192
198
struct nfs4_layoutdriver_data {
 
199
        struct page **pages;
 
200
        __u32 pglen;
193
201
        __u32 len;
194
 
        void *buf;
195
202
};
196
203
 
197
204
struct pnfs_layout_range {
209
216
        struct nfs_open_context *ctx;
210
217
        struct nfs4_sequence_args seq_args;
211
218
        nfs4_stateid stateid;
 
219
        struct nfs4_layoutdriver_data layout;
212
220
};
213
221
 
214
222
struct nfs4_layoutget_res {
216
224
        struct pnfs_layout_range range;
217
225
        __u32 type;
218
226
        nfs4_stateid stateid;
219
 
        struct nfs4_layoutdriver_data layout;
220
227
        struct nfs4_sequence_res seq_res;
 
228
        struct nfs4_layoutdriver_data *layoutp;
221
229
};
222
230
 
223
231
struct nfs4_layoutget {
224
232
        struct nfs4_layoutget_args args;
225
233
        struct nfs4_layoutget_res res;
226
234
        struct pnfs_layout_segment **lsegpp;
 
235
        gfp_t gfp_flags;
227
236
};
228
237
 
229
238
struct nfs4_getdeviceinfo_args {
236
245
        struct nfs4_sequence_res seq_res;
237
246
};
238
247
 
 
248
struct nfs4_layoutcommit_args {
 
249
        nfs4_stateid stateid;
 
250
        __u64 lastbytewritten;
 
251
        struct inode *inode;
 
252
        const u32 *bitmask;
 
253
        struct nfs4_sequence_args seq_args;
 
254
};
 
255
 
 
256
struct nfs4_layoutcommit_res {
 
257
        struct nfs_fattr *fattr;
 
258
        const struct nfs_server *server;
 
259
        struct nfs4_sequence_res seq_res;
 
260
};
 
261
 
 
262
struct nfs4_layoutcommit_data {
 
263
        struct rpc_task task;
 
264
        struct nfs_fattr fattr;
 
265
        struct pnfs_layout_segment *lseg;
 
266
        struct rpc_cred *cred;
 
267
        struct nfs4_layoutcommit_args args;
 
268
        struct nfs4_layoutcommit_res res;
 
269
};
 
270
 
 
271
struct nfs4_layoutreturn_args {
 
272
        __u32   layout_type;
 
273
        struct inode *inode;
 
274
        nfs4_stateid stateid;
 
275
        struct nfs4_sequence_args seq_args;
 
276
};
 
277
 
 
278
struct nfs4_layoutreturn_res {
 
279
        struct nfs4_sequence_res seq_res;
 
280
        u32 lrs_present;
 
281
        nfs4_stateid stateid;
 
282
};
 
283
 
 
284
struct nfs4_layoutreturn {
 
285
        struct nfs4_layoutreturn_args args;
 
286
        struct nfs4_layoutreturn_res res;
 
287
        struct rpc_cred *cred;
 
288
        struct nfs_client *clp;
 
289
        int rpc_status;
 
290
};
 
291
 
239
292
/*
240
293
 * Arguments to the open call.
241
294
 */
936
989
        struct nfs4_sequence_res        seq_res;
937
990
};
938
991
 
 
992
struct nfs4_secinfo_oid {
 
993
        unsigned int len;
 
994
        char data[GSS_OID_MAX_LEN];
 
995
};
 
996
 
 
997
struct nfs4_secinfo_gss {
 
998
        struct nfs4_secinfo_oid sec_oid4;
 
999
        unsigned int qop4;
 
1000
        unsigned int service;
 
1001
};
 
1002
 
 
1003
struct nfs4_secinfo_flavor {
 
1004
        unsigned int            flavor;
 
1005
        struct nfs4_secinfo_gss gss;
 
1006
};
 
1007
 
 
1008
struct nfs4_secinfo_flavors {
 
1009
        unsigned int num_flavors;
 
1010
        struct nfs4_secinfo_flavor flavors[0];
 
1011
};
 
1012
 
 
1013
struct nfs4_secinfo_arg {
 
1014
        const struct nfs_fh             *dir_fh;
 
1015
        const struct qstr               *name;
 
1016
        struct nfs4_sequence_args       seq_args;
 
1017
};
 
1018
 
 
1019
struct nfs4_secinfo_res {
 
1020
        struct nfs4_secinfo_flavors     *flavors;
 
1021
        struct nfs4_sequence_res        seq_res;
 
1022
};
 
1023
 
939
1024
#endif /* CONFIG_NFS_V4 */
940
1025
 
941
1026
struct nfstime4 {
1016
1101
        unsigned int            npages; /* Max length of pagevec */
1017
1102
        struct nfs_readargs args;
1018
1103
        struct nfs_readres  res;
1019
 
#ifdef CONFIG_NFS_V4
1020
1104
        unsigned long           timestamp;      /* For lease renewal */
1021
 
#endif
 
1105
        struct pnfs_layout_segment *lseg;
 
1106
        struct nfs_client       *ds_clp;        /* pNFS data server */
 
1107
        const struct rpc_call_ops *mds_ops;
 
1108
        int (*read_done_cb) (struct rpc_task *task, struct nfs_read_data *data);
 
1109
        __u64                   mds_offset;
 
1110
        int                     pnfs_error;
1022
1111
        struct page             *page_array[NFS_PAGEVEC_SIZE];
1023
1112
};
1024
1113
 
1035
1124
        unsigned int            npages;         /* Max length of pagevec */
1036
1125
        struct nfs_writeargs    args;           /* argument struct */
1037
1126
        struct nfs_writeres     res;            /* result struct */
 
1127
        struct pnfs_layout_segment *lseg;
 
1128
        struct nfs_client       *ds_clp;        /* pNFS data server */
 
1129
        int                     ds_commit_index;
 
1130
        const struct rpc_call_ops *mds_ops;
 
1131
        int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data);
1038
1132
#ifdef CONFIG_NFS_V4
1039
1133
        unsigned long           timestamp;      /* For lease renewal */
1040
1134
#endif
 
1135
        __u64                   mds_offset;     /* Filelayout dense stripe */
 
1136
        int                     pnfs_error;
1041
1137
        struct page             *page_array[NFS_PAGEVEC_SIZE];
1042
1138
};
1043
1139
 
1044
1140
struct nfs_access_entry;
 
1141
struct nfs_client;
 
1142
struct rpc_timeout;
1045
1143
 
1046
1144
/*
1047
1145
 * RPC procedure vector for NFSv2/NFSv3 demuxing
1061
1159
                            struct nfs_fattr *);
1062
1160
        int     (*setattr) (struct dentry *, struct nfs_fattr *,
1063
1161
                            struct iattr *);
1064
 
        int     (*lookup)  (struct inode *, struct qstr *,
 
1162
        int     (*lookup)  (struct rpc_clnt *clnt, struct inode *, struct qstr *,
1065
1163
                            struct nfs_fh *, struct nfs_fattr *);
1066
1164
        int     (*access)  (struct inode *, struct nfs_access_entry *);
1067
1165
        int     (*readlink)(struct inode *, struct page *, unsigned int,
1106
1204
                                struct nfs_open_context *ctx,
1107
1205
                                int open_flags,
1108
1206
                                struct iattr *iattr);
 
1207
        int     (*init_client) (struct nfs_client *, const struct rpc_timeout *,
 
1208
                                const char *, rpc_authflavor_t, int);
 
1209
        int     (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
1109
1210
};
1110
1211
 
1111
1212
/*