NFS: Return an error when starting the idmapping pipe
[deliverable/linux.git] / include / linux / nfs_xdr.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_NFS_XDR_H
2#define _LINUX_NFS_XDR_H
3
4#include <linux/sunrpc/xprt.h>
b7fa0554 5#include <linux/nfsacl.h>
1da177e4 6
40859d7e
CL
7/*
8 * To change the maximum rsize and wsize supported by the NFS client, adjust
9 * NFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can
10 * support a megabyte or more. The default is left at 4096 bytes, which is
11 * reasonable for NFS over UDP.
12 */
13#define NFS_MAX_FILE_IO_SIZE (1048576U)
14#define NFS_DEF_FILE_IO_SIZE (4096U)
15#define NFS_MIN_FILE_IO_SIZE (1024U)
16
8b4bdcf8
TM
17struct nfs_fsid {
18 uint64_t major;
19 uint64_t minor;
1da177e4
LT
20};
21
8b4bdcf8
TM
22/*
23 * Helper for checking equality between 2 fsids.
24 */
25static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b)
26{
27 return a->major == b->major && a->minor == b->minor;
28}
29
1da177e4
LT
30struct nfs_fattr {
31 unsigned short valid; /* which fields are valid */
32 __u64 pre_size; /* pre_op_attr.size */
33 struct timespec pre_mtime; /* pre_op_attr.mtime */
34 struct timespec pre_ctime; /* pre_op_attr.ctime */
35 enum nfs_ftype type; /* always use NFSv2 types */
36 __u32 mode;
37 __u32 nlink;
38 __u32 uid;
39 __u32 gid;
40 __u64 size;
41 union {
42 struct {
43 __u32 blocksize;
44 __u32 blocks;
45 } nfs2;
46 struct {
47 __u64 used;
48 } nfs3;
49 } du;
50 dev_t rdev;
8b4bdcf8 51 struct nfs_fsid fsid;
1da177e4
LT
52 __u64 fileid;
53 struct timespec atime;
54 struct timespec mtime;
55 struct timespec ctime;
56 __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */
57 __u64 change_attr; /* NFSv4 change attribute */
58 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
33801147 59 unsigned long time_start;
1da177e4
LT
60};
61
62#define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */
63#define NFS_ATTR_FATTR 0x0002 /* post-op attributes */
64#define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */
73a3d07c 65#define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */
6b97fd3d 66#define NFS_ATTR_FATTR_V4_REFERRAL 0x0010 /* NFSv4 referral */
1da177e4
LT
67
68/*
69 * Info on the file system
70 */
71struct nfs_fsinfo {
72 struct nfs_fattr *fattr; /* Post-op attributes */
73 __u32 rtmax; /* max. read transfer size */
74 __u32 rtpref; /* pref. read transfer size */
75 __u32 rtmult; /* reads should be multiple of this */
76 __u32 wtmax; /* max. write transfer size */
77 __u32 wtpref; /* pref. write transfer size */
78 __u32 wtmult; /* writes should be multiple of this */
79 __u32 dtpref; /* pref. readdir transfer size */
80 __u64 maxfilesize;
81 __u32 lease_time; /* in seconds */
82};
83
84struct nfs_fsstat {
85 struct nfs_fattr *fattr; /* Post-op attributes */
86 __u64 tbytes; /* total size in bytes */
87 __u64 fbytes; /* # of free bytes */
88 __u64 abytes; /* # of bytes available to user */
89 __u64 tfiles; /* # of files */
90 __u64 ffiles; /* # of free files */
91 __u64 afiles; /* # of files available to user */
92};
93
94struct nfs2_fsstat {
95 __u32 tsize; /* Server transfer size */
96 __u32 bsize; /* Filesystem block size */
97 __u32 blocks; /* No. of "bsize" blocks on filesystem */
98 __u32 bfree; /* No. of free "bsize" blocks */
99 __u32 bavail; /* No. of available "bsize" blocks */
100};
101
102struct nfs_pathconf {
103 struct nfs_fattr *fattr; /* Post-op attributes */
104 __u32 max_link; /* max # of hard links */
105 __u32 max_namelen; /* max name length */
106};
107
108struct nfs4_change_info {
109 u32 atomic;
110 u64 before;
111 u64 after;
112};
113
cee54fc9 114struct nfs_seqid;
1da177e4
LT
115/*
116 * Arguments to the open call.
117 */
118struct nfs_openargs {
119 const struct nfs_fh * fh;
cee54fc9 120 struct nfs_seqid * seqid;
1da177e4
LT
121 int open_flags;
122 __u64 clientid;
123 __u32 id;
124 union {
125 struct iattr * attrs; /* UNCHECKED, GUARDED */
126 nfs4_verifier verifier; /* EXCLUSIVE */
127 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
128 int delegation_type; /* CLAIM_PREVIOUS */
129 } u;
130 const struct qstr * name;
131 const struct nfs_server *server; /* Needed for ID mapping */
132 const u32 * bitmask;
133 __u32 claim;
134};
135
136struct nfs_openres {
137 nfs4_stateid stateid;
138 struct nfs_fh fh;
139 struct nfs4_change_info cinfo;
140 __u32 rflags;
141 struct nfs_fattr * f_attr;
56ae19f3 142 struct nfs_fattr * dir_attr;
1da177e4
LT
143 const struct nfs_server *server;
144 int delegation_type;
145 nfs4_stateid delegation;
146 __u32 do_recall;
147 __u64 maxsize;
148};
149
150/*
151 * Arguments to the open_confirm call.
152 */
153struct nfs_open_confirmargs {
154 const struct nfs_fh * fh;
cdd4e68b 155 nfs4_stateid * stateid;
cee54fc9 156 struct nfs_seqid * seqid;
1da177e4
LT
157};
158
159struct nfs_open_confirmres {
160 nfs4_stateid stateid;
161};
162
163/*
164 * Arguments to the close call.
165 */
166struct nfs_closeargs {
167 struct nfs_fh * fh;
9512135d 168 nfs4_stateid * stateid;
cee54fc9 169 struct nfs_seqid * seqid;
1da177e4 170 int open_flags;
516a6af6 171 const u32 * bitmask;
1da177e4
LT
172};
173
174struct nfs_closeres {
175 nfs4_stateid stateid;
516a6af6
TM
176 struct nfs_fattr * fattr;
177 const struct nfs_server *server;
1da177e4
LT
178};
179/*
180 * * Arguments to the lock,lockt, and locku call.
181 * */
182struct nfs_lowner {
911d1aaf
TM
183 __u64 clientid;
184 u32 id;
1da177e4
LT
185};
186
911d1aaf
TM
187struct nfs_lock_args {
188 struct nfs_fh * fh;
189 struct file_lock * fl;
cee54fc9 190 struct nfs_seqid * lock_seqid;
06735b34
TM
191 nfs4_stateid * lock_stateid;
192 struct nfs_seqid * open_seqid;
193 nfs4_stateid * open_stateid;
911d1aaf
TM
194 struct nfs_lowner lock_owner;
195 unsigned char block : 1;
196 unsigned char reclaim : 1;
197 unsigned char new_lock_owner : 1;
198};
199
200struct nfs_lock_res {
201 nfs4_stateid stateid;
1da177e4
LT
202};
203
911d1aaf
TM
204struct nfs_locku_args {
205 struct nfs_fh * fh;
206 struct file_lock * fl;
cee54fc9 207 struct nfs_seqid * seqid;
faf5f49c 208 nfs4_stateid * stateid;
1da177e4
LT
209};
210
911d1aaf
TM
211struct nfs_locku_res {
212 nfs4_stateid stateid;
1da177e4
LT
213};
214
911d1aaf
TM
215struct nfs_lockt_args {
216 struct nfs_fh * fh;
217 struct file_lock * fl;
218 struct nfs_lowner lock_owner;
1da177e4
LT
219};
220
911d1aaf
TM
221struct nfs_lockt_res {
222 struct file_lock * denied; /* LOCK, LOCKT failed */
1da177e4
LT
223};
224
225struct nfs4_delegreturnargs {
226 const struct nfs_fh *fhandle;
227 const nfs4_stateid *stateid;
fa178f29
TM
228 const u32 * bitmask;
229};
230
231struct nfs4_delegreturnres {
232 struct nfs_fattr * fattr;
233 const struct nfs_server *server;
1da177e4
LT
234};
235
236/*
237 * Arguments to the read call.
238 */
1da177e4
LT
239struct nfs_readargs {
240 struct nfs_fh * fh;
241 struct nfs_open_context *context;
242 __u64 offset;
243 __u32 count;
244 unsigned int pgbase;
245 struct page ** pages;
246};
247
248struct nfs_readres {
249 struct nfs_fattr * fattr;
250 __u32 count;
251 int eof;
252};
253
254/*
255 * Arguments to the write call.
256 */
1da177e4
LT
257struct nfs_writeargs {
258 struct nfs_fh * fh;
259 struct nfs_open_context *context;
260 __u64 offset;
261 __u32 count;
262 enum nfs3_stable_how stable;
263 unsigned int pgbase;
264 struct page ** pages;
4f9838c7 265 const u32 * bitmask;
1da177e4
LT
266};
267
268struct nfs_writeverf {
269 enum nfs3_stable_how committed;
270 __u32 verifier[2];
271};
272
273struct nfs_writeres {
274 struct nfs_fattr * fattr;
275 struct nfs_writeverf * verf;
276 __u32 count;
4f9838c7 277 const struct nfs_server *server;
1da177e4
LT
278};
279
280/*
281 * Argument struct for decode_entry function
282 */
283struct nfs_entry {
284 __u64 ino;
285 __u64 cookie,
286 prev_cookie;
287 const char * name;
288 unsigned int len;
289 int eof;
290 struct nfs_fh * fh;
291 struct nfs_fattr * fattr;
292};
293
294/*
295 * The following types are for NFSv2 only.
296 */
297struct nfs_sattrargs {
298 struct nfs_fh * fh;
299 struct iattr * sattr;
300};
301
302struct nfs_diropargs {
303 struct nfs_fh * fh;
304 const char * name;
305 unsigned int len;
306};
307
308struct nfs_createargs {
309 struct nfs_fh * fh;
310 const char * name;
311 unsigned int len;
312 struct iattr * sattr;
313};
314
315struct nfs_renameargs {
316 struct nfs_fh * fromfh;
317 const char * fromname;
318 unsigned int fromlen;
319 struct nfs_fh * tofh;
320 const char * toname;
321 unsigned int tolen;
322};
323
324struct nfs_setattrargs {
325 struct nfs_fh * fh;
326 nfs4_stateid stateid;
327 struct iattr * iap;
328 const struct nfs_server * server; /* Needed for name mapping */
329 const u32 * bitmask;
330};
331
23ec6965
BF
332struct nfs_setaclargs {
333 struct nfs_fh * fh;
334 size_t acl_len;
335 unsigned int acl_pgbase;
336 struct page ** acl_pages;
337};
338
029d105e
BF
339struct nfs_getaclargs {
340 struct nfs_fh * fh;
341 size_t acl_len;
342 unsigned int acl_pgbase;
343 struct page ** acl_pages;
344};
345
1da177e4
LT
346struct nfs_setattrres {
347 struct nfs_fattr * fattr;
348 const struct nfs_server * server;
349};
350
351struct nfs_linkargs {
352 struct nfs_fh * fromfh;
353 struct nfs_fh * tofh;
354 const char * toname;
355 unsigned int tolen;
356};
357
358struct nfs_symlinkargs {
359 struct nfs_fh * fromfh;
360 const char * fromname;
361 unsigned int fromlen;
362 const char * topath;
363 unsigned int tolen;
364 struct iattr * sattr;
365};
366
367struct nfs_readdirargs {
368 struct nfs_fh * fh;
369 __u32 cookie;
370 unsigned int count;
371 struct page ** pages;
372};
373
b7fa0554
AG
374struct nfs3_getaclargs {
375 struct nfs_fh * fh;
376 int mask;
377 struct page ** pages;
378};
379
380struct nfs3_setaclargs {
381 struct inode * inode;
382 int mask;
383 struct posix_acl * acl_access;
384 struct posix_acl * acl_default;
385 struct page ** pages;
386};
387
1da177e4
LT
388struct nfs_diropok {
389 struct nfs_fh * fh;
390 struct nfs_fattr * fattr;
391};
392
393struct nfs_readlinkargs {
394 struct nfs_fh * fh;
395 unsigned int pgbase;
396 unsigned int pglen;
397 struct page ** pages;
398};
399
400struct nfs3_sattrargs {
401 struct nfs_fh * fh;
402 struct iattr * sattr;
403 unsigned int guard;
404 struct timespec guardtime;
405};
406
407struct nfs3_diropargs {
408 struct nfs_fh * fh;
409 const char * name;
410 unsigned int len;
411};
412
413struct nfs3_accessargs {
414 struct nfs_fh * fh;
415 __u32 access;
416};
417
418struct nfs3_createargs {
419 struct nfs_fh * fh;
420 const char * name;
421 unsigned int len;
422 struct iattr * sattr;
423 enum nfs3_createmode createmode;
424 __u32 verifier[2];
425};
426
427struct nfs3_mkdirargs {
428 struct nfs_fh * fh;
429 const char * name;
430 unsigned int len;
431 struct iattr * sattr;
432};
433
434struct nfs3_symlinkargs {
435 struct nfs_fh * fromfh;
436 const char * fromname;
437 unsigned int fromlen;
438 const char * topath;
439 unsigned int tolen;
440 struct iattr * sattr;
441};
442
443struct nfs3_mknodargs {
444 struct nfs_fh * fh;
445 const char * name;
446 unsigned int len;
447 enum nfs3_ftype type;
448 struct iattr * sattr;
449 dev_t rdev;
450};
451
452struct nfs3_renameargs {
453 struct nfs_fh * fromfh;
454 const char * fromname;
455 unsigned int fromlen;
456 struct nfs_fh * tofh;
457 const char * toname;
458 unsigned int tolen;
459};
460
461struct nfs3_linkargs {
462 struct nfs_fh * fromfh;
463 struct nfs_fh * tofh;
464 const char * toname;
465 unsigned int tolen;
466};
467
468struct nfs3_readdirargs {
469 struct nfs_fh * fh;
470 __u64 cookie;
471 __u32 verf[2];
472 int plus;
473 unsigned int count;
474 struct page ** pages;
475};
476
477struct nfs3_diropres {
478 struct nfs_fattr * dir_attr;
479 struct nfs_fh * fh;
480 struct nfs_fattr * fattr;
481};
482
483struct nfs3_accessres {
484 struct nfs_fattr * fattr;
485 __u32 access;
486};
487
488struct nfs3_readlinkargs {
489 struct nfs_fh * fh;
490 unsigned int pgbase;
491 unsigned int pglen;
492 struct page ** pages;
493};
494
495struct nfs3_renameres {
496 struct nfs_fattr * fromattr;
497 struct nfs_fattr * toattr;
498};
499
500struct nfs3_linkres {
501 struct nfs_fattr * dir_attr;
502 struct nfs_fattr * fattr;
503};
504
505struct nfs3_readdirres {
506 struct nfs_fattr * dir_attr;
507 __u32 * verf;
508 int plus;
509};
510
b7fa0554
AG
511struct nfs3_getaclres {
512 struct nfs_fattr * fattr;
513 int mask;
514 unsigned int acl_access_count;
515 unsigned int acl_default_count;
516 struct posix_acl * acl_access;
517 struct posix_acl * acl_default;
518};
519
1da177e4
LT
520#ifdef CONFIG_NFS_V4
521
522typedef u64 clientid4;
523
524struct nfs4_accessargs {
525 const struct nfs_fh * fh;
526 u32 access;
527};
528
529struct nfs4_accessres {
530 u32 supported;
531 u32 access;
532};
533
534struct nfs4_create_arg {
535 u32 ftype;
536 union {
537 struct qstr * symlink; /* NF4LNK */
538 struct {
539 u32 specdata1;
540 u32 specdata2;
541 } device; /* NF4BLK, NF4CHR */
542 } u;
543 const struct qstr * name;
544 const struct nfs_server * server;
545 const struct iattr * attrs;
546 const struct nfs_fh * dir_fh;
547 const u32 * bitmask;
548};
549
550struct nfs4_create_res {
551 const struct nfs_server * server;
552 struct nfs_fh * fh;
553 struct nfs_fattr * fattr;
554 struct nfs4_change_info dir_cinfo;
56ae19f3 555 struct nfs_fattr * dir_fattr;
1da177e4
LT
556};
557
558struct nfs4_fsinfo_arg {
559 const struct nfs_fh * fh;
560 const u32 * bitmask;
561};
562
563struct nfs4_getattr_arg {
564 const struct nfs_fh * fh;
565 const u32 * bitmask;
566};
567
568struct nfs4_getattr_res {
569 const struct nfs_server * server;
570 struct nfs_fattr * fattr;
571};
572
573struct nfs4_link_arg {
574 const struct nfs_fh * fh;
575 const struct nfs_fh * dir_fh;
576 const struct qstr * name;
91ba2eee
TM
577 const u32 * bitmask;
578};
579
580struct nfs4_link_res {
581 const struct nfs_server * server;
582 struct nfs_fattr * fattr;
583 struct nfs4_change_info cinfo;
584 struct nfs_fattr * dir_attr;
1da177e4
LT
585};
586
91ba2eee 587
1da177e4
LT
588struct nfs4_lookup_arg {
589 const struct nfs_fh * dir_fh;
590 const struct qstr * name;
591 const u32 * bitmask;
592};
593
594struct nfs4_lookup_res {
595 const struct nfs_server * server;
596 struct nfs_fattr * fattr;
597 struct nfs_fh * fh;
598};
599
600struct nfs4_lookup_root_arg {
601 const u32 * bitmask;
602};
603
604struct nfs4_pathconf_arg {
605 const struct nfs_fh * fh;
606 const u32 * bitmask;
607};
608
609struct nfs4_readdir_arg {
610 const struct nfs_fh * fh;
611 u64 cookie;
612 nfs4_verifier verifier;
613 u32 count;
614 struct page ** pages; /* zero-copy data */
615 unsigned int pgbase; /* zero-copy data */
616 const u32 * bitmask;
617};
618
619struct nfs4_readdir_res {
620 nfs4_verifier verifier;
621 unsigned int pgbase;
622};
623
624struct nfs4_readlink {
625 const struct nfs_fh * fh;
626 unsigned int pgbase;
627 unsigned int pglen; /* zero-copy data */
628 struct page ** pages; /* zero-copy data */
629};
630
631struct nfs4_remove_arg {
632 const struct nfs_fh * fh;
633 const struct qstr * name;
16e42959
TM
634 const u32 * bitmask;
635};
636
637struct nfs4_remove_res {
638 const struct nfs_server * server;
639 struct nfs4_change_info cinfo;
640 struct nfs_fattr * dir_attr;
1da177e4
LT
641};
642
643struct nfs4_rename_arg {
644 const struct nfs_fh * old_dir;
645 const struct nfs_fh * new_dir;
646 const struct qstr * old_name;
647 const struct qstr * new_name;
6caf2c82 648 const u32 * bitmask;
1da177e4
LT
649};
650
651struct nfs4_rename_res {
6caf2c82 652 const struct nfs_server * server;
1da177e4 653 struct nfs4_change_info old_cinfo;
6caf2c82 654 struct nfs_fattr * old_fattr;
1da177e4 655 struct nfs4_change_info new_cinfo;
6caf2c82 656 struct nfs_fattr * new_fattr;
1da177e4
LT
657};
658
659struct nfs4_setclientid {
660 const nfs4_verifier * sc_verifier; /* request */
661 unsigned int sc_name_len;
3cedf13a 662 char sc_name[48]; /* request */
1da177e4
LT
663 u32 sc_prog; /* request */
664 unsigned int sc_netid_len;
665 char sc_netid[4]; /* request */
666 unsigned int sc_uaddr_len;
667 char sc_uaddr[24]; /* request */
668 u32 sc_cb_ident; /* request */
669};
670
671struct nfs4_statfs_arg {
672 const struct nfs_fh * fh;
673 const u32 * bitmask;
674};
675
676struct nfs4_server_caps_res {
677 u32 attr_bitmask[2];
678 u32 acl_bitmask;
679 u32 has_links;
680 u32 has_symlinks;
681};
682
7aaa0b3b
MN
683struct nfs4_string {
684 unsigned int len;
685 char *data;
683b57b4
TM
686};
687
7aaa0b3b
MN
688#define NFS4_PATHNAME_MAXCOMPONENTS 512
689struct nfs4_pathname {
690 unsigned int ncomponents;
691 struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS];
692};
693
694#define NFS4_FS_LOCATION_MAXSERVERS 10
695struct nfs4_fs_location {
696 unsigned int nservers;
697 struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS];
698 struct nfs4_pathname rootpath;
699};
700
701#define NFS4_FS_LOCATIONS_MAXENTRIES 10
702struct nfs4_fs_locations {
683b57b4
TM
703 struct nfs_fattr fattr;
704 const struct nfs_server *server;
7aaa0b3b 705 struct nfs4_pathname fs_path;
683b57b4 706 int nlocations;
7aaa0b3b 707 struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES];
683b57b4
TM
708};
709
710struct nfs4_fs_locations_arg {
711 const struct nfs_fh *dir_fh;
712 const struct qstr *name;
713 struct page *page;
714 const u32 *bitmask;
715};
716
1da177e4
LT
717#endif /* CONFIG_NFS_V4 */
718
719struct nfs_page;
720
40859d7e
CL
721#define NFS_PAGEVEC_SIZE (8U)
722
1da177e4
LT
723struct nfs_read_data {
724 int flags;
725 struct rpc_task task;
726 struct inode *inode;
727 struct rpc_cred *cred;
728 struct nfs_fattr fattr; /* fattr storage */
729 struct list_head pages; /* Coalesced read requests */
730 struct nfs_page *req; /* multi ops per nfs_page */
40859d7e 731 struct page **pagevec;
e9f7bee1 732 unsigned int npages; /* Max length of pagevec */
1da177e4
LT
733 struct nfs_readargs args;
734 struct nfs_readres res;
735#ifdef CONFIG_NFS_V4
736 unsigned long timestamp; /* For lease renewal */
737#endif
0d0b5cb3 738 struct page *page_array[NFS_PAGEVEC_SIZE];
1da177e4
LT
739};
740
741struct nfs_write_data {
742 int flags;
743 struct rpc_task task;
744 struct inode *inode;
745 struct rpc_cred *cred;
746 struct nfs_fattr fattr;
747 struct nfs_writeverf verf;
748 struct list_head pages; /* Coalesced requests we wish to flush */
749 struct nfs_page *req; /* multi ops per nfs_page */
40859d7e 750 struct page **pagevec;
e9f7bee1 751 unsigned int npages; /* Max length of pagevec */
1da177e4
LT
752 struct nfs_writeargs args; /* argument struct */
753 struct nfs_writeres res; /* result struct */
754#ifdef CONFIG_NFS_V4
755 unsigned long timestamp; /* For lease renewal */
756#endif
0d0b5cb3 757 struct page *page_array[NFS_PAGEVEC_SIZE];
1da177e4
LT
758};
759
760struct nfs_access_entry;
761
762/*
763 * RPC procedure vector for NFSv2/NFSv3 demuxing
764 */
765struct nfs_rpc_ops {
766 int version; /* Protocol version */
767 struct dentry_operations *dentry_ops;
768 struct inode_operations *dir_inode_ops;
92cfc62c 769 struct inode_operations *file_inode_ops;
1da177e4
LT
770
771 int (*getroot) (struct nfs_server *, struct nfs_fh *,
772 struct nfs_fsinfo *);
773 int (*getattr) (struct nfs_server *, struct nfs_fh *,
774 struct nfs_fattr *);
775 int (*setattr) (struct dentry *, struct nfs_fattr *,
776 struct iattr *);
777 int (*lookup) (struct inode *, struct qstr *,
778 struct nfs_fh *, struct nfs_fattr *);
779 int (*access) (struct inode *, struct nfs_access_entry *);
780 int (*readlink)(struct inode *, struct page *, unsigned int,
781 unsigned int);
782 int (*read) (struct nfs_read_data *);
783 int (*write) (struct nfs_write_data *);
784 int (*commit) (struct nfs_write_data *);
785 int (*create) (struct inode *, struct dentry *,
02a913a7 786 struct iattr *, int, struct nameidata *);
1da177e4
LT
787 int (*remove) (struct inode *, struct qstr *);
788 int (*unlink_setup) (struct rpc_message *,
789 struct dentry *, struct qstr *);
790 int (*unlink_done) (struct dentry *, struct rpc_task *);
791 int (*rename) (struct inode *, struct qstr *,
792 struct inode *, struct qstr *);
793 int (*link) (struct inode *, struct inode *, struct qstr *);
794 int (*symlink) (struct inode *, struct qstr *, struct qstr *,
795 struct iattr *, struct nfs_fh *,
796 struct nfs_fattr *);
797 int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
798 int (*rmdir) (struct inode *, struct qstr *);
799 int (*readdir) (struct dentry *, struct rpc_cred *,
800 u64, struct page *, unsigned int, int);
801 int (*mknod) (struct inode *, struct dentry *, struct iattr *,
802 dev_t);
803 int (*statfs) (struct nfs_server *, struct nfs_fh *,
804 struct nfs_fsstat *);
805 int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
806 struct nfs_fsinfo *);
807 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
808 struct nfs_pathconf *);
809 u32 * (*decode_dirent)(u32 *, struct nfs_entry *, int plus);
810 void (*read_setup) (struct nfs_read_data *);
ec06c096 811 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
1da177e4 812 void (*write_setup) (struct nfs_write_data *, int how);
788e7a89 813 int (*write_done) (struct rpc_task *, struct nfs_write_data *);
1da177e4 814 void (*commit_setup) (struct nfs_write_data *, int how);
788e7a89 815 int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
1da177e4
LT
816 int (*file_open) (struct inode *, struct file *);
817 int (*file_release) (struct inode *, struct file *);
818 int (*lock)(struct file *, int, struct file_lock *);
ada70d94 819 void (*clear_acl_cache)(struct inode *);
1da177e4
LT
820};
821
822/*
823 * NFS_CALL(getattr, inode, (fattr));
824 * into
825 * NFS_PROTO(inode)->getattr(fattr);
826 */
827#define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
828
829/*
830 * Function vectors etc. for the NFS client
831 */
832extern struct nfs_rpc_ops nfs_v2_clientops;
833extern struct nfs_rpc_ops nfs_v3_clientops;
834extern struct nfs_rpc_ops nfs_v4_clientops;
835extern struct rpc_version nfs_version2;
836extern struct rpc_version nfs_version3;
837extern struct rpc_version nfs_version4;
838
b7fa0554
AG
839extern struct rpc_version nfsacl_version3;
840extern struct rpc_program nfsacl_program;
841
1da177e4 842#endif
This page took 0.228113 seconds and 5 git commands to generate.