NFSv4: Support NFSv4 optional attributes in the struct nfs_fattr
[linux-2.6/mini2440.git] / include / linux / nfs_xdr.h
blobb99295e07cdfe17a977d4b531dd909e0f125fe7f
1 #ifndef _LINUX_NFS_XDR_H
2 #define _LINUX_NFS_XDR_H
4 #include <linux/nfsacl.h>
6 /*
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.
12 #define NFS_MAX_FILE_IO_SIZE (1048576U)
13 #define NFS_DEF_FILE_IO_SIZE (4096U)
14 #define NFS_MIN_FILE_IO_SIZE (1024U)
16 struct nfs_fsid {
17 uint64_t major;
18 uint64_t minor;
22 * Helper for checking equality between 2 fsids.
24 static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b)
26 return a->major == b->major && a->minor == b->minor;
29 struct nfs_fattr {
30 unsigned int valid; /* which fields are valid */
31 __u64 pre_size; /* pre_op_attr.size */
32 struct timespec pre_mtime; /* pre_op_attr.mtime */
33 struct timespec pre_ctime; /* pre_op_attr.ctime */
34 enum nfs_ftype type; /* always use NFSv2 types */
35 __u32 mode;
36 __u32 nlink;
37 __u32 uid;
38 __u32 gid;
39 dev_t rdev;
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 struct nfs_fsid fsid;
51 __u64 fileid;
52 struct timespec atime;
53 struct timespec mtime;
54 struct timespec ctime;
55 __u32 bitmap[2]; /* NFSv4 returned attribute bitmap */
56 __u64 change_attr; /* NFSv4 change attribute */
57 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
58 unsigned long time_start;
59 unsigned long gencount;
62 #define NFS_ATTR_FATTR_TYPE (1U << 0)
63 #define NFS_ATTR_FATTR_MODE (1U << 1)
64 #define NFS_ATTR_FATTR_NLINK (1U << 2)
65 #define NFS_ATTR_FATTR_OWNER (1U << 3)
66 #define NFS_ATTR_FATTR_GROUP (1U << 4)
67 #define NFS_ATTR_FATTR_RDEV (1U << 5)
68 #define NFS_ATTR_FATTR_SIZE (1U << 6)
69 #define NFS_ATTR_FATTR_PRESIZE (1U << 7)
70 #define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8)
71 #define NFS_ATTR_FATTR_SPACE_USED (1U << 9)
72 #define NFS_ATTR_FATTR_FSID (1U << 10)
73 #define NFS_ATTR_FATTR_FILEID (1U << 11)
74 #define NFS_ATTR_FATTR_ATIME (1U << 12)
75 #define NFS_ATTR_FATTR_MTIME (1U << 13)
76 #define NFS_ATTR_FATTR_CTIME (1U << 14)
77 #define NFS_ATTR_FATTR_PREMTIME (1U << 15)
78 #define NFS_ATTR_FATTR_PRECTIME (1U << 16)
79 #define NFS_ATTR_FATTR_CHANGE (1U << 17)
80 #define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
81 #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */
83 #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
84 | NFS_ATTR_FATTR_MODE \
85 | NFS_ATTR_FATTR_NLINK \
86 | NFS_ATTR_FATTR_OWNER \
87 | NFS_ATTR_FATTR_GROUP \
88 | NFS_ATTR_FATTR_RDEV \
89 | NFS_ATTR_FATTR_SIZE \
90 | NFS_ATTR_FATTR_FSID \
91 | NFS_ATTR_FATTR_FILEID \
92 | NFS_ATTR_FATTR_ATIME \
93 | NFS_ATTR_FATTR_MTIME \
94 | NFS_ATTR_FATTR_CTIME)
95 #define NFS_ATTR_FATTR_V2 (NFS_ATTR_FATTR \
96 | NFS_ATTR_FATTR_BLOCKS_USED)
97 #define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \
98 | NFS_ATTR_FATTR_SPACE_USED)
99 #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \
100 | NFS_ATTR_FATTR_SPACE_USED \
101 | NFS_ATTR_FATTR_CHANGE)
104 * Info on the file system
106 struct nfs_fsinfo {
107 struct nfs_fattr *fattr; /* Post-op attributes */
108 __u32 rtmax; /* max. read transfer size */
109 __u32 rtpref; /* pref. read transfer size */
110 __u32 rtmult; /* reads should be multiple of this */
111 __u32 wtmax; /* max. write transfer size */
112 __u32 wtpref; /* pref. write transfer size */
113 __u32 wtmult; /* writes should be multiple of this */
114 __u32 dtpref; /* pref. readdir transfer size */
115 __u64 maxfilesize;
116 __u32 lease_time; /* in seconds */
119 struct nfs_fsstat {
120 struct nfs_fattr *fattr; /* Post-op attributes */
121 __u64 tbytes; /* total size in bytes */
122 __u64 fbytes; /* # of free bytes */
123 __u64 abytes; /* # of bytes available to user */
124 __u64 tfiles; /* # of files */
125 __u64 ffiles; /* # of free files */
126 __u64 afiles; /* # of files available to user */
129 struct nfs2_fsstat {
130 __u32 tsize; /* Server transfer size */
131 __u32 bsize; /* Filesystem block size */
132 __u32 blocks; /* No. of "bsize" blocks on filesystem */
133 __u32 bfree; /* No. of free "bsize" blocks */
134 __u32 bavail; /* No. of available "bsize" blocks */
137 struct nfs_pathconf {
138 struct nfs_fattr *fattr; /* Post-op attributes */
139 __u32 max_link; /* max # of hard links */
140 __u32 max_namelen; /* max name length */
143 struct nfs4_change_info {
144 u32 atomic;
145 u64 before;
146 u64 after;
149 struct nfs_seqid;
151 * Arguments to the open call.
153 struct nfs_openargs {
154 const struct nfs_fh * fh;
155 struct nfs_seqid * seqid;
156 int open_flags;
157 fmode_t fmode;
158 __u64 clientid;
159 __u64 id;
160 union {
161 struct iattr * attrs; /* UNCHECKED, GUARDED */
162 nfs4_verifier verifier; /* EXCLUSIVE */
163 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
164 fmode_t delegation_type; /* CLAIM_PREVIOUS */
165 } u;
166 const struct qstr * name;
167 const struct nfs_server *server; /* Needed for ID mapping */
168 const u32 * bitmask;
169 __u32 claim;
172 struct nfs_openres {
173 nfs4_stateid stateid;
174 struct nfs_fh fh;
175 struct nfs4_change_info cinfo;
176 __u32 rflags;
177 struct nfs_fattr * f_attr;
178 struct nfs_fattr * dir_attr;
179 struct nfs_seqid * seqid;
180 const struct nfs_server *server;
181 fmode_t delegation_type;
182 nfs4_stateid delegation;
183 __u32 do_recall;
184 __u64 maxsize;
185 __u32 attrset[NFS4_BITMAP_SIZE];
189 * Arguments to the open_confirm call.
191 struct nfs_open_confirmargs {
192 const struct nfs_fh * fh;
193 nfs4_stateid * stateid;
194 struct nfs_seqid * seqid;
197 struct nfs_open_confirmres {
198 nfs4_stateid stateid;
199 struct nfs_seqid * seqid;
203 * Arguments to the close call.
205 struct nfs_closeargs {
206 struct nfs_fh * fh;
207 nfs4_stateid * stateid;
208 struct nfs_seqid * seqid;
209 fmode_t fmode;
210 const u32 * bitmask;
213 struct nfs_closeres {
214 nfs4_stateid stateid;
215 struct nfs_fattr * fattr;
216 struct nfs_seqid * seqid;
217 const struct nfs_server *server;
220 * * Arguments to the lock,lockt, and locku call.
221 * */
222 struct nfs_lowner {
223 __u64 clientid;
224 __u64 id;
227 struct nfs_lock_args {
228 struct nfs_fh * fh;
229 struct file_lock * fl;
230 struct nfs_seqid * lock_seqid;
231 nfs4_stateid * lock_stateid;
232 struct nfs_seqid * open_seqid;
233 nfs4_stateid * open_stateid;
234 struct nfs_lowner lock_owner;
235 unsigned char block : 1;
236 unsigned char reclaim : 1;
237 unsigned char new_lock_owner : 1;
240 struct nfs_lock_res {
241 nfs4_stateid stateid;
242 struct nfs_seqid * lock_seqid;
243 struct nfs_seqid * open_seqid;
246 struct nfs_locku_args {
247 struct nfs_fh * fh;
248 struct file_lock * fl;
249 struct nfs_seqid * seqid;
250 nfs4_stateid * stateid;
253 struct nfs_locku_res {
254 nfs4_stateid stateid;
255 struct nfs_seqid * seqid;
258 struct nfs_lockt_args {
259 struct nfs_fh * fh;
260 struct file_lock * fl;
261 struct nfs_lowner lock_owner;
264 struct nfs_lockt_res {
265 struct file_lock * denied; /* LOCK, LOCKT failed */
268 struct nfs4_delegreturnargs {
269 const struct nfs_fh *fhandle;
270 const nfs4_stateid *stateid;
271 const u32 * bitmask;
274 struct nfs4_delegreturnres {
275 struct nfs_fattr * fattr;
276 const struct nfs_server *server;
280 * Arguments to the read call.
282 struct nfs_readargs {
283 struct nfs_fh * fh;
284 struct nfs_open_context *context;
285 __u64 offset;
286 __u32 count;
287 unsigned int pgbase;
288 struct page ** pages;
291 struct nfs_readres {
292 struct nfs_fattr * fattr;
293 __u32 count;
294 int eof;
298 * Arguments to the write call.
300 struct nfs_writeargs {
301 struct nfs_fh * fh;
302 struct nfs_open_context *context;
303 __u64 offset;
304 __u32 count;
305 enum nfs3_stable_how stable;
306 unsigned int pgbase;
307 struct page ** pages;
308 const u32 * bitmask;
311 struct nfs_writeverf {
312 enum nfs3_stable_how committed;
313 __be32 verifier[2];
316 struct nfs_writeres {
317 struct nfs_fattr * fattr;
318 struct nfs_writeverf * verf;
319 __u32 count;
320 const struct nfs_server *server;
324 * Common arguments to the unlink call
326 struct nfs_removeargs {
327 const struct nfs_fh *fh;
328 struct qstr name;
329 const u32 * bitmask;
332 struct nfs_removeres {
333 const struct nfs_server *server;
334 struct nfs4_change_info cinfo;
335 struct nfs_fattr dir_attr;
339 * Argument struct for decode_entry function
341 struct nfs_entry {
342 __u64 ino;
343 __u64 cookie,
344 prev_cookie;
345 const char * name;
346 unsigned int len;
347 int eof;
348 struct nfs_fh * fh;
349 struct nfs_fattr * fattr;
353 * The following types are for NFSv2 only.
355 struct nfs_sattrargs {
356 struct nfs_fh * fh;
357 struct iattr * sattr;
360 struct nfs_diropargs {
361 struct nfs_fh * fh;
362 const char * name;
363 unsigned int len;
366 struct nfs_createargs {
367 struct nfs_fh * fh;
368 const char * name;
369 unsigned int len;
370 struct iattr * sattr;
373 struct nfs_renameargs {
374 struct nfs_fh * fromfh;
375 const char * fromname;
376 unsigned int fromlen;
377 struct nfs_fh * tofh;
378 const char * toname;
379 unsigned int tolen;
382 struct nfs_setattrargs {
383 struct nfs_fh * fh;
384 nfs4_stateid stateid;
385 struct iattr * iap;
386 const struct nfs_server * server; /* Needed for name mapping */
387 const u32 * bitmask;
390 struct nfs_setaclargs {
391 struct nfs_fh * fh;
392 size_t acl_len;
393 unsigned int acl_pgbase;
394 struct page ** acl_pages;
397 struct nfs_getaclargs {
398 struct nfs_fh * fh;
399 size_t acl_len;
400 unsigned int acl_pgbase;
401 struct page ** acl_pages;
404 struct nfs_setattrres {
405 struct nfs_fattr * fattr;
406 const struct nfs_server * server;
409 struct nfs_linkargs {
410 struct nfs_fh * fromfh;
411 struct nfs_fh * tofh;
412 const char * toname;
413 unsigned int tolen;
416 struct nfs_symlinkargs {
417 struct nfs_fh * fromfh;
418 const char * fromname;
419 unsigned int fromlen;
420 struct page ** pages;
421 unsigned int pathlen;
422 struct iattr * sattr;
425 struct nfs_readdirargs {
426 struct nfs_fh * fh;
427 __u32 cookie;
428 unsigned int count;
429 struct page ** pages;
432 struct nfs3_getaclargs {
433 struct nfs_fh * fh;
434 int mask;
435 struct page ** pages;
438 struct nfs3_setaclargs {
439 struct inode * inode;
440 int mask;
441 struct posix_acl * acl_access;
442 struct posix_acl * acl_default;
443 size_t len;
444 unsigned int npages;
445 struct page ** pages;
448 struct nfs_diropok {
449 struct nfs_fh * fh;
450 struct nfs_fattr * fattr;
453 struct nfs_readlinkargs {
454 struct nfs_fh * fh;
455 unsigned int pgbase;
456 unsigned int pglen;
457 struct page ** pages;
460 struct nfs3_sattrargs {
461 struct nfs_fh * fh;
462 struct iattr * sattr;
463 unsigned int guard;
464 struct timespec guardtime;
467 struct nfs3_diropargs {
468 struct nfs_fh * fh;
469 const char * name;
470 unsigned int len;
473 struct nfs3_accessargs {
474 struct nfs_fh * fh;
475 __u32 access;
478 struct nfs3_createargs {
479 struct nfs_fh * fh;
480 const char * name;
481 unsigned int len;
482 struct iattr * sattr;
483 enum nfs3_createmode createmode;
484 __be32 verifier[2];
487 struct nfs3_mkdirargs {
488 struct nfs_fh * fh;
489 const char * name;
490 unsigned int len;
491 struct iattr * sattr;
494 struct nfs3_symlinkargs {
495 struct nfs_fh * fromfh;
496 const char * fromname;
497 unsigned int fromlen;
498 struct page ** pages;
499 unsigned int pathlen;
500 struct iattr * sattr;
503 struct nfs3_mknodargs {
504 struct nfs_fh * fh;
505 const char * name;
506 unsigned int len;
507 enum nfs3_ftype type;
508 struct iattr * sattr;
509 dev_t rdev;
512 struct nfs3_renameargs {
513 struct nfs_fh * fromfh;
514 const char * fromname;
515 unsigned int fromlen;
516 struct nfs_fh * tofh;
517 const char * toname;
518 unsigned int tolen;
521 struct nfs3_linkargs {
522 struct nfs_fh * fromfh;
523 struct nfs_fh * tofh;
524 const char * toname;
525 unsigned int tolen;
528 struct nfs3_readdirargs {
529 struct nfs_fh * fh;
530 __u64 cookie;
531 __be32 verf[2];
532 int plus;
533 unsigned int count;
534 struct page ** pages;
537 struct nfs3_diropres {
538 struct nfs_fattr * dir_attr;
539 struct nfs_fh * fh;
540 struct nfs_fattr * fattr;
543 struct nfs3_accessres {
544 struct nfs_fattr * fattr;
545 __u32 access;
548 struct nfs3_readlinkargs {
549 struct nfs_fh * fh;
550 unsigned int pgbase;
551 unsigned int pglen;
552 struct page ** pages;
555 struct nfs3_renameres {
556 struct nfs_fattr * fromattr;
557 struct nfs_fattr * toattr;
560 struct nfs3_linkres {
561 struct nfs_fattr * dir_attr;
562 struct nfs_fattr * fattr;
565 struct nfs3_readdirres {
566 struct nfs_fattr * dir_attr;
567 __be32 * verf;
568 int plus;
571 struct nfs3_getaclres {
572 struct nfs_fattr * fattr;
573 int mask;
574 unsigned int acl_access_count;
575 unsigned int acl_default_count;
576 struct posix_acl * acl_access;
577 struct posix_acl * acl_default;
580 #ifdef CONFIG_NFS_V4
582 typedef u64 clientid4;
584 struct nfs4_accessargs {
585 const struct nfs_fh * fh;
586 const u32 * bitmask;
587 u32 access;
590 struct nfs4_accessres {
591 const struct nfs_server * server;
592 struct nfs_fattr * fattr;
593 u32 supported;
594 u32 access;
597 struct nfs4_create_arg {
598 u32 ftype;
599 union {
600 struct {
601 struct page ** pages;
602 unsigned int len;
603 } symlink; /* NF4LNK */
604 struct {
605 u32 specdata1;
606 u32 specdata2;
607 } device; /* NF4BLK, NF4CHR */
608 } u;
609 const struct qstr * name;
610 const struct nfs_server * server;
611 const struct iattr * attrs;
612 const struct nfs_fh * dir_fh;
613 const u32 * bitmask;
616 struct nfs4_create_res {
617 const struct nfs_server * server;
618 struct nfs_fh * fh;
619 struct nfs_fattr * fattr;
620 struct nfs4_change_info dir_cinfo;
621 struct nfs_fattr * dir_fattr;
624 struct nfs4_fsinfo_arg {
625 const struct nfs_fh * fh;
626 const u32 * bitmask;
629 struct nfs4_getattr_arg {
630 const struct nfs_fh * fh;
631 const u32 * bitmask;
634 struct nfs4_getattr_res {
635 const struct nfs_server * server;
636 struct nfs_fattr * fattr;
639 struct nfs4_link_arg {
640 const struct nfs_fh * fh;
641 const struct nfs_fh * dir_fh;
642 const struct qstr * name;
643 const u32 * bitmask;
646 struct nfs4_link_res {
647 const struct nfs_server * server;
648 struct nfs_fattr * fattr;
649 struct nfs4_change_info cinfo;
650 struct nfs_fattr * dir_attr;
654 struct nfs4_lookup_arg {
655 const struct nfs_fh * dir_fh;
656 const struct qstr * name;
657 const u32 * bitmask;
660 struct nfs4_lookup_res {
661 const struct nfs_server * server;
662 struct nfs_fattr * fattr;
663 struct nfs_fh * fh;
666 struct nfs4_lookup_root_arg {
667 const u32 * bitmask;
670 struct nfs4_pathconf_arg {
671 const struct nfs_fh * fh;
672 const u32 * bitmask;
675 struct nfs4_readdir_arg {
676 const struct nfs_fh * fh;
677 u64 cookie;
678 nfs4_verifier verifier;
679 u32 count;
680 struct page ** pages; /* zero-copy data */
681 unsigned int pgbase; /* zero-copy data */
682 const u32 * bitmask;
685 struct nfs4_readdir_res {
686 nfs4_verifier verifier;
687 unsigned int pgbase;
690 struct nfs4_readlink {
691 const struct nfs_fh * fh;
692 unsigned int pgbase;
693 unsigned int pglen; /* zero-copy data */
694 struct page ** pages; /* zero-copy data */
697 struct nfs4_rename_arg {
698 const struct nfs_fh * old_dir;
699 const struct nfs_fh * new_dir;
700 const struct qstr * old_name;
701 const struct qstr * new_name;
702 const u32 * bitmask;
705 struct nfs4_rename_res {
706 const struct nfs_server * server;
707 struct nfs4_change_info old_cinfo;
708 struct nfs_fattr * old_fattr;
709 struct nfs4_change_info new_cinfo;
710 struct nfs_fattr * new_fattr;
713 #define NFS4_SETCLIENTID_NAMELEN (127)
714 struct nfs4_setclientid {
715 const nfs4_verifier * sc_verifier;
716 unsigned int sc_name_len;
717 char sc_name[NFS4_SETCLIENTID_NAMELEN + 1];
718 u32 sc_prog;
719 unsigned int sc_netid_len;
720 char sc_netid[RPCBIND_MAXNETIDLEN + 1];
721 unsigned int sc_uaddr_len;
722 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
723 u32 sc_cb_ident;
726 struct nfs4_statfs_arg {
727 const struct nfs_fh * fh;
728 const u32 * bitmask;
731 struct nfs4_server_caps_res {
732 u32 attr_bitmask[2];
733 u32 acl_bitmask;
734 u32 has_links;
735 u32 has_symlinks;
738 struct nfs4_string {
739 unsigned int len;
740 char *data;
743 #define NFS4_PATHNAME_MAXCOMPONENTS 512
744 struct nfs4_pathname {
745 unsigned int ncomponents;
746 struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS];
749 #define NFS4_FS_LOCATION_MAXSERVERS 10
750 struct nfs4_fs_location {
751 unsigned int nservers;
752 struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS];
753 struct nfs4_pathname rootpath;
756 #define NFS4_FS_LOCATIONS_MAXENTRIES 10
757 struct nfs4_fs_locations {
758 struct nfs_fattr fattr;
759 const struct nfs_server *server;
760 struct nfs4_pathname fs_path;
761 int nlocations;
762 struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES];
765 struct nfs4_fs_locations_arg {
766 const struct nfs_fh *dir_fh;
767 const struct qstr *name;
768 struct page *page;
769 const u32 *bitmask;
772 #endif /* CONFIG_NFS_V4 */
774 struct nfs_page;
776 #define NFS_PAGEVEC_SIZE (8U)
778 struct nfs_read_data {
779 int flags;
780 struct rpc_task task;
781 struct inode *inode;
782 struct rpc_cred *cred;
783 struct nfs_fattr fattr; /* fattr storage */
784 struct list_head pages; /* Coalesced read requests */
785 struct nfs_page *req; /* multi ops per nfs_page */
786 struct page **pagevec;
787 unsigned int npages; /* Max length of pagevec */
788 struct nfs_readargs args;
789 struct nfs_readres res;
790 #ifdef CONFIG_NFS_V4
791 unsigned long timestamp; /* For lease renewal */
792 #endif
793 struct page *page_array[NFS_PAGEVEC_SIZE];
796 struct nfs_write_data {
797 int flags;
798 struct rpc_task task;
799 struct inode *inode;
800 struct rpc_cred *cred;
801 struct nfs_fattr fattr;
802 struct nfs_writeverf verf;
803 struct list_head pages; /* Coalesced requests we wish to flush */
804 struct nfs_page *req; /* multi ops per nfs_page */
805 struct page **pagevec;
806 unsigned int npages; /* Max length of pagevec */
807 struct nfs_writeargs args; /* argument struct */
808 struct nfs_writeres res; /* result struct */
809 #ifdef CONFIG_NFS_V4
810 unsigned long timestamp; /* For lease renewal */
811 #endif
812 struct page *page_array[NFS_PAGEVEC_SIZE];
815 struct nfs_access_entry;
818 * RPC procedure vector for NFSv2/NFSv3 demuxing
820 struct nfs_rpc_ops {
821 u32 version; /* Protocol version */
822 struct dentry_operations *dentry_ops;
823 const struct inode_operations *dir_inode_ops;
824 const struct inode_operations *file_inode_ops;
826 int (*getroot) (struct nfs_server *, struct nfs_fh *,
827 struct nfs_fsinfo *);
828 int (*lookupfh)(struct nfs_server *, struct nfs_fh *,
829 struct qstr *, struct nfs_fh *,
830 struct nfs_fattr *);
831 int (*getattr) (struct nfs_server *, struct nfs_fh *,
832 struct nfs_fattr *);
833 int (*setattr) (struct dentry *, struct nfs_fattr *,
834 struct iattr *);
835 int (*lookup) (struct inode *, struct qstr *,
836 struct nfs_fh *, struct nfs_fattr *);
837 int (*access) (struct inode *, struct nfs_access_entry *);
838 int (*readlink)(struct inode *, struct page *, unsigned int,
839 unsigned int);
840 int (*create) (struct inode *, struct dentry *,
841 struct iattr *, int, struct nameidata *);
842 int (*remove) (struct inode *, struct qstr *);
843 void (*unlink_setup) (struct rpc_message *, struct inode *dir);
844 int (*unlink_done) (struct rpc_task *, struct inode *);
845 int (*rename) (struct inode *, struct qstr *,
846 struct inode *, struct qstr *);
847 int (*link) (struct inode *, struct inode *, struct qstr *);
848 int (*symlink) (struct inode *, struct dentry *, struct page *,
849 unsigned int, struct iattr *);
850 int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
851 int (*rmdir) (struct inode *, struct qstr *);
852 int (*readdir) (struct dentry *, struct rpc_cred *,
853 u64, struct page *, unsigned int, int);
854 int (*mknod) (struct inode *, struct dentry *, struct iattr *,
855 dev_t);
856 int (*statfs) (struct nfs_server *, struct nfs_fh *,
857 struct nfs_fsstat *);
858 int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
859 struct nfs_fsinfo *);
860 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
861 struct nfs_pathconf *);
862 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
863 __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus);
864 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
865 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
866 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
867 int (*write_done) (struct rpc_task *, struct nfs_write_data *);
868 void (*commit_setup) (struct nfs_write_data *, struct rpc_message *);
869 int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
870 int (*lock)(struct file *, int, struct file_lock *);
871 int (*lock_check_bounds)(const struct file_lock *);
872 void (*clear_acl_cache)(struct inode *);
876 * NFS_CALL(getattr, inode, (fattr));
877 * into
878 * NFS_PROTO(inode)->getattr(fattr);
880 #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
883 * Function vectors etc. for the NFS client
885 extern const struct nfs_rpc_ops nfs_v2_clientops;
886 extern const struct nfs_rpc_ops nfs_v3_clientops;
887 extern const struct nfs_rpc_ops nfs_v4_clientops;
888 extern struct rpc_version nfs_version2;
889 extern struct rpc_version nfs_version3;
890 extern struct rpc_version nfs_version4;
892 extern struct rpc_version nfsacl_version3;
893 extern struct rpc_program nfsacl_program;
895 #endif