1 #ifndef _LINUX_NFS_XDR_H
2 #define _LINUX_NFS_XDR_H
4 #include <linux/nfsacl.h>
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)
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;
30 unsigned int valid; /* which fields are valid */
48 struct timespec atime;
49 struct timespec mtime;
50 struct timespec ctime;
51 __u64 change_attr; /* NFSv4 change attribute */
52 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
53 __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 */
56 unsigned long time_start;
57 unsigned long gencount;
60 #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 */
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)
102 * Info on the file system
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 */
114 __u32 lease_time; /* in seconds */
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 */
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 */
135 struct 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 */
141 struct nfs4_change_info {
149 /* nfs41 sessions channel attributes */
150 struct nfs4_channel_attrs {
154 u32 max_resp_sz_cached;
159 /* nfs41 sessions slot seqid */
164 struct nfs4_sequence_args {
165 struct nfs4_session *sa_session;
170 struct nfs4_sequence_res {
171 struct nfs4_session *sr_session;
172 u8 sr_slotid; /* slot used to send request */
173 int sr_status; /* sequence operation status */
174 unsigned long sr_renewal_time;
178 struct nfs4_get_lease_time_args {
179 struct nfs4_sequence_args la_seq_args;
182 struct nfs4_get_lease_time_res {
183 struct nfs_fsinfo *lr_fsinfo;
184 struct nfs4_sequence_res lr_seq_res;
188 * Arguments to the open call.
190 struct nfs_openargs {
191 const struct nfs_fh * fh;
192 struct nfs_seqid * seqid;
198 struct iattr * attrs; /* UNCHECKED, GUARDED */
199 nfs4_verifier verifier; /* EXCLUSIVE */
200 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
201 fmode_t delegation_type; /* CLAIM_PREVIOUS */
203 const struct qstr * name;
204 const struct nfs_server *server; /* Needed for ID mapping */
207 struct nfs4_sequence_args seq_args;
211 nfs4_stateid stateid;
213 struct nfs4_change_info cinfo;
215 struct nfs_fattr * f_attr;
216 struct nfs_fattr * dir_attr;
217 struct nfs_seqid * seqid;
218 const struct nfs_server *server;
219 fmode_t delegation_type;
220 nfs4_stateid delegation;
223 __u32 attrset[NFS4_BITMAP_SIZE];
224 struct nfs4_sequence_res seq_res;
228 * Arguments to the open_confirm call.
230 struct nfs_open_confirmargs {
231 const struct nfs_fh * fh;
232 nfs4_stateid * stateid;
233 struct nfs_seqid * seqid;
236 struct nfs_open_confirmres {
237 nfs4_stateid stateid;
238 struct nfs_seqid * seqid;
242 * Arguments to the close call.
244 struct nfs_closeargs {
246 nfs4_stateid * stateid;
247 struct nfs_seqid * seqid;
250 struct nfs4_sequence_args seq_args;
253 struct nfs_closeres {
254 nfs4_stateid stateid;
255 struct nfs_fattr * fattr;
256 struct nfs_seqid * seqid;
257 const struct nfs_server *server;
258 struct nfs4_sequence_res seq_res;
261 * * Arguments to the lock,lockt, and locku call.
268 struct nfs_lock_args {
270 struct file_lock * fl;
271 struct nfs_seqid * lock_seqid;
272 nfs4_stateid * lock_stateid;
273 struct nfs_seqid * open_seqid;
274 nfs4_stateid * open_stateid;
275 struct nfs_lowner lock_owner;
276 unsigned char block : 1;
277 unsigned char reclaim : 1;
278 unsigned char new_lock_owner : 1;
279 struct nfs4_sequence_args seq_args;
282 struct nfs_lock_res {
283 nfs4_stateid stateid;
284 struct nfs_seqid * lock_seqid;
285 struct nfs_seqid * open_seqid;
286 struct nfs4_sequence_res seq_res;
289 struct nfs_locku_args {
291 struct file_lock * fl;
292 struct nfs_seqid * seqid;
293 nfs4_stateid * stateid;
294 struct nfs4_sequence_args seq_args;
297 struct nfs_locku_res {
298 nfs4_stateid stateid;
299 struct nfs_seqid * seqid;
300 struct nfs4_sequence_res seq_res;
303 struct nfs_lockt_args {
305 struct file_lock * fl;
306 struct nfs_lowner lock_owner;
307 struct nfs4_sequence_args seq_args;
310 struct nfs_lockt_res {
311 struct file_lock * denied; /* LOCK, LOCKT failed */
312 struct nfs4_sequence_res seq_res;
315 struct nfs4_delegreturnargs {
316 const struct nfs_fh *fhandle;
317 const nfs4_stateid *stateid;
319 struct nfs4_sequence_args seq_args;
322 struct nfs4_delegreturnres {
323 struct nfs_fattr * fattr;
324 const struct nfs_server *server;
325 struct nfs4_sequence_res seq_res;
329 * Arguments to the read call.
331 struct nfs_readargs {
333 struct nfs_open_context *context;
337 struct page ** pages;
338 struct nfs4_sequence_args seq_args;
342 struct nfs_fattr * fattr;
345 struct nfs4_sequence_res seq_res;
349 * Arguments to the write call.
351 struct nfs_writeargs {
353 struct nfs_open_context *context;
356 enum nfs3_stable_how stable;
358 struct page ** pages;
360 struct nfs4_sequence_args seq_args;
363 struct nfs_writeverf {
364 enum nfs3_stable_how committed;
368 struct nfs_writeres {
369 struct nfs_fattr * fattr;
370 struct nfs_writeverf * verf;
372 const struct nfs_server *server;
373 struct nfs4_sequence_res seq_res;
377 * Common arguments to the unlink call
379 struct nfs_removeargs {
380 const struct nfs_fh *fh;
383 struct nfs4_sequence_args seq_args;
386 struct nfs_removeres {
387 const struct nfs_server *server;
388 struct nfs4_change_info cinfo;
389 struct nfs_fattr dir_attr;
390 struct nfs4_sequence_res seq_res;
394 * Argument struct for decode_entry function
404 struct nfs_fattr * fattr;
408 * The following types are for NFSv2 only.
410 struct nfs_sattrargs {
412 struct iattr * sattr;
415 struct nfs_diropargs {
421 struct nfs_createargs {
425 struct iattr * sattr;
428 struct nfs_renameargs {
429 struct nfs_fh * fromfh;
430 const char * fromname;
431 unsigned int fromlen;
432 struct nfs_fh * tofh;
437 struct nfs_setattrargs {
439 nfs4_stateid stateid;
441 const struct nfs_server * server; /* Needed for name mapping */
443 struct nfs4_sequence_args seq_args;
446 struct nfs_setaclargs {
449 unsigned int acl_pgbase;
450 struct page ** acl_pages;
451 struct nfs4_sequence_args seq_args;
454 struct nfs_setaclres {
455 struct nfs4_sequence_res seq_res;
458 struct nfs_getaclargs {
461 unsigned int acl_pgbase;
462 struct page ** acl_pages;
463 struct nfs4_sequence_args seq_args;
466 struct nfs_getaclres {
468 struct nfs4_sequence_res seq_res;
471 struct nfs_setattrres {
472 struct nfs_fattr * fattr;
473 const struct nfs_server * server;
474 struct nfs4_sequence_res seq_res;
477 struct nfs_linkargs {
478 struct nfs_fh * fromfh;
479 struct nfs_fh * tofh;
484 struct nfs_symlinkargs {
485 struct nfs_fh * fromfh;
486 const char * fromname;
487 unsigned int fromlen;
488 struct page ** pages;
489 unsigned int pathlen;
490 struct iattr * sattr;
493 struct nfs_readdirargs {
497 struct page ** pages;
500 struct nfs3_getaclargs {
503 struct page ** pages;
506 struct nfs3_setaclargs {
507 struct inode * inode;
509 struct posix_acl * acl_access;
510 struct posix_acl * acl_default;
513 struct page ** pages;
518 struct nfs_fattr * fattr;
521 struct nfs_readlinkargs {
525 struct page ** pages;
528 struct nfs3_sattrargs {
530 struct iattr * sattr;
532 struct timespec guardtime;
535 struct nfs3_diropargs {
541 struct nfs3_accessargs {
546 struct nfs3_createargs {
550 struct iattr * sattr;
551 enum nfs3_createmode createmode;
555 struct nfs3_mkdirargs {
559 struct iattr * sattr;
562 struct nfs3_symlinkargs {
563 struct nfs_fh * fromfh;
564 const char * fromname;
565 unsigned int fromlen;
566 struct page ** pages;
567 unsigned int pathlen;
568 struct iattr * sattr;
571 struct nfs3_mknodargs {
575 enum nfs3_ftype type;
576 struct iattr * sattr;
580 struct nfs3_renameargs {
581 struct nfs_fh * fromfh;
582 const char * fromname;
583 unsigned int fromlen;
584 struct nfs_fh * tofh;
589 struct nfs3_linkargs {
590 struct nfs_fh * fromfh;
591 struct nfs_fh * tofh;
596 struct nfs3_readdirargs {
602 struct page ** pages;
605 struct nfs3_diropres {
606 struct nfs_fattr * dir_attr;
608 struct nfs_fattr * fattr;
611 struct nfs3_accessres {
612 struct nfs_fattr * fattr;
616 struct nfs3_readlinkargs {
620 struct page ** pages;
623 struct nfs3_renameres {
624 struct nfs_fattr * fromattr;
625 struct nfs_fattr * toattr;
628 struct nfs3_linkres {
629 struct nfs_fattr * dir_attr;
630 struct nfs_fattr * fattr;
633 struct nfs3_readdirres {
634 struct nfs_fattr * dir_attr;
639 struct nfs3_getaclres {
640 struct nfs_fattr * fattr;
642 unsigned int acl_access_count;
643 unsigned int acl_default_count;
644 struct posix_acl * acl_access;
645 struct posix_acl * acl_default;
650 typedef u64 clientid4;
652 struct nfs4_accessargs {
653 const struct nfs_fh * fh;
656 struct nfs4_sequence_args seq_args;
659 struct nfs4_accessres {
660 const struct nfs_server * server;
661 struct nfs_fattr * fattr;
664 struct nfs4_sequence_res seq_res;
667 struct nfs4_create_arg {
671 struct page ** pages;
673 } symlink; /* NF4LNK */
677 } device; /* NF4BLK, NF4CHR */
679 const struct qstr * name;
680 const struct nfs_server * server;
681 const struct iattr * attrs;
682 const struct nfs_fh * dir_fh;
684 struct nfs4_sequence_args seq_args;
687 struct nfs4_create_res {
688 const struct nfs_server * server;
690 struct nfs_fattr * fattr;
691 struct nfs4_change_info dir_cinfo;
692 struct nfs_fattr * dir_fattr;
693 struct nfs4_sequence_res seq_res;
696 struct nfs4_fsinfo_arg {
697 const struct nfs_fh * fh;
699 struct nfs4_sequence_args seq_args;
702 struct nfs4_fsinfo_res {
703 struct nfs_fsinfo *fsinfo;
704 struct nfs4_sequence_res seq_res;
707 struct nfs4_getattr_arg {
708 const struct nfs_fh * fh;
710 struct nfs4_sequence_args seq_args;
713 struct nfs4_getattr_res {
714 const struct nfs_server * server;
715 struct nfs_fattr * fattr;
716 struct nfs4_sequence_res seq_res;
719 struct nfs4_link_arg {
720 const struct nfs_fh * fh;
721 const struct nfs_fh * dir_fh;
722 const struct qstr * name;
724 struct nfs4_sequence_args seq_args;
727 struct nfs4_link_res {
728 const struct nfs_server * server;
729 struct nfs_fattr * fattr;
730 struct nfs4_change_info cinfo;
731 struct nfs_fattr * dir_attr;
732 struct nfs4_sequence_res seq_res;
736 struct nfs4_lookup_arg {
737 const struct nfs_fh * dir_fh;
738 const struct qstr * name;
740 struct nfs4_sequence_args seq_args;
743 struct nfs4_lookup_res {
744 const struct nfs_server * server;
745 struct nfs_fattr * fattr;
747 struct nfs4_sequence_res seq_res;
750 struct nfs4_lookup_root_arg {
752 struct nfs4_sequence_args seq_args;
755 struct nfs4_pathconf_arg {
756 const struct nfs_fh * fh;
758 struct nfs4_sequence_args seq_args;
761 struct nfs4_pathconf_res {
762 struct nfs_pathconf *pathconf;
763 struct nfs4_sequence_res seq_res;
766 struct nfs4_readdir_arg {
767 const struct nfs_fh * fh;
769 nfs4_verifier verifier;
771 struct page ** pages; /* zero-copy data */
772 unsigned int pgbase; /* zero-copy data */
774 struct nfs4_sequence_args seq_args;
777 struct nfs4_readdir_res {
778 nfs4_verifier verifier;
780 struct nfs4_sequence_res seq_res;
783 struct nfs4_readlink {
784 const struct nfs_fh * fh;
786 unsigned int pglen; /* zero-copy data */
787 struct page ** pages; /* zero-copy data */
788 struct nfs4_sequence_args seq_args;
791 struct nfs4_readlink_res {
792 struct nfs4_sequence_res seq_res;
795 struct nfs4_rename_arg {
796 const struct nfs_fh * old_dir;
797 const struct nfs_fh * new_dir;
798 const struct qstr * old_name;
799 const struct qstr * new_name;
801 struct nfs4_sequence_args seq_args;
804 struct nfs4_rename_res {
805 const struct nfs_server * server;
806 struct nfs4_change_info old_cinfo;
807 struct nfs_fattr * old_fattr;
808 struct nfs4_change_info new_cinfo;
809 struct nfs_fattr * new_fattr;
810 struct nfs4_sequence_res seq_res;
813 #define NFS4_SETCLIENTID_NAMELEN (127)
814 struct nfs4_setclientid {
815 const nfs4_verifier * sc_verifier;
816 unsigned int sc_name_len;
817 char sc_name[NFS4_SETCLIENTID_NAMELEN + 1];
819 unsigned int sc_netid_len;
820 char sc_netid[RPCBIND_MAXNETIDLEN + 1];
821 unsigned int sc_uaddr_len;
822 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
826 struct nfs4_statfs_arg {
827 const struct nfs_fh * fh;
829 struct nfs4_sequence_args seq_args;
832 struct nfs4_statfs_res {
833 struct nfs_fsstat *fsstat;
834 struct nfs4_sequence_res seq_res;
837 struct nfs4_server_caps_arg {
838 struct nfs_fh *fhandle;
839 struct nfs4_sequence_args seq_args;
842 struct nfs4_server_caps_res {
847 struct nfs4_sequence_res seq_res;
855 #define NFS4_PATHNAME_MAXCOMPONENTS 512
856 struct nfs4_pathname {
857 unsigned int ncomponents;
858 struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS];
861 #define NFS4_FS_LOCATION_MAXSERVERS 10
862 struct nfs4_fs_location {
863 unsigned int nservers;
864 struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS];
865 struct nfs4_pathname rootpath;
868 #define NFS4_FS_LOCATIONS_MAXENTRIES 10
869 struct nfs4_fs_locations {
870 struct nfs_fattr fattr;
871 const struct nfs_server *server;
872 struct nfs4_pathname fs_path;
874 struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES];
877 struct nfs4_fs_locations_arg {
878 const struct nfs_fh *dir_fh;
879 const struct qstr *name;
882 struct nfs4_sequence_args seq_args;
885 struct nfs4_fs_locations_res {
886 struct nfs4_fs_locations *fs_locations;
887 struct nfs4_sequence_res seq_res;
890 #endif /* CONFIG_NFS_V4 */
897 #ifdef CONFIG_NFS_V4_1
898 struct nfs_impl_id4 {
903 struct nfstime4 date;
906 #define NFS4_EXCHANGE_ID_LEN (48)
907 struct nfs41_exchange_id_args {
908 struct nfs_client *client;
909 nfs4_verifier *verifier;
911 char id[NFS4_EXCHANGE_ID_LEN];
915 struct server_owner {
917 uint32_t major_id_sz;
918 char major_id[NFS4_OPAQUE_LIMIT];
921 struct server_scope {
922 uint32_t server_scope_sz;
923 char server_scope[NFS4_OPAQUE_LIMIT];
926 struct nfs41_exchange_id_res {
927 struct nfs_client *client;
931 struct nfs41_create_session_args {
932 struct nfs_client *client;
935 struct nfs4_channel_attrs fc_attrs; /* Fore Channel */
936 struct nfs4_channel_attrs bc_attrs; /* Back Channel */
939 struct nfs41_create_session_res {
940 struct nfs_client *client;
943 struct nfs41_reclaim_complete_args {
944 /* In the future extend to include curr_fh for use with migration */
945 unsigned char one_fs:1;
946 struct nfs4_sequence_args seq_args;
949 struct nfs41_reclaim_complete_res {
950 struct nfs4_sequence_res seq_res;
952 #endif /* CONFIG_NFS_V4_1 */
956 #define NFS_PAGEVEC_SIZE (8U)
958 struct nfs_read_data {
960 struct rpc_task task;
962 struct rpc_cred *cred;
963 struct nfs_fattr fattr; /* fattr storage */
964 struct list_head pages; /* Coalesced read requests */
965 struct nfs_page *req; /* multi ops per nfs_page */
966 struct page **pagevec;
967 unsigned int npages; /* Max length of pagevec */
968 struct nfs_readargs args;
969 struct nfs_readres res;
971 unsigned long timestamp; /* For lease renewal */
973 struct page *page_array[NFS_PAGEVEC_SIZE];
976 struct nfs_write_data {
978 struct rpc_task task;
980 struct rpc_cred *cred;
981 struct nfs_fattr fattr;
982 struct nfs_writeverf verf;
983 struct list_head pages; /* Coalesced requests we wish to flush */
984 struct nfs_page *req; /* multi ops per nfs_page */
985 struct page **pagevec;
986 unsigned int npages; /* Max length of pagevec */
987 struct nfs_writeargs args; /* argument struct */
988 struct nfs_writeres res; /* result struct */
990 unsigned long timestamp; /* For lease renewal */
992 struct page *page_array[NFS_PAGEVEC_SIZE];
995 struct nfs_access_entry;
998 * RPC procedure vector for NFSv2/NFSv3 demuxing
1000 struct nfs_rpc_ops {
1001 u32 version; /* Protocol version */
1002 const struct dentry_operations *dentry_ops;
1003 const struct inode_operations *dir_inode_ops;
1004 const struct inode_operations *file_inode_ops;
1006 int (*getroot) (struct nfs_server *, struct nfs_fh *,
1007 struct nfs_fsinfo *);
1008 int (*lookupfh)(struct nfs_server *, struct nfs_fh *,
1009 struct qstr *, struct nfs_fh *,
1010 struct nfs_fattr *);
1011 int (*getattr) (struct nfs_server *, struct nfs_fh *,
1012 struct nfs_fattr *);
1013 int (*setattr) (struct dentry *, struct nfs_fattr *,
1015 int (*lookup) (struct inode *, struct qstr *,
1016 struct nfs_fh *, struct nfs_fattr *);
1017 int (*access) (struct inode *, struct nfs_access_entry *);
1018 int (*readlink)(struct inode *, struct page *, unsigned int,
1020 int (*create) (struct inode *, struct dentry *,
1021 struct iattr *, int, struct nameidata *);
1022 int (*remove) (struct inode *, struct qstr *);
1023 void (*unlink_setup) (struct rpc_message *, struct inode *dir);
1024 int (*unlink_done) (struct rpc_task *, struct inode *);
1025 int (*rename) (struct inode *, struct qstr *,
1026 struct inode *, struct qstr *);
1027 int (*link) (struct inode *, struct inode *, struct qstr *);
1028 int (*symlink) (struct inode *, struct dentry *, struct page *,
1029 unsigned int, struct iattr *);
1030 int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
1031 int (*rmdir) (struct inode *, struct qstr *);
1032 int (*readdir) (struct dentry *, struct rpc_cred *,
1033 u64, struct page *, unsigned int, int);
1034 int (*mknod) (struct inode *, struct dentry *, struct iattr *,
1036 int (*statfs) (struct nfs_server *, struct nfs_fh *,
1037 struct nfs_fsstat *);
1038 int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
1039 struct nfs_fsinfo *);
1040 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
1041 struct nfs_pathconf *);
1042 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1043 __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus);
1044 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
1045 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
1046 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
1047 int (*write_done) (struct rpc_task *, struct nfs_write_data *);
1048 void (*commit_setup) (struct nfs_write_data *, struct rpc_message *);
1049 int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
1050 int (*lock)(struct file *, int, struct file_lock *);
1051 int (*lock_check_bounds)(const struct file_lock *);
1052 void (*clear_acl_cache)(struct inode *);
1053 void (*close_context)(struct nfs_open_context *ctx, int);
1057 * NFS_CALL(getattr, inode, (fattr));
1059 * NFS_PROTO(inode)->getattr(fattr);
1061 #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
1064 * Function vectors etc. for the NFS client
1066 extern const struct nfs_rpc_ops nfs_v2_clientops;
1067 extern const struct nfs_rpc_ops nfs_v3_clientops;
1068 extern const struct nfs_rpc_ops nfs_v4_clientops;
1069 extern struct rpc_version nfs_version2;
1070 extern struct rpc_version nfs_version3;
1071 extern struct rpc_version nfs_version4;
1073 extern struct rpc_version nfsacl_version3;
1074 extern struct rpc_program nfsacl_program;