1 #ifndef _LINUX_NFS_XDR_H
2 #define _LINUX_NFS_XDR_H
4 #include <linux/nfsacl.h>
5 #include <linux/nfs3.h>
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.
13 #define NFS_MAX_FILE_IO_SIZE (1048576U)
14 #define NFS_DEF_FILE_IO_SIZE (4096U)
15 #define NFS_MIN_FILE_IO_SIZE (1024U)
23 * Helper for checking equality between 2 fsids.
25 static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b)
27 return a->major == b->major && a->minor == b->minor;
31 unsigned int valid; /* which fields are valid */
49 struct timespec atime;
50 struct timespec mtime;
51 struct timespec ctime;
52 __u64 change_attr; /* NFSv4 change attribute */
53 __u64 pre_change_attr;/* pre-op NFSv4 change attribute */
54 __u64 pre_size; /* pre_op_attr.size */
55 struct timespec pre_mtime; /* pre_op_attr.mtime */
56 struct timespec pre_ctime; /* pre_op_attr.ctime */
57 unsigned long time_start;
58 unsigned long gencount;
61 #define NFS_ATTR_FATTR_TYPE (1U << 0)
62 #define NFS_ATTR_FATTR_MODE (1U << 1)
63 #define NFS_ATTR_FATTR_NLINK (1U << 2)
64 #define NFS_ATTR_FATTR_OWNER (1U << 3)
65 #define NFS_ATTR_FATTR_GROUP (1U << 4)
66 #define NFS_ATTR_FATTR_RDEV (1U << 5)
67 #define NFS_ATTR_FATTR_SIZE (1U << 6)
68 #define NFS_ATTR_FATTR_PRESIZE (1U << 7)
69 #define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8)
70 #define NFS_ATTR_FATTR_SPACE_USED (1U << 9)
71 #define NFS_ATTR_FATTR_FSID (1U << 10)
72 #define NFS_ATTR_FATTR_FILEID (1U << 11)
73 #define NFS_ATTR_FATTR_ATIME (1U << 12)
74 #define NFS_ATTR_FATTR_MTIME (1U << 13)
75 #define NFS_ATTR_FATTR_CTIME (1U << 14)
76 #define NFS_ATTR_FATTR_PREMTIME (1U << 15)
77 #define NFS_ATTR_FATTR_PRECTIME (1U << 16)
78 #define NFS_ATTR_FATTR_CHANGE (1U << 17)
79 #define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
80 #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */
82 #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
83 | NFS_ATTR_FATTR_MODE \
84 | NFS_ATTR_FATTR_NLINK \
85 | NFS_ATTR_FATTR_OWNER \
86 | NFS_ATTR_FATTR_GROUP \
87 | NFS_ATTR_FATTR_RDEV \
88 | NFS_ATTR_FATTR_SIZE \
89 | NFS_ATTR_FATTR_FSID \
90 | NFS_ATTR_FATTR_FILEID \
91 | NFS_ATTR_FATTR_ATIME \
92 | NFS_ATTR_FATTR_MTIME \
93 | NFS_ATTR_FATTR_CTIME)
94 #define NFS_ATTR_FATTR_V2 (NFS_ATTR_FATTR \
95 | NFS_ATTR_FATTR_BLOCKS_USED)
96 #define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \
97 | NFS_ATTR_FATTR_SPACE_USED)
98 #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \
99 | NFS_ATTR_FATTR_SPACE_USED \
100 | NFS_ATTR_FATTR_CHANGE)
103 * Info on the file system
106 struct nfs_fattr *fattr; /* Post-op attributes */
107 __u32 rtmax; /* max. read transfer size */
108 __u32 rtpref; /* pref. read transfer size */
109 __u32 rtmult; /* reads should be multiple of this */
110 __u32 wtmax; /* max. write transfer size */
111 __u32 wtpref; /* pref. write transfer size */
112 __u32 wtmult; /* writes should be multiple of this */
113 __u32 dtpref; /* pref. readdir transfer size */
115 struct timespec time_delta; /* server time granularity */
116 __u32 lease_time; /* in seconds */
117 __u32 layouttype; /* supported pnfs layout driver */
121 struct nfs_fattr *fattr; /* Post-op attributes */
122 __u64 tbytes; /* total size in bytes */
123 __u64 fbytes; /* # of free bytes */
124 __u64 abytes; /* # of bytes available to user */
125 __u64 tfiles; /* # of files */
126 __u64 ffiles; /* # of free files */
127 __u64 afiles; /* # of files available to user */
131 __u32 tsize; /* Server transfer size */
132 __u32 bsize; /* Filesystem block size */
133 __u32 blocks; /* No. of "bsize" blocks on filesystem */
134 __u32 bfree; /* No. of free "bsize" blocks */
135 __u32 bavail; /* No. of available "bsize" blocks */
138 struct nfs_pathconf {
139 struct nfs_fattr *fattr; /* Post-op attributes */
140 __u32 max_link; /* max # of hard links */
141 __u32 max_namelen; /* max name length */
144 struct nfs4_change_info {
152 /* nfs41 sessions channel attributes */
153 struct nfs4_channel_attrs {
157 u32 max_resp_sz_cached;
162 /* nfs41 sessions slot seqid */
167 struct nfs4_sequence_args {
168 struct nfs4_session *sa_session;
173 struct nfs4_sequence_res {
174 struct nfs4_session *sr_session;
175 struct nfs4_slot *sr_slot; /* slot used to send request */
176 int sr_status; /* sequence operation status */
177 unsigned long sr_renewal_time;
181 struct nfs4_get_lease_time_args {
182 struct nfs4_sequence_args la_seq_args;
185 struct nfs4_get_lease_time_res {
186 struct nfs_fsinfo *lr_fsinfo;
187 struct nfs4_sequence_res lr_seq_res;
190 #define PNFS_LAYOUT_MAXSIZE 4096
192 struct nfs4_layoutdriver_data {
197 struct pnfs_layout_range {
203 struct nfs4_layoutget_args {
205 struct pnfs_layout_range range;
209 struct nfs_open_context *ctx;
210 struct nfs4_sequence_args seq_args;
213 struct nfs4_layoutget_res {
214 __u32 return_on_close;
215 struct pnfs_layout_range range;
217 nfs4_stateid stateid;
218 struct nfs4_layoutdriver_data layout;
219 struct nfs4_sequence_res seq_res;
222 struct nfs4_layoutget {
223 struct nfs4_layoutget_args args;
224 struct nfs4_layoutget_res res;
225 struct pnfs_layout_segment **lsegpp;
229 struct nfs4_getdeviceinfo_args {
230 struct pnfs_device *pdev;
231 struct nfs4_sequence_args seq_args;
234 struct nfs4_getdeviceinfo_res {
235 struct pnfs_device *pdev;
236 struct nfs4_sequence_res seq_res;
240 * Arguments to the open call.
242 struct nfs_openargs {
243 const struct nfs_fh * fh;
244 struct nfs_seqid * seqid;
251 struct iattr * attrs; /* UNCHECKED, GUARDED */
252 nfs4_verifier verifier; /* EXCLUSIVE */
254 nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
255 fmode_t delegation_type; /* CLAIM_PREVIOUS */
257 const struct qstr * name;
258 const struct nfs_server *server; /* Needed for ID mapping */
261 struct nfs4_sequence_args seq_args;
265 nfs4_stateid stateid;
267 struct nfs4_change_info cinfo;
269 struct nfs_fattr * f_attr;
270 struct nfs_fattr * dir_attr;
271 struct nfs_seqid * seqid;
272 const struct nfs_server *server;
273 fmode_t delegation_type;
274 nfs4_stateid delegation;
277 __u32 attrset[NFS4_BITMAP_SIZE];
278 struct nfs4_sequence_res seq_res;
282 * Arguments to the open_confirm call.
284 struct nfs_open_confirmargs {
285 const struct nfs_fh * fh;
286 nfs4_stateid * stateid;
287 struct nfs_seqid * seqid;
290 struct nfs_open_confirmres {
291 nfs4_stateid stateid;
292 struct nfs_seqid * seqid;
296 * Arguments to the close call.
298 struct nfs_closeargs {
300 nfs4_stateid * stateid;
301 struct nfs_seqid * seqid;
304 struct nfs4_sequence_args seq_args;
307 struct nfs_closeres {
308 nfs4_stateid stateid;
309 struct nfs_fattr * fattr;
310 struct nfs_seqid * seqid;
311 const struct nfs_server *server;
312 struct nfs4_sequence_res seq_res;
315 * * Arguments to the lock,lockt, and locku call.
322 struct nfs_lock_args {
324 struct file_lock * fl;
325 struct nfs_seqid * lock_seqid;
326 nfs4_stateid * lock_stateid;
327 struct nfs_seqid * open_seqid;
328 nfs4_stateid * open_stateid;
329 struct nfs_lowner lock_owner;
330 unsigned char block : 1;
331 unsigned char reclaim : 1;
332 unsigned char new_lock_owner : 1;
333 struct nfs4_sequence_args seq_args;
336 struct nfs_lock_res {
337 nfs4_stateid stateid;
338 struct nfs_seqid * lock_seqid;
339 struct nfs_seqid * open_seqid;
340 struct nfs4_sequence_res seq_res;
343 struct nfs_locku_args {
345 struct file_lock * fl;
346 struct nfs_seqid * seqid;
347 nfs4_stateid * stateid;
348 struct nfs4_sequence_args seq_args;
351 struct nfs_locku_res {
352 nfs4_stateid stateid;
353 struct nfs_seqid * seqid;
354 struct nfs4_sequence_res seq_res;
357 struct nfs_lockt_args {
359 struct file_lock * fl;
360 struct nfs_lowner lock_owner;
361 struct nfs4_sequence_args seq_args;
364 struct nfs_lockt_res {
365 struct file_lock * denied; /* LOCK, LOCKT failed */
366 struct nfs4_sequence_res seq_res;
369 struct nfs_release_lockowner_args {
370 struct nfs_lowner lock_owner;
373 struct nfs4_delegreturnargs {
374 const struct nfs_fh *fhandle;
375 const nfs4_stateid *stateid;
377 struct nfs4_sequence_args seq_args;
380 struct nfs4_delegreturnres {
381 struct nfs_fattr * fattr;
382 const struct nfs_server *server;
383 struct nfs4_sequence_res seq_res;
387 * Arguments to the read call.
389 struct nfs_readargs {
391 struct nfs_open_context *context;
392 struct nfs_lock_context *lock_context;
396 struct page ** pages;
397 struct nfs4_sequence_args seq_args;
401 struct nfs_fattr * fattr;
404 struct nfs4_sequence_res seq_res;
408 * Arguments to the write call.
410 struct nfs_writeargs {
412 struct nfs_open_context *context;
413 struct nfs_lock_context *lock_context;
416 enum nfs3_stable_how stable;
418 struct page ** pages;
420 struct nfs4_sequence_args seq_args;
423 struct nfs_writeverf {
424 enum nfs3_stable_how committed;
428 struct nfs_writeres {
429 struct nfs_fattr * fattr;
430 struct nfs_writeverf * verf;
432 const struct nfs_server *server;
433 struct nfs4_sequence_res seq_res;
437 * Common arguments to the unlink call
439 struct nfs_removeargs {
440 const struct nfs_fh *fh;
443 struct nfs4_sequence_args seq_args;
446 struct nfs_removeres {
447 const struct nfs_server *server;
448 struct nfs_fattr *dir_attr;
449 struct nfs4_change_info cinfo;
450 struct nfs4_sequence_res seq_res;
454 * Common arguments to the rename call
456 struct nfs_renameargs {
457 const struct nfs_fh *old_dir;
458 const struct nfs_fh *new_dir;
459 const struct qstr *old_name;
460 const struct qstr *new_name;
462 struct nfs4_sequence_args seq_args;
465 struct nfs_renameres {
466 const struct nfs_server *server;
467 struct nfs4_change_info old_cinfo;
468 struct nfs_fattr *old_fattr;
469 struct nfs4_change_info new_cinfo;
470 struct nfs_fattr *new_fattr;
471 struct nfs4_sequence_res seq_res;
475 * Argument struct for decode_entry function
485 struct nfs_fattr * fattr;
486 unsigned char d_type;
490 * The following types are for NFSv2 only.
492 struct nfs_sattrargs {
494 struct iattr * sattr;
497 struct nfs_diropargs {
503 struct nfs_createargs {
507 struct iattr * sattr;
510 struct nfs_setattrargs {
512 nfs4_stateid stateid;
514 const struct nfs_server * server; /* Needed for name mapping */
516 struct nfs4_sequence_args seq_args;
519 struct nfs_setaclargs {
522 unsigned int acl_pgbase;
523 struct page ** acl_pages;
524 struct nfs4_sequence_args seq_args;
527 struct nfs_setaclres {
528 struct nfs4_sequence_res seq_res;
531 struct nfs_getaclargs {
534 unsigned int acl_pgbase;
535 struct page ** acl_pages;
536 struct nfs4_sequence_args seq_args;
539 struct nfs_getaclres {
541 struct nfs4_sequence_res seq_res;
544 struct nfs_setattrres {
545 struct nfs_fattr * fattr;
546 const struct nfs_server * server;
547 struct nfs4_sequence_res seq_res;
550 struct nfs_linkargs {
551 struct nfs_fh * fromfh;
552 struct nfs_fh * tofh;
557 struct nfs_symlinkargs {
558 struct nfs_fh * fromfh;
559 const char * fromname;
560 unsigned int fromlen;
561 struct page ** pages;
562 unsigned int pathlen;
563 struct iattr * sattr;
566 struct nfs_readdirargs {
570 struct page ** pages;
573 struct nfs3_getaclargs {
576 struct page ** pages;
579 struct nfs3_setaclargs {
580 struct inode * inode;
582 struct posix_acl * acl_access;
583 struct posix_acl * acl_default;
586 struct page ** pages;
591 struct nfs_fattr * fattr;
594 struct nfs_readlinkargs {
598 struct page ** pages;
601 struct nfs3_sattrargs {
603 struct iattr * sattr;
605 struct timespec guardtime;
608 struct nfs3_diropargs {
614 struct nfs3_accessargs {
619 struct nfs3_createargs {
623 struct iattr * sattr;
624 enum nfs3_createmode createmode;
628 struct nfs3_mkdirargs {
632 struct iattr * sattr;
635 struct nfs3_symlinkargs {
636 struct nfs_fh * fromfh;
637 const char * fromname;
638 unsigned int fromlen;
639 struct page ** pages;
640 unsigned int pathlen;
641 struct iattr * sattr;
644 struct nfs3_mknodargs {
648 enum nfs3_ftype type;
649 struct iattr * sattr;
653 struct nfs3_linkargs {
654 struct nfs_fh * fromfh;
655 struct nfs_fh * tofh;
660 struct nfs3_readdirargs {
666 struct page ** pages;
669 struct nfs3_diropres {
670 struct nfs_fattr * dir_attr;
672 struct nfs_fattr * fattr;
675 struct nfs3_accessres {
676 struct nfs_fattr * fattr;
680 struct nfs3_readlinkargs {
684 struct page ** pages;
687 struct nfs3_linkres {
688 struct nfs_fattr * dir_attr;
689 struct nfs_fattr * fattr;
692 struct nfs3_readdirres {
693 struct nfs_fattr * dir_attr;
698 struct nfs3_getaclres {
699 struct nfs_fattr * fattr;
701 unsigned int acl_access_count;
702 unsigned int acl_default_count;
703 struct posix_acl * acl_access;
704 struct posix_acl * acl_default;
709 typedef u64 clientid4;
711 struct nfs4_accessargs {
712 const struct nfs_fh * fh;
715 struct nfs4_sequence_args seq_args;
718 struct nfs4_accessres {
719 const struct nfs_server * server;
720 struct nfs_fattr * fattr;
723 struct nfs4_sequence_res seq_res;
726 struct nfs4_create_arg {
730 struct page ** pages;
732 } symlink; /* NF4LNK */
736 } device; /* NF4BLK, NF4CHR */
738 const struct qstr * name;
739 const struct nfs_server * server;
740 const struct iattr * attrs;
741 const struct nfs_fh * dir_fh;
743 struct nfs4_sequence_args seq_args;
746 struct nfs4_create_res {
747 const struct nfs_server * server;
749 struct nfs_fattr * fattr;
750 struct nfs4_change_info dir_cinfo;
751 struct nfs_fattr * dir_fattr;
752 struct nfs4_sequence_res seq_res;
755 struct nfs4_fsinfo_arg {
756 const struct nfs_fh * fh;
758 struct nfs4_sequence_args seq_args;
761 struct nfs4_fsinfo_res {
762 struct nfs_fsinfo *fsinfo;
763 struct nfs4_sequence_res seq_res;
766 struct nfs4_getattr_arg {
767 const struct nfs_fh * fh;
769 struct nfs4_sequence_args seq_args;
772 struct nfs4_getattr_res {
773 const struct nfs_server * server;
774 struct nfs_fattr * fattr;
775 struct nfs4_sequence_res seq_res;
778 struct nfs4_link_arg {
779 const struct nfs_fh * fh;
780 const struct nfs_fh * dir_fh;
781 const struct qstr * name;
783 struct nfs4_sequence_args seq_args;
786 struct nfs4_link_res {
787 const struct nfs_server * server;
788 struct nfs_fattr * fattr;
789 struct nfs4_change_info cinfo;
790 struct nfs_fattr * dir_attr;
791 struct nfs4_sequence_res seq_res;
795 struct nfs4_lookup_arg {
796 const struct nfs_fh * dir_fh;
797 const struct qstr * name;
799 struct nfs4_sequence_args seq_args;
802 struct nfs4_lookup_res {
803 const struct nfs_server * server;
804 struct nfs_fattr * fattr;
806 struct nfs4_sequence_res seq_res;
809 struct nfs4_lookup_root_arg {
811 struct nfs4_sequence_args seq_args;
814 struct nfs4_pathconf_arg {
815 const struct nfs_fh * fh;
817 struct nfs4_sequence_args seq_args;
820 struct nfs4_pathconf_res {
821 struct nfs_pathconf *pathconf;
822 struct nfs4_sequence_res seq_res;
825 struct nfs4_readdir_arg {
826 const struct nfs_fh * fh;
828 nfs4_verifier verifier;
830 struct page ** pages; /* zero-copy data */
831 unsigned int pgbase; /* zero-copy data */
834 struct nfs4_sequence_args seq_args;
837 struct nfs4_readdir_res {
838 nfs4_verifier verifier;
840 struct nfs4_sequence_res seq_res;
843 struct nfs4_readlink {
844 const struct nfs_fh * fh;
846 unsigned int pglen; /* zero-copy data */
847 struct page ** pages; /* zero-copy data */
848 struct nfs4_sequence_args seq_args;
851 struct nfs4_readlink_res {
852 struct nfs4_sequence_res seq_res;
855 #define NFS4_SETCLIENTID_NAMELEN (127)
856 struct nfs4_setclientid {
857 const nfs4_verifier * sc_verifier;
858 unsigned int sc_name_len;
859 char sc_name[NFS4_SETCLIENTID_NAMELEN + 1];
861 unsigned int sc_netid_len;
862 char sc_netid[RPCBIND_MAXNETIDLEN + 1];
863 unsigned int sc_uaddr_len;
864 char sc_uaddr[RPCBIND_MAXUADDRLEN + 1];
868 struct nfs4_setclientid_res {
870 nfs4_verifier confirm;
873 struct nfs4_statfs_arg {
874 const struct nfs_fh * fh;
876 struct nfs4_sequence_args seq_args;
879 struct nfs4_statfs_res {
880 struct nfs_fsstat *fsstat;
881 struct nfs4_sequence_res seq_res;
884 struct nfs4_server_caps_arg {
885 struct nfs_fh *fhandle;
886 struct nfs4_sequence_args seq_args;
889 struct nfs4_server_caps_res {
894 struct nfs4_sequence_res seq_res;
902 #define NFS4_PATHNAME_MAXCOMPONENTS 512
903 struct nfs4_pathname {
904 unsigned int ncomponents;
905 struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS];
908 #define NFS4_FS_LOCATION_MAXSERVERS 10
909 struct nfs4_fs_location {
910 unsigned int nservers;
911 struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS];
912 struct nfs4_pathname rootpath;
915 #define NFS4_FS_LOCATIONS_MAXENTRIES 10
916 struct nfs4_fs_locations {
917 struct nfs_fattr fattr;
918 const struct nfs_server *server;
919 struct nfs4_pathname fs_path;
921 struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES];
924 struct nfs4_fs_locations_arg {
925 const struct nfs_fh *dir_fh;
926 const struct qstr *name;
929 struct nfs4_sequence_args seq_args;
932 struct nfs4_fs_locations_res {
933 struct nfs4_fs_locations *fs_locations;
934 struct nfs4_sequence_res seq_res;
937 #endif /* CONFIG_NFS_V4 */
944 #ifdef CONFIG_NFS_V4_1
945 struct nfs_impl_id4 {
950 struct nfstime4 date;
953 #define NFS4_EXCHANGE_ID_LEN (48)
954 struct nfs41_exchange_id_args {
955 struct nfs_client *client;
956 nfs4_verifier *verifier;
958 char id[NFS4_EXCHANGE_ID_LEN];
962 struct server_owner {
964 uint32_t major_id_sz;
965 char major_id[NFS4_OPAQUE_LIMIT];
968 struct server_scope {
969 uint32_t server_scope_sz;
970 char server_scope[NFS4_OPAQUE_LIMIT];
973 struct nfs41_exchange_id_res {
974 struct nfs_client *client;
978 struct nfs41_create_session_args {
979 struct nfs_client *client;
982 struct nfs4_channel_attrs fc_attrs; /* Fore Channel */
983 struct nfs4_channel_attrs bc_attrs; /* Back Channel */
986 struct nfs41_create_session_res {
987 struct nfs_client *client;
990 struct nfs41_reclaim_complete_args {
991 /* In the future extend to include curr_fh for use with migration */
992 unsigned char one_fs:1;
993 struct nfs4_sequence_args seq_args;
996 struct nfs41_reclaim_complete_res {
997 struct nfs4_sequence_res seq_res;
999 #endif /* CONFIG_NFS_V4_1 */
1003 #define NFS_PAGEVEC_SIZE (8U)
1005 struct nfs_read_data {
1007 struct rpc_task task;
1008 struct inode *inode;
1009 struct rpc_cred *cred;
1010 struct nfs_fattr fattr; /* fattr storage */
1011 struct list_head pages; /* Coalesced read requests */
1012 struct nfs_page *req; /* multi ops per nfs_page */
1013 struct page **pagevec;
1014 unsigned int npages; /* Max length of pagevec */
1015 struct nfs_readargs args;
1016 struct nfs_readres res;
1017 #ifdef CONFIG_NFS_V4
1018 unsigned long timestamp; /* For lease renewal */
1020 struct page *page_array[NFS_PAGEVEC_SIZE];
1023 struct nfs_write_data {
1025 struct rpc_task task;
1026 struct inode *inode;
1027 struct rpc_cred *cred;
1028 struct nfs_fattr fattr;
1029 struct nfs_writeverf verf;
1030 struct list_head pages; /* Coalesced requests we wish to flush */
1031 struct nfs_page *req; /* multi ops per nfs_page */
1032 struct page **pagevec;
1033 unsigned int npages; /* Max length of pagevec */
1034 struct nfs_writeargs args; /* argument struct */
1035 struct nfs_writeres res; /* result struct */
1036 #ifdef CONFIG_NFS_V4
1037 unsigned long timestamp; /* For lease renewal */
1039 struct page *page_array[NFS_PAGEVEC_SIZE];
1042 struct nfs_access_entry;
1045 * RPC procedure vector for NFSv2/NFSv3 demuxing
1047 struct nfs_rpc_ops {
1048 u32 version; /* Protocol version */
1049 const struct dentry_operations *dentry_ops;
1050 const struct inode_operations *dir_inode_ops;
1051 const struct inode_operations *file_inode_ops;
1053 int (*getroot) (struct nfs_server *, struct nfs_fh *,
1054 struct nfs_fsinfo *);
1055 int (*lookupfh)(struct nfs_server *, struct nfs_fh *,
1056 struct qstr *, struct nfs_fh *,
1057 struct nfs_fattr *);
1058 int (*getattr) (struct nfs_server *, struct nfs_fh *,
1059 struct nfs_fattr *);
1060 int (*setattr) (struct dentry *, struct nfs_fattr *,
1062 int (*lookup) (struct inode *, struct qstr *,
1063 struct nfs_fh *, struct nfs_fattr *);
1064 int (*access) (struct inode *, struct nfs_access_entry *);
1065 int (*readlink)(struct inode *, struct page *, unsigned int,
1067 int (*create) (struct inode *, struct dentry *,
1068 struct iattr *, int, struct nfs_open_context *);
1069 int (*remove) (struct inode *, struct qstr *);
1070 void (*unlink_setup) (struct rpc_message *, struct inode *dir);
1071 int (*unlink_done) (struct rpc_task *, struct inode *);
1072 int (*rename) (struct inode *, struct qstr *,
1073 struct inode *, struct qstr *);
1074 void (*rename_setup) (struct rpc_message *msg, struct inode *dir);
1075 int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);
1076 int (*link) (struct inode *, struct inode *, struct qstr *);
1077 int (*symlink) (struct inode *, struct dentry *, struct page *,
1078 unsigned int, struct iattr *);
1079 int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
1080 int (*rmdir) (struct inode *, struct qstr *);
1081 int (*readdir) (struct dentry *, struct rpc_cred *,
1082 u64, struct page **, unsigned int, int);
1083 int (*mknod) (struct inode *, struct dentry *, struct iattr *,
1085 int (*statfs) (struct nfs_server *, struct nfs_fh *,
1086 struct nfs_fsstat *);
1087 int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
1088 struct nfs_fsinfo *);
1089 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
1090 struct nfs_pathconf *);
1091 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1092 __be32 *(*decode_dirent)(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int plus);
1093 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
1094 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
1095 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);
1096 int (*write_done) (struct rpc_task *, struct nfs_write_data *);
1097 void (*commit_setup) (struct nfs_write_data *, struct rpc_message *);
1098 int (*commit_done) (struct rpc_task *, struct nfs_write_data *);
1099 int (*lock)(struct file *, int, struct file_lock *);
1100 int (*lock_check_bounds)(const struct file_lock *);
1101 void (*clear_acl_cache)(struct inode *);
1102 void (*close_context)(struct nfs_open_context *ctx, int);
1103 struct inode * (*open_context) (struct inode *dir,
1104 struct nfs_open_context *ctx,
1106 struct iattr *iattr);
1110 * NFS_CALL(getattr, inode, (fattr));
1112 * NFS_PROTO(inode)->getattr(fattr);
1114 #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
1117 * Function vectors etc. for the NFS client
1119 extern const struct nfs_rpc_ops nfs_v2_clientops;
1120 extern const struct nfs_rpc_ops nfs_v3_clientops;
1121 extern const struct nfs_rpc_ops nfs_v4_clientops;
1122 extern struct rpc_version nfs_version2;
1123 extern struct rpc_version nfs_version3;
1124 extern struct rpc_version nfs_version4;
1126 extern struct rpc_version nfsacl_version3;
1127 extern struct rpc_program nfsacl_program;