blob: 0f2dc8f4cc36b4d61d41de04cd41fc5a7baa6bc0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINUX_NFS_XDR_H
2#define _LINUX_NFS_XDR_H
3
Andreas Gruenbacherb7fa0552005-06-22 17:16:27 +00004#include <linux/nfsacl.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Chuck Lever40859d72005-11-30 18:09:02 -05006/*
7 * To change the maximum rsize and wsize supported by the NFS client, adjust
8 * NFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can
9 * support a megabyte or more. The default is left at 4096 bytes, which is
10 * reasonable for NFS over UDP.
11 */
12#define NFS_MAX_FILE_IO_SIZE (1048576U)
13#define NFS_DEF_FILE_IO_SIZE (4096U)
14#define NFS_MIN_FILE_IO_SIZE (1024U)
15
Trond Myklebust8b4bdcf2006-06-09 09:34:19 -040016struct nfs_fsid {
17 uint64_t major;
18 uint64_t minor;
Linus Torvalds1da177e2005-04-16 15:20:36 -070019};
20
Trond Myklebust8b4bdcf2006-06-09 09:34:19 -040021/*
22 * Helper for checking equality between 2 fsids.
23 */
24static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b)
25{
26 return a->major == b->major && a->minor == b->minor;
27}
28
Linus Torvalds1da177e2005-04-16 15:20:36 -070029struct nfs_fattr {
Trond Myklebust9e6e70f2009-03-11 14:10:24 -040030 unsigned int valid; /* which fields are valid */
Trond Myklebustbca79472009-03-11 14:10:26 -040031 umode_t mode;
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 __u32 nlink;
33 __u32 uid;
34 __u32 gid;
Richard Kennedy9fa8d662008-08-26 16:23:20 +010035 dev_t rdev;
Linus Torvalds1da177e2005-04-16 15:20:36 -070036 __u64 size;
37 union {
38 struct {
39 __u32 blocksize;
40 __u32 blocks;
41 } nfs2;
42 struct {
43 __u64 used;
44 } nfs3;
45 } du;
Trond Myklebust8b4bdcf2006-06-09 09:34:19 -040046 struct nfs_fsid fsid;
Linus Torvalds1da177e2005-04-16 15:20:36 -070047 __u64 fileid;
48 struct timespec atime;
49 struct timespec mtime;
50 struct timespec ctime;
Linus Torvalds1da177e2005-04-16 15:20:36 -070051 __u64 change_attr; /* NFSv4 change attribute */
52 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
Trond Myklebust1ca277d2009-03-11 14:10:25 -040053 __u64 pre_size; /* pre_op_attr.size */
54 struct timespec pre_mtime; /* pre_op_attr.mtime */
55 struct timespec pre_ctime; /* pre_op_attr.ctime */
Trond Myklebust33801142005-10-27 22:12:39 -040056 unsigned long time_start;
Trond Myklebust4704f0e2008-10-14 19:16:07 -040057 unsigned long gencount;
Linus Torvalds1da177e2005-04-16 15:20:36 -070058};
59
Trond Myklebust9e6e70f2009-03-11 14:10:24 -040060#define NFS_ATTR_FATTR_TYPE (1U << 0)
61#define NFS_ATTR_FATTR_MODE (1U << 1)
62#define NFS_ATTR_FATTR_NLINK (1U << 2)
63#define NFS_ATTR_FATTR_OWNER (1U << 3)
64#define NFS_ATTR_FATTR_GROUP (1U << 4)
65#define NFS_ATTR_FATTR_RDEV (1U << 5)
66#define NFS_ATTR_FATTR_SIZE (1U << 6)
67#define NFS_ATTR_FATTR_PRESIZE (1U << 7)
68#define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8)
69#define NFS_ATTR_FATTR_SPACE_USED (1U << 9)
70#define NFS_ATTR_FATTR_FSID (1U << 10)
71#define NFS_ATTR_FATTR_FILEID (1U << 11)
72#define NFS_ATTR_FATTR_ATIME (1U << 12)
73#define NFS_ATTR_FATTR_MTIME (1U << 13)
74#define NFS_ATTR_FATTR_CTIME (1U << 14)
75#define NFS_ATTR_FATTR_PREMTIME (1U << 15)
76#define NFS_ATTR_FATTR_PRECTIME (1U << 16)
77#define NFS_ATTR_FATTR_CHANGE (1U << 17)
78#define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
79#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */
80
81#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
82 | NFS_ATTR_FATTR_MODE \
83 | NFS_ATTR_FATTR_NLINK \
84 | NFS_ATTR_FATTR_OWNER \
85 | NFS_ATTR_FATTR_GROUP \
86 | NFS_ATTR_FATTR_RDEV \
87 | NFS_ATTR_FATTR_SIZE \
88 | NFS_ATTR_FATTR_FSID \
89 | NFS_ATTR_FATTR_FILEID \
90 | NFS_ATTR_FATTR_ATIME \
91 | NFS_ATTR_FATTR_MTIME \
92 | NFS_ATTR_FATTR_CTIME)
93#define NFS_ATTR_FATTR_V2 (NFS_ATTR_FATTR \
94 | NFS_ATTR_FATTR_BLOCKS_USED)
95#define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \
96 | NFS_ATTR_FATTR_SPACE_USED)
97#define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \
98 | NFS_ATTR_FATTR_SPACE_USED \
99 | NFS_ATTR_FATTR_CHANGE)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100
101/*
102 * Info on the file system
103 */
104struct nfs_fsinfo {
105 struct nfs_fattr *fattr; /* Post-op attributes */
106 __u32 rtmax; /* max. read transfer size */
107 __u32 rtpref; /* pref. read transfer size */
108 __u32 rtmult; /* reads should be multiple of this */
109 __u32 wtmax; /* max. write transfer size */
110 __u32 wtpref; /* pref. write transfer size */
111 __u32 wtmult; /* writes should be multiple of this */
112 __u32 dtpref; /* pref. readdir transfer size */
113 __u64 maxfilesize;
114 __u32 lease_time; /* in seconds */
115};
116
117struct nfs_fsstat {
118 struct nfs_fattr *fattr; /* Post-op attributes */
119 __u64 tbytes; /* total size in bytes */
120 __u64 fbytes; /* # of free bytes */
121 __u64 abytes; /* # of bytes available to user */
122 __u64 tfiles; /* # of files */
123 __u64 ffiles; /* # of free files */
124 __u64 afiles; /* # of files available to user */
125};
126
127struct nfs2_fsstat {
128 __u32 tsize; /* Server transfer size */
129 __u32 bsize; /* Filesystem block size */
130 __u32 blocks; /* No. of "bsize" blocks on filesystem */
131 __u32 bfree; /* No. of free "bsize" blocks */
132 __u32 bavail; /* No. of available "bsize" blocks */
133};
134
135struct nfs_pathconf {
136 struct nfs_fattr *fattr; /* Post-op attributes */
137 __u32 max_link; /* max # of hard links */
138 __u32 max_namelen; /* max name length */
139};
140
141struct nfs4_change_info {
142 u32 atomic;
143 u64 before;
144 u64 after;
145};
146
Trond Myklebustcee54fc2005-10-18 14:20:12 -0700147struct nfs_seqid;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400148
Andy Adamson557134a2009-04-01 09:21:53 -0400149/* nfs41 sessions channel attributes */
150struct nfs4_channel_attrs {
151 u32 headerpadsz;
152 u32 max_rqst_sz;
153 u32 max_resp_sz;
154 u32 max_resp_sz_cached;
155 u32 max_ops;
156 u32 max_reqs;
157};
158
159/* nfs41 sessions slot seqid */
160struct nfs4_slot {
161 u32 seq_nr;
162};
163
Benny Halevy9ff71c32009-04-01 09:21:52 -0400164struct nfs4_sequence_args {
165 /* stub */
166};
167
168struct nfs4_sequence_res {
169 /* stub */
170};
171
Linus Torvalds1da177e2005-04-16 15:20:36 -0700172/*
173 * Arguments to the open call.
174 */
175struct nfs_openargs {
176 const struct nfs_fh * fh;
Trond Myklebustcee54fc2005-10-18 14:20:12 -0700177 struct nfs_seqid * seqid;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700178 int open_flags;
Trond Myklebustdc0b0272008-12-23 15:21:56 -0500179 fmode_t fmode;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700180 __u64 clientid;
Trond Myklebust9f958ab2007-07-02 13:58:33 -0400181 __u64 id;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182 union {
183 struct iattr * attrs; /* UNCHECKED, GUARDED */
184 nfs4_verifier verifier; /* EXCLUSIVE */
185 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
Trond Myklebustbd7bf9d2008-12-23 15:21:53 -0500186 fmode_t delegation_type; /* CLAIM_PREVIOUS */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187 } u;
188 const struct qstr * name;
189 const struct nfs_server *server; /* Needed for ID mapping */
190 const u32 * bitmask;
191 __u32 claim;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400192 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700193};
194
195struct nfs_openres {
196 nfs4_stateid stateid;
197 struct nfs_fh fh;
198 struct nfs4_change_info cinfo;
199 __u32 rflags;
200 struct nfs_fattr * f_attr;
Trond Myklebust56ae19f2005-10-27 22:12:40 -0400201 struct nfs_fattr * dir_attr;
Trond Myklebustc1d51932008-04-07 13:20:54 -0400202 struct nfs_seqid * seqid;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203 const struct nfs_server *server;
Trond Myklebustbd7bf9d2008-12-23 15:21:53 -0500204 fmode_t delegation_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700205 nfs4_stateid delegation;
206 __u32 do_recall;
207 __u64 maxsize;
Jeff Laytonaa53ed52007-06-05 14:49:03 -0400208 __u32 attrset[NFS4_BITMAP_SIZE];
Benny Halevy9ff71c32009-04-01 09:21:52 -0400209 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210};
211
212/*
213 * Arguments to the open_confirm call.
214 */
215struct nfs_open_confirmargs {
216 const struct nfs_fh * fh;
Trond Myklebustcdd4e682006-01-03 09:55:12 +0100217 nfs4_stateid * stateid;
Trond Myklebustcee54fc2005-10-18 14:20:12 -0700218 struct nfs_seqid * seqid;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219};
220
221struct nfs_open_confirmres {
222 nfs4_stateid stateid;
Trond Myklebustc1d51932008-04-07 13:20:54 -0400223 struct nfs_seqid * seqid;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224};
225
226/*
227 * Arguments to the close call.
228 */
229struct nfs_closeargs {
230 struct nfs_fh * fh;
Trond Myklebust95121352005-10-18 14:20:12 -0700231 nfs4_stateid * stateid;
Trond Myklebustcee54fc2005-10-18 14:20:12 -0700232 struct nfs_seqid * seqid;
Trond Myklebustdc0b0272008-12-23 15:21:56 -0500233 fmode_t fmode;
Trond Myklebust516a6af2005-10-27 22:12:41 -0400234 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400235 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236};
237
238struct nfs_closeres {
239 nfs4_stateid stateid;
Trond Myklebust516a6af2005-10-27 22:12:41 -0400240 struct nfs_fattr * fattr;
Trond Myklebustc1d51932008-04-07 13:20:54 -0400241 struct nfs_seqid * seqid;
Trond Myklebust516a6af2005-10-27 22:12:41 -0400242 const struct nfs_server *server;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400243 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700244};
245/*
246 * * Arguments to the lock,lockt, and locku call.
247 * */
248struct nfs_lowner {
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100249 __u64 clientid;
Trond Myklebust9f958ab2007-07-02 13:58:33 -0400250 __u64 id;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700251};
252
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100253struct nfs_lock_args {
254 struct nfs_fh * fh;
255 struct file_lock * fl;
Trond Myklebust06735b32005-10-18 14:20:15 -0700256 struct nfs_seqid * lock_seqid;
257 nfs4_stateid * lock_stateid;
258 struct nfs_seqid * open_seqid;
259 nfs4_stateid * open_stateid;
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100260 struct nfs_lowner lock_owner;
261 unsigned char block : 1;
262 unsigned char reclaim : 1;
263 unsigned char new_lock_owner : 1;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400264 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700265};
266
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100267struct nfs_lock_res {
Trond Myklebustc1d51932008-04-07 13:20:54 -0400268 nfs4_stateid stateid;
269 struct nfs_seqid * lock_seqid;
270 struct nfs_seqid * open_seqid;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400271 struct nfs4_sequence_res seq_res;
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100272};
273
274struct nfs_locku_args {
275 struct nfs_fh * fh;
276 struct file_lock * fl;
Trond Myklebustcee54fc2005-10-18 14:20:12 -0700277 struct nfs_seqid * seqid;
Trond Myklebustfaf5f492005-10-18 14:20:15 -0700278 nfs4_stateid * stateid;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400279 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280};
281
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100282struct nfs_locku_res {
Trond Myklebustc1d51932008-04-07 13:20:54 -0400283 nfs4_stateid stateid;
284 struct nfs_seqid * seqid;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400285 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700286};
287
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100288struct nfs_lockt_args {
289 struct nfs_fh * fh;
290 struct file_lock * fl;
291 struct nfs_lowner lock_owner;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400292 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700293};
294
Trond Myklebust911d1aa2006-01-03 09:55:16 +0100295struct nfs_lockt_res {
296 struct file_lock * denied; /* LOCK, LOCKT failed */
Benny Halevy9ff71c32009-04-01 09:21:52 -0400297 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700298};
299
300struct nfs4_delegreturnargs {
301 const struct nfs_fh *fhandle;
302 const nfs4_stateid *stateid;
Trond Myklebustfa178f22006-01-03 09:55:38 +0100303 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400304 struct nfs4_sequence_args seq_args;
Trond Myklebustfa178f22006-01-03 09:55:38 +0100305};
306
307struct nfs4_delegreturnres {
308 struct nfs_fattr * fattr;
309 const struct nfs_server *server;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400310 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700311};
312
313/*
314 * Arguments to the read call.
315 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700316struct nfs_readargs {
317 struct nfs_fh * fh;
318 struct nfs_open_context *context;
319 __u64 offset;
320 __u32 count;
321 unsigned int pgbase;
322 struct page ** pages;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400323 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700324};
325
326struct nfs_readres {
327 struct nfs_fattr * fattr;
328 __u32 count;
329 int eof;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400330 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331};
332
333/*
334 * Arguments to the write call.
335 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700336struct nfs_writeargs {
337 struct nfs_fh * fh;
338 struct nfs_open_context *context;
339 __u64 offset;
340 __u32 count;
341 enum nfs3_stable_how stable;
342 unsigned int pgbase;
343 struct page ** pages;
Trond Myklebust4f9838c2005-10-27 22:12:44 -0400344 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400345 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700346};
347
348struct nfs_writeverf {
349 enum nfs3_stable_how committed;
Al Virobc4785c2006-10-19 23:28:51 -0700350 __be32 verifier[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351};
352
353struct nfs_writeres {
354 struct nfs_fattr * fattr;
355 struct nfs_writeverf * verf;
356 __u32 count;
Trond Myklebust4f9838c2005-10-27 22:12:44 -0400357 const struct nfs_server *server;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400358 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700359};
360
361/*
Trond Myklebust4fdc17b2007-07-14 15:39:57 -0400362 * Common arguments to the unlink call
363 */
364struct nfs_removeargs {
365 const struct nfs_fh *fh;
366 struct qstr name;
367 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400368 struct nfs4_sequence_args seq_args;
Trond Myklebust4fdc17b2007-07-14 15:39:57 -0400369};
370
371struct nfs_removeres {
372 const struct nfs_server *server;
373 struct nfs4_change_info cinfo;
374 struct nfs_fattr dir_attr;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400375 struct nfs4_sequence_res seq_res;
Trond Myklebust4fdc17b2007-07-14 15:39:57 -0400376};
377
378/*
Linus Torvalds1da177e2005-04-16 15:20:36 -0700379 * Argument struct for decode_entry function
380 */
381struct nfs_entry {
382 __u64 ino;
383 __u64 cookie,
384 prev_cookie;
385 const char * name;
386 unsigned int len;
387 int eof;
388 struct nfs_fh * fh;
389 struct nfs_fattr * fattr;
390};
391
392/*
393 * The following types are for NFSv2 only.
394 */
395struct nfs_sattrargs {
396 struct nfs_fh * fh;
397 struct iattr * sattr;
398};
399
400struct nfs_diropargs {
401 struct nfs_fh * fh;
402 const char * name;
403 unsigned int len;
404};
405
406struct nfs_createargs {
407 struct nfs_fh * fh;
408 const char * name;
409 unsigned int len;
410 struct iattr * sattr;
411};
412
413struct nfs_renameargs {
414 struct nfs_fh * fromfh;
415 const char * fromname;
416 unsigned int fromlen;
417 struct nfs_fh * tofh;
418 const char * toname;
419 unsigned int tolen;
420};
421
422struct nfs_setattrargs {
423 struct nfs_fh * fh;
424 nfs4_stateid stateid;
425 struct iattr * iap;
426 const struct nfs_server * server; /* Needed for name mapping */
427 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400428 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700429};
430
J. Bruce Fields23ec6962005-06-22 17:16:22 +0000431struct nfs_setaclargs {
432 struct nfs_fh * fh;
433 size_t acl_len;
434 unsigned int acl_pgbase;
435 struct page ** acl_pages;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400436 struct nfs4_sequence_args seq_args;
J. Bruce Fields23ec6962005-06-22 17:16:22 +0000437};
438
Benny Halevy73c403a2009-04-01 09:22:01 -0400439struct nfs_setaclres {
440 struct nfs4_sequence_res seq_res;
441};
442
J. Bruce Fields029d1052005-06-22 17:16:22 +0000443struct nfs_getaclargs {
444 struct nfs_fh * fh;
445 size_t acl_len;
446 unsigned int acl_pgbase;
447 struct page ** acl_pages;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400448 struct nfs4_sequence_args seq_args;
J. Bruce Fields029d1052005-06-22 17:16:22 +0000449};
450
Benny Halevy663c79b2009-04-01 09:21:59 -0400451struct nfs_getaclres {
452 size_t acl_len;
453 struct nfs4_sequence_res seq_res;
454};
455
Linus Torvalds1da177e2005-04-16 15:20:36 -0700456struct nfs_setattrres {
457 struct nfs_fattr * fattr;
458 const struct nfs_server * server;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400459 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700460};
461
462struct nfs_linkargs {
463 struct nfs_fh * fromfh;
464 struct nfs_fh * tofh;
465 const char * toname;
466 unsigned int tolen;
467};
468
469struct nfs_symlinkargs {
470 struct nfs_fh * fromfh;
471 const char * fromname;
472 unsigned int fromlen;
Chuck Lever94a6d752006-08-22 20:06:23 -0400473 struct page ** pages;
474 unsigned int pathlen;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700475 struct iattr * sattr;
476};
477
478struct nfs_readdirargs {
479 struct nfs_fh * fh;
480 __u32 cookie;
481 unsigned int count;
482 struct page ** pages;
483};
484
Andreas Gruenbacherb7fa0552005-06-22 17:16:27 +0000485struct nfs3_getaclargs {
486 struct nfs_fh * fh;
487 int mask;
488 struct page ** pages;
489};
490
491struct nfs3_setaclargs {
492 struct inode * inode;
493 int mask;
494 struct posix_acl * acl_access;
495 struct posix_acl * acl_default;
Trond Myklebustae461412009-03-10 20:33:18 -0400496 size_t len;
497 unsigned int npages;
Andreas Gruenbacherb7fa0552005-06-22 17:16:27 +0000498 struct page ** pages;
499};
500
Linus Torvalds1da177e2005-04-16 15:20:36 -0700501struct nfs_diropok {
502 struct nfs_fh * fh;
503 struct nfs_fattr * fattr;
504};
505
506struct nfs_readlinkargs {
507 struct nfs_fh * fh;
508 unsigned int pgbase;
509 unsigned int pglen;
510 struct page ** pages;
511};
512
513struct nfs3_sattrargs {
514 struct nfs_fh * fh;
515 struct iattr * sattr;
516 unsigned int guard;
517 struct timespec guardtime;
518};
519
520struct nfs3_diropargs {
521 struct nfs_fh * fh;
522 const char * name;
523 unsigned int len;
524};
525
526struct nfs3_accessargs {
527 struct nfs_fh * fh;
528 __u32 access;
529};
530
531struct nfs3_createargs {
532 struct nfs_fh * fh;
533 const char * name;
534 unsigned int len;
535 struct iattr * sattr;
536 enum nfs3_createmode createmode;
Al Virobc4785c2006-10-19 23:28:51 -0700537 __be32 verifier[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700538};
539
540struct nfs3_mkdirargs {
541 struct nfs_fh * fh;
542 const char * name;
543 unsigned int len;
544 struct iattr * sattr;
545};
546
547struct nfs3_symlinkargs {
548 struct nfs_fh * fromfh;
549 const char * fromname;
550 unsigned int fromlen;
Chuck Lever94a6d752006-08-22 20:06:23 -0400551 struct page ** pages;
552 unsigned int pathlen;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700553 struct iattr * sattr;
554};
555
556struct nfs3_mknodargs {
557 struct nfs_fh * fh;
558 const char * name;
559 unsigned int len;
560 enum nfs3_ftype type;
561 struct iattr * sattr;
562 dev_t rdev;
563};
564
565struct nfs3_renameargs {
566 struct nfs_fh * fromfh;
567 const char * fromname;
568 unsigned int fromlen;
569 struct nfs_fh * tofh;
570 const char * toname;
571 unsigned int tolen;
572};
573
574struct nfs3_linkargs {
575 struct nfs_fh * fromfh;
576 struct nfs_fh * tofh;
577 const char * toname;
578 unsigned int tolen;
579};
580
581struct nfs3_readdirargs {
582 struct nfs_fh * fh;
583 __u64 cookie;
Al Virobc4785c2006-10-19 23:28:51 -0700584 __be32 verf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700585 int plus;
586 unsigned int count;
587 struct page ** pages;
588};
589
590struct nfs3_diropres {
591 struct nfs_fattr * dir_attr;
592 struct nfs_fh * fh;
593 struct nfs_fattr * fattr;
594};
595
596struct nfs3_accessres {
597 struct nfs_fattr * fattr;
598 __u32 access;
599};
600
601struct nfs3_readlinkargs {
602 struct nfs_fh * fh;
603 unsigned int pgbase;
604 unsigned int pglen;
605 struct page ** pages;
606};
607
608struct nfs3_renameres {
609 struct nfs_fattr * fromattr;
610 struct nfs_fattr * toattr;
611};
612
613struct nfs3_linkres {
614 struct nfs_fattr * dir_attr;
615 struct nfs_fattr * fattr;
616};
617
618struct nfs3_readdirres {
619 struct nfs_fattr * dir_attr;
Al Virobc4785c2006-10-19 23:28:51 -0700620 __be32 * verf;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700621 int plus;
622};
623
Andreas Gruenbacherb7fa0552005-06-22 17:16:27 +0000624struct nfs3_getaclres {
625 struct nfs_fattr * fattr;
626 int mask;
627 unsigned int acl_access_count;
628 unsigned int acl_default_count;
629 struct posix_acl * acl_access;
630 struct posix_acl * acl_default;
631};
632
Linus Torvalds1da177e2005-04-16 15:20:36 -0700633#ifdef CONFIG_NFS_V4
634
635typedef u64 clientid4;
636
637struct nfs4_accessargs {
638 const struct nfs_fh * fh;
Trond Myklebust76b32992007-08-10 17:45:11 -0400639 const u32 * bitmask;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700640 u32 access;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400641 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642};
643
644struct nfs4_accessres {
Trond Myklebust76b32992007-08-10 17:45:11 -0400645 const struct nfs_server * server;
646 struct nfs_fattr * fattr;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700647 u32 supported;
648 u32 access;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400649 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700650};
651
652struct nfs4_create_arg {
653 u32 ftype;
654 union {
Chuck Lever94a6d752006-08-22 20:06:23 -0400655 struct {
656 struct page ** pages;
657 unsigned int len;
658 } symlink; /* NF4LNK */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700659 struct {
660 u32 specdata1;
661 u32 specdata2;
662 } device; /* NF4BLK, NF4CHR */
663 } u;
664 const struct qstr * name;
665 const struct nfs_server * server;
666 const struct iattr * attrs;
667 const struct nfs_fh * dir_fh;
668 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400669 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700670};
671
672struct nfs4_create_res {
673 const struct nfs_server * server;
674 struct nfs_fh * fh;
675 struct nfs_fattr * fattr;
676 struct nfs4_change_info dir_cinfo;
Trond Myklebust56ae19f2005-10-27 22:12:40 -0400677 struct nfs_fattr * dir_fattr;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400678 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700679};
680
681struct nfs4_fsinfo_arg {
682 const struct nfs_fh * fh;
683 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400684 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700685};
686
Benny Halevy3dda5e42009-04-01 09:21:57 -0400687struct nfs4_fsinfo_res {
688 struct nfs_fsinfo *fsinfo;
689 struct nfs4_sequence_res seq_res;
690};
691
Linus Torvalds1da177e2005-04-16 15:20:36 -0700692struct nfs4_getattr_arg {
693 const struct nfs_fh * fh;
694 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400695 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700696};
697
698struct nfs4_getattr_res {
699 const struct nfs_server * server;
700 struct nfs_fattr * fattr;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400701 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700702};
703
704struct nfs4_link_arg {
705 const struct nfs_fh * fh;
706 const struct nfs_fh * dir_fh;
707 const struct qstr * name;
Trond Myklebust91ba2ee2005-10-27 22:12:42 -0400708 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400709 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700710};
711
Trond Myklebust91ba2ee2005-10-27 22:12:42 -0400712struct nfs4_link_res {
713 const struct nfs_server * server;
714 struct nfs_fattr * fattr;
715 struct nfs4_change_info cinfo;
716 struct nfs_fattr * dir_attr;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400717 struct nfs4_sequence_res seq_res;
Trond Myklebust91ba2ee2005-10-27 22:12:42 -0400718};
719
720
Linus Torvalds1da177e2005-04-16 15:20:36 -0700721struct nfs4_lookup_arg {
722 const struct nfs_fh * dir_fh;
723 const struct qstr * name;
724 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400725 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700726};
727
728struct nfs4_lookup_res {
729 const struct nfs_server * server;
730 struct nfs_fattr * fattr;
731 struct nfs_fh * fh;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400732 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700733};
734
735struct nfs4_lookup_root_arg {
736 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400737 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700738};
739
740struct nfs4_pathconf_arg {
741 const struct nfs_fh * fh;
742 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400743 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700744};
745
Benny Halevyd45b2982009-04-01 09:21:58 -0400746struct nfs4_pathconf_res {
747 struct nfs_pathconf *pathconf;
748 struct nfs4_sequence_res seq_res;
749};
750
Linus Torvalds1da177e2005-04-16 15:20:36 -0700751struct nfs4_readdir_arg {
752 const struct nfs_fh * fh;
753 u64 cookie;
754 nfs4_verifier verifier;
755 u32 count;
756 struct page ** pages; /* zero-copy data */
757 unsigned int pgbase; /* zero-copy data */
758 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400759 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700760};
761
762struct nfs4_readdir_res {
763 nfs4_verifier verifier;
764 unsigned int pgbase;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400765 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700766};
767
768struct nfs4_readlink {
769 const struct nfs_fh * fh;
770 unsigned int pgbase;
771 unsigned int pglen; /* zero-copy data */
772 struct page ** pages; /* zero-copy data */
Benny Halevy9ff71c32009-04-01 09:21:52 -0400773 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700774};
775
Benny Halevyf50c7002009-04-01 09:21:55 -0400776struct nfs4_readlink_res {
777 struct nfs4_sequence_res seq_res;
778};
779
Linus Torvalds1da177e2005-04-16 15:20:36 -0700780struct nfs4_rename_arg {
781 const struct nfs_fh * old_dir;
782 const struct nfs_fh * new_dir;
783 const struct qstr * old_name;
784 const struct qstr * new_name;
Trond Myklebust6caf2c82005-10-27 22:12:43 -0400785 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400786 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700787};
788
789struct nfs4_rename_res {
Trond Myklebust6caf2c82005-10-27 22:12:43 -0400790 const struct nfs_server * server;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700791 struct nfs4_change_info old_cinfo;
Trond Myklebust6caf2c82005-10-27 22:12:43 -0400792 struct nfs_fattr * old_fattr;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700793 struct nfs4_change_info new_cinfo;
Trond Myklebust6caf2c82005-10-27 22:12:43 -0400794 struct nfs_fattr * new_fattr;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400795 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700796};
797
Trond Myklebust19d771f2008-10-08 13:54:52 -0400798#define NFS4_SETCLIENTID_NAMELEN (127)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799struct nfs4_setclientid {
Chuck Levercc38bac2007-12-10 14:56:54 -0500800 const nfs4_verifier * sc_verifier;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700801 unsigned int sc_name_len;
Chuck Leverd1ce02e2008-09-25 11:57:12 -0400802 char sc_name[NFS4_SETCLIENTID_NAMELEN + 1];
Chuck Levercc38bac2007-12-10 14:56:54 -0500803 u32 sc_prog;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804 unsigned int sc_netid_len;
Chuck Leverd1ce02e2008-09-25 11:57:12 -0400805 char sc_netid[RPCBIND_MAXNETIDLEN + 1];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700806 unsigned int sc_uaddr_len;
Chuck Leverd1ce02e2008-09-25 11:57:12 -0400807 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
Chuck Levercc38bac2007-12-10 14:56:54 -0500808 u32 sc_cb_ident;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700809};
810
811struct nfs4_statfs_arg {
812 const struct nfs_fh * fh;
813 const u32 * bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400814 struct nfs4_sequence_args seq_args;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700815};
816
Benny Halevy24ad1482009-04-01 09:21:56 -0400817struct nfs4_statfs_res {
818 struct nfs_fsstat *fsstat;
819 struct nfs4_sequence_res seq_res;
820};
821
Benny Halevy43652ad2009-04-01 09:21:54 -0400822struct nfs4_server_caps_arg {
823 struct nfs_fh *fhandle;
824 struct nfs4_sequence_args seq_args;
825};
826
Linus Torvalds1da177e2005-04-16 15:20:36 -0700827struct nfs4_server_caps_res {
828 u32 attr_bitmask[2];
829 u32 acl_bitmask;
830 u32 has_links;
831 u32 has_symlinks;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400832 struct nfs4_sequence_res seq_res;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700833};
834
Manoj Naik7aaa0b32006-06-09 09:34:23 -0400835struct nfs4_string {
836 unsigned int len;
837 char *data;
Trond Myklebust683b57b2006-06-09 09:34:22 -0400838};
839
Manoj Naik7aaa0b32006-06-09 09:34:23 -0400840#define NFS4_PATHNAME_MAXCOMPONENTS 512
841struct nfs4_pathname {
842 unsigned int ncomponents;
843 struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS];
844};
845
846#define NFS4_FS_LOCATION_MAXSERVERS 10
847struct nfs4_fs_location {
848 unsigned int nservers;
849 struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS];
850 struct nfs4_pathname rootpath;
851};
852
853#define NFS4_FS_LOCATIONS_MAXENTRIES 10
854struct nfs4_fs_locations {
Trond Myklebust683b57b2006-06-09 09:34:22 -0400855 struct nfs_fattr fattr;
856 const struct nfs_server *server;
Manoj Naik7aaa0b32006-06-09 09:34:23 -0400857 struct nfs4_pathname fs_path;
Trond Myklebust683b57b2006-06-09 09:34:22 -0400858 int nlocations;
Manoj Naik7aaa0b32006-06-09 09:34:23 -0400859 struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES];
Trond Myklebust683b57b2006-06-09 09:34:22 -0400860};
861
862struct nfs4_fs_locations_arg {
863 const struct nfs_fh *dir_fh;
864 const struct qstr *name;
865 struct page *page;
866 const u32 *bitmask;
Benny Halevy9ff71c32009-04-01 09:21:52 -0400867 struct nfs4_sequence_args seq_args;
Trond Myklebust683b57b2006-06-09 09:34:22 -0400868};
869
Linus Torvalds1da177e2005-04-16 15:20:36 -0700870#endif /* CONFIG_NFS_V4 */
871
872struct nfs_page;
873
Chuck Lever40859d72005-11-30 18:09:02 -0500874#define NFS_PAGEVEC_SIZE (8U)
875
Linus Torvalds1da177e2005-04-16 15:20:36 -0700876struct nfs_read_data {
877 int flags;
878 struct rpc_task task;
879 struct inode *inode;
880 struct rpc_cred *cred;
881 struct nfs_fattr fattr; /* fattr storage */
882 struct list_head pages; /* Coalesced read requests */
883 struct nfs_page *req; /* multi ops per nfs_page */
Chuck Lever40859d72005-11-30 18:09:02 -0500884 struct page **pagevec;
Trond Myklebuste9f7bee2006-09-08 09:48:54 -0700885 unsigned int npages; /* Max length of pagevec */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 struct nfs_readargs args;
887 struct nfs_readres res;
888#ifdef CONFIG_NFS_V4
889 unsigned long timestamp; /* For lease renewal */
890#endif
Chuck Lever0d0b5cb2006-05-25 01:40:53 -0400891 struct page *page_array[NFS_PAGEVEC_SIZE];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700892};
893
894struct nfs_write_data {
895 int flags;
896 struct rpc_task task;
897 struct inode *inode;
898 struct rpc_cred *cred;
899 struct nfs_fattr fattr;
900 struct nfs_writeverf verf;
901 struct list_head pages; /* Coalesced requests we wish to flush */
902 struct nfs_page *req; /* multi ops per nfs_page */
Chuck Lever40859d72005-11-30 18:09:02 -0500903 struct page **pagevec;
Trond Myklebuste9f7bee2006-09-08 09:48:54 -0700904 unsigned int npages; /* Max length of pagevec */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 struct nfs_writeargs args; /* argument struct */
906 struct nfs_writeres res; /* result struct */
907#ifdef CONFIG_NFS_V4
908 unsigned long timestamp; /* For lease renewal */
909#endif
Chuck Lever0d0b5cb2006-05-25 01:40:53 -0400910 struct page *page_array[NFS_PAGEVEC_SIZE];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700911};
912
913struct nfs_access_entry;
914
915/*
916 * RPC procedure vector for NFSv2/NFSv3 demuxing
917 */
918struct nfs_rpc_ops {
Chuck Leverc0e07cb2008-01-14 12:32:05 -0500919 u32 version; /* Protocol version */
Al Virof786aa92009-02-20 05:51:22 +0000920 const struct dentry_operations *dentry_ops;
Arjan van de Venc5ef1c42007-02-12 00:55:40 -0800921 const struct inode_operations *dir_inode_ops;
922 const struct inode_operations *file_inode_ops;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923
924 int (*getroot) (struct nfs_server *, struct nfs_fh *,
925 struct nfs_fsinfo *);
David Howells2b3de442006-08-22 20:06:09 -0400926 int (*lookupfh)(struct nfs_server *, struct nfs_fh *,
927 struct qstr *, struct nfs_fh *,
928 struct nfs_fattr *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700929 int (*getattr) (struct nfs_server *, struct nfs_fh *,
930 struct nfs_fattr *);
931 int (*setattr) (struct dentry *, struct nfs_fattr *,
932 struct iattr *);
933 int (*lookup) (struct inode *, struct qstr *,
934 struct nfs_fh *, struct nfs_fattr *);
935 int (*access) (struct inode *, struct nfs_access_entry *);
936 int (*readlink)(struct inode *, struct page *, unsigned int,
937 unsigned int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700938 int (*create) (struct inode *, struct dentry *,
Trond Myklebust02a913a2005-10-18 14:20:17 -0700939 struct iattr *, int, struct nameidata *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940 int (*remove) (struct inode *, struct qstr *);
Trond Myklebuste4eff1a2007-07-14 15:39:58 -0400941 void (*unlink_setup) (struct rpc_message *, struct inode *dir);
942 int (*unlink_done) (struct rpc_task *, struct inode *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700943 int (*rename) (struct inode *, struct qstr *,
944 struct inode *, struct qstr *);
945 int (*link) (struct inode *, struct inode *, struct qstr *);
Chuck Lever94a6d752006-08-22 20:06:23 -0400946 int (*symlink) (struct inode *, struct dentry *, struct page *,
947 unsigned int, struct iattr *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700948 int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
949 int (*rmdir) (struct inode *, struct qstr *);
950 int (*readdir) (struct dentry *, struct rpc_cred *,
951 u64, struct page *, unsigned int, int);
952 int (*mknod) (struct inode *, struct dentry *, struct iattr *,
953 dev_t);
954 int (*statfs) (struct nfs_server *, struct nfs_fh *,
955 struct nfs_fsstat *);
956 int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
957 struct nfs_fsinfo *);
958 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
959 struct nfs_pathconf *);
David Howellse9326dc2006-08-22 20:06:10 -0400960 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
Al Viro0dbb4c62006-10-19 23:28:49 -0700961 __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus);
Trond Myklebustbdc7f022007-07-14 15:40:00 -0400962 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
Trond Myklebustec06c092006-03-20 13:44:27 -0500963 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
Trond Myklebustbdc7f022007-07-14 15:40:00 -0400964 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
Trond Myklebust788e7a82006-03-20 13:44:27 -0500965 int (*write_done) (struct rpc_task *, struct nfs_write_data *);
Trond Myklebustbdc7f022007-07-14 15:40:00 -0400966 void (*commit_setup) (struct nfs_write_data *, struct rpc_message *);
Trond Myklebust788e7a82006-03-20 13:44:27 -0500967 int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700968 int (*lock)(struct file *, int, struct file_lock *);
Trond Myklebust21162712008-05-20 19:34:39 -0400969 int (*lock_check_bounds)(const struct file_lock *);
Trond Myklebustada70d92005-06-22 17:16:22 +0000970 void (*clear_acl_cache)(struct inode *);
Trond Myklebust7fe5c392009-03-19 15:35:50 -0400971 void (*close_context)(struct nfs_open_context *ctx, int);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700972};
973
974/*
975 * NFS_CALL(getattr, inode, (fattr));
976 * into
977 * NFS_PROTO(inode)->getattr(fattr);
978 */
979#define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
980
981/*
982 * Function vectors etc. for the NFS client
983 */
David Howells509de812006-08-22 20:06:11 -0400984extern const struct nfs_rpc_ops nfs_v2_clientops;
985extern const struct nfs_rpc_ops nfs_v3_clientops;
986extern const struct nfs_rpc_ops nfs_v4_clientops;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700987extern struct rpc_version nfs_version2;
988extern struct rpc_version nfs_version3;
989extern struct rpc_version nfs_version4;
990
Andreas Gruenbacherb7fa0552005-06-22 17:16:27 +0000991extern struct rpc_version nfsacl_version3;
992extern struct rpc_program nfsacl_program;
993
Linus Torvalds1da177e2005-04-16 15:20:36 -0700994#endif