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 unsigned long sr_renewal_time
;
174 int sr_status
; /* sequence operation status */
177 struct nfs4_get_lease_time_args
{
178 struct nfs4_sequence_args la_seq_args
;
181 struct nfs4_get_lease_time_res
{
182 struct nfs_fsinfo
*lr_fsinfo
;
183 struct nfs4_sequence_res lr_seq_res
;
187 * Arguments to the open call.
189 struct nfs_openargs
{
190 const struct nfs_fh
* fh
;
191 struct nfs_seqid
* seqid
;
197 struct iattr
* attrs
; /* UNCHECKED, GUARDED */
198 nfs4_verifier verifier
; /* EXCLUSIVE */
199 nfs4_stateid delegation
; /* CLAIM_DELEGATE_CUR */
200 fmode_t delegation_type
; /* CLAIM_PREVIOUS */
202 const struct qstr
* name
;
203 const struct nfs_server
*server
; /* Needed for ID mapping */
206 struct nfs4_sequence_args seq_args
;
210 nfs4_stateid stateid
;
212 struct nfs4_change_info cinfo
;
214 struct nfs_fattr
* f_attr
;
215 struct nfs_fattr
* dir_attr
;
216 struct nfs_seqid
* seqid
;
217 const struct nfs_server
*server
;
218 fmode_t delegation_type
;
219 nfs4_stateid delegation
;
222 __u32 attrset
[NFS4_BITMAP_SIZE
];
223 struct nfs4_sequence_res seq_res
;
227 * Arguments to the open_confirm call.
229 struct nfs_open_confirmargs
{
230 const struct nfs_fh
* fh
;
231 nfs4_stateid
* stateid
;
232 struct nfs_seqid
* seqid
;
235 struct nfs_open_confirmres
{
236 nfs4_stateid stateid
;
237 struct nfs_seqid
* seqid
;
241 * Arguments to the close call.
243 struct nfs_closeargs
{
245 nfs4_stateid
* stateid
;
246 struct nfs_seqid
* seqid
;
249 struct nfs4_sequence_args seq_args
;
252 struct nfs_closeres
{
253 nfs4_stateid stateid
;
254 struct nfs_fattr
* fattr
;
255 struct nfs_seqid
* seqid
;
256 const struct nfs_server
*server
;
257 struct nfs4_sequence_res seq_res
;
260 * * Arguments to the lock,lockt, and locku call.
267 struct nfs_lock_args
{
269 struct file_lock
* fl
;
270 struct nfs_seqid
* lock_seqid
;
271 nfs4_stateid
* lock_stateid
;
272 struct nfs_seqid
* open_seqid
;
273 nfs4_stateid
* open_stateid
;
274 struct nfs_lowner lock_owner
;
275 unsigned char block
: 1;
276 unsigned char reclaim
: 1;
277 unsigned char new_lock_owner
: 1;
278 struct nfs4_sequence_args seq_args
;
281 struct nfs_lock_res
{
282 nfs4_stateid stateid
;
283 struct nfs_seqid
* lock_seqid
;
284 struct nfs_seqid
* open_seqid
;
285 struct nfs4_sequence_res seq_res
;
288 struct nfs_locku_args
{
290 struct file_lock
* fl
;
291 struct nfs_seqid
* seqid
;
292 nfs4_stateid
* stateid
;
293 struct nfs4_sequence_args seq_args
;
296 struct nfs_locku_res
{
297 nfs4_stateid stateid
;
298 struct nfs_seqid
* seqid
;
299 struct nfs4_sequence_res seq_res
;
302 struct nfs_lockt_args
{
304 struct file_lock
* fl
;
305 struct nfs_lowner lock_owner
;
306 struct nfs4_sequence_args seq_args
;
309 struct nfs_lockt_res
{
310 struct file_lock
* denied
; /* LOCK, LOCKT failed */
311 struct nfs4_sequence_res seq_res
;
314 struct nfs4_delegreturnargs
{
315 const struct nfs_fh
*fhandle
;
316 const nfs4_stateid
*stateid
;
318 struct nfs4_sequence_args seq_args
;
321 struct nfs4_delegreturnres
{
322 struct nfs_fattr
* fattr
;
323 const struct nfs_server
*server
;
324 struct nfs4_sequence_res seq_res
;
328 * Arguments to the read call.
330 struct nfs_readargs
{
332 struct nfs_open_context
*context
;
336 struct page
** pages
;
337 struct nfs4_sequence_args seq_args
;
341 struct nfs_fattr
* fattr
;
344 struct nfs4_sequence_res seq_res
;
348 * Arguments to the write call.
350 struct nfs_writeargs
{
352 struct nfs_open_context
*context
;
355 enum nfs3_stable_how stable
;
357 struct page
** pages
;
359 struct nfs4_sequence_args seq_args
;
362 struct nfs_writeverf
{
363 enum nfs3_stable_how committed
;
367 struct nfs_writeres
{
368 struct nfs_fattr
* fattr
;
369 struct nfs_writeverf
* verf
;
371 const struct nfs_server
*server
;
372 struct nfs4_sequence_res seq_res
;
376 * Common arguments to the unlink call
378 struct nfs_removeargs
{
379 const struct nfs_fh
*fh
;
382 struct nfs4_sequence_args seq_args
;
385 struct nfs_removeres
{
386 const struct nfs_server
*server
;
387 struct nfs4_change_info cinfo
;
388 struct nfs_fattr dir_attr
;
389 struct nfs4_sequence_res seq_res
;
393 * Argument struct for decode_entry function
403 struct nfs_fattr
* fattr
;
407 * The following types are for NFSv2 only.
409 struct nfs_sattrargs
{
411 struct iattr
* sattr
;
414 struct nfs_diropargs
{
420 struct nfs_createargs
{
424 struct iattr
* sattr
;
427 struct nfs_renameargs
{
428 struct nfs_fh
* fromfh
;
429 const char * fromname
;
430 unsigned int fromlen
;
431 struct nfs_fh
* tofh
;
436 struct nfs_setattrargs
{
438 nfs4_stateid stateid
;
440 const struct nfs_server
* server
; /* Needed for name mapping */
442 struct nfs4_sequence_args seq_args
;
445 struct nfs_setaclargs
{
448 unsigned int acl_pgbase
;
449 struct page
** acl_pages
;
450 struct nfs4_sequence_args seq_args
;
453 struct nfs_setaclres
{
454 struct nfs4_sequence_res seq_res
;
457 struct nfs_getaclargs
{
460 unsigned int acl_pgbase
;
461 struct page
** acl_pages
;
462 struct nfs4_sequence_args seq_args
;
465 struct nfs_getaclres
{
467 struct nfs4_sequence_res seq_res
;
470 struct nfs_setattrres
{
471 struct nfs_fattr
* fattr
;
472 const struct nfs_server
* server
;
473 struct nfs4_sequence_res seq_res
;
476 struct nfs_linkargs
{
477 struct nfs_fh
* fromfh
;
478 struct nfs_fh
* tofh
;
483 struct nfs_symlinkargs
{
484 struct nfs_fh
* fromfh
;
485 const char * fromname
;
486 unsigned int fromlen
;
487 struct page
** pages
;
488 unsigned int pathlen
;
489 struct iattr
* sattr
;
492 struct nfs_readdirargs
{
496 struct page
** pages
;
499 struct nfs3_getaclargs
{
502 struct page
** pages
;
505 struct nfs3_setaclargs
{
506 struct inode
* inode
;
508 struct posix_acl
* acl_access
;
509 struct posix_acl
* acl_default
;
512 struct page
** pages
;
517 struct nfs_fattr
* fattr
;
520 struct nfs_readlinkargs
{
524 struct page
** pages
;
527 struct nfs3_sattrargs
{
529 struct iattr
* sattr
;
531 struct timespec guardtime
;
534 struct nfs3_diropargs
{
540 struct nfs3_accessargs
{
545 struct nfs3_createargs
{
549 struct iattr
* sattr
;
550 enum nfs3_createmode createmode
;
554 struct nfs3_mkdirargs
{
558 struct iattr
* sattr
;
561 struct nfs3_symlinkargs
{
562 struct nfs_fh
* fromfh
;
563 const char * fromname
;
564 unsigned int fromlen
;
565 struct page
** pages
;
566 unsigned int pathlen
;
567 struct iattr
* sattr
;
570 struct nfs3_mknodargs
{
574 enum nfs3_ftype type
;
575 struct iattr
* sattr
;
579 struct nfs3_renameargs
{
580 struct nfs_fh
* fromfh
;
581 const char * fromname
;
582 unsigned int fromlen
;
583 struct nfs_fh
* tofh
;
588 struct nfs3_linkargs
{
589 struct nfs_fh
* fromfh
;
590 struct nfs_fh
* tofh
;
595 struct nfs3_readdirargs
{
601 struct page
** pages
;
604 struct nfs3_diropres
{
605 struct nfs_fattr
* dir_attr
;
607 struct nfs_fattr
* fattr
;
610 struct nfs3_accessres
{
611 struct nfs_fattr
* fattr
;
615 struct nfs3_readlinkargs
{
619 struct page
** pages
;
622 struct nfs3_renameres
{
623 struct nfs_fattr
* fromattr
;
624 struct nfs_fattr
* toattr
;
627 struct nfs3_linkres
{
628 struct nfs_fattr
* dir_attr
;
629 struct nfs_fattr
* fattr
;
632 struct nfs3_readdirres
{
633 struct nfs_fattr
* dir_attr
;
638 struct nfs3_getaclres
{
639 struct nfs_fattr
* fattr
;
641 unsigned int acl_access_count
;
642 unsigned int acl_default_count
;
643 struct posix_acl
* acl_access
;
644 struct posix_acl
* acl_default
;
649 typedef u64 clientid4
;
651 struct nfs4_accessargs
{
652 const struct nfs_fh
* fh
;
655 struct nfs4_sequence_args seq_args
;
658 struct nfs4_accessres
{
659 const struct nfs_server
* server
;
660 struct nfs_fattr
* fattr
;
663 struct nfs4_sequence_res seq_res
;
666 struct nfs4_create_arg
{
670 struct page
** pages
;
672 } symlink
; /* NF4LNK */
676 } device
; /* NF4BLK, NF4CHR */
678 const struct qstr
* name
;
679 const struct nfs_server
* server
;
680 const struct iattr
* attrs
;
681 const struct nfs_fh
* dir_fh
;
683 struct nfs4_sequence_args seq_args
;
686 struct nfs4_create_res
{
687 const struct nfs_server
* server
;
689 struct nfs_fattr
* fattr
;
690 struct nfs4_change_info dir_cinfo
;
691 struct nfs_fattr
* dir_fattr
;
692 struct nfs4_sequence_res seq_res
;
695 struct nfs4_fsinfo_arg
{
696 const struct nfs_fh
* fh
;
698 struct nfs4_sequence_args seq_args
;
701 struct nfs4_fsinfo_res
{
702 struct nfs_fsinfo
*fsinfo
;
703 struct nfs4_sequence_res seq_res
;
706 struct nfs4_getattr_arg
{
707 const struct nfs_fh
* fh
;
709 struct nfs4_sequence_args seq_args
;
712 struct nfs4_getattr_res
{
713 const struct nfs_server
* server
;
714 struct nfs_fattr
* fattr
;
715 struct nfs4_sequence_res seq_res
;
718 struct nfs4_link_arg
{
719 const struct nfs_fh
* fh
;
720 const struct nfs_fh
* dir_fh
;
721 const struct qstr
* name
;
723 struct nfs4_sequence_args seq_args
;
726 struct nfs4_link_res
{
727 const struct nfs_server
* server
;
728 struct nfs_fattr
* fattr
;
729 struct nfs4_change_info cinfo
;
730 struct nfs_fattr
* dir_attr
;
731 struct nfs4_sequence_res seq_res
;
735 struct nfs4_lookup_arg
{
736 const struct nfs_fh
* dir_fh
;
737 const struct qstr
* name
;
739 struct nfs4_sequence_args seq_args
;
742 struct nfs4_lookup_res
{
743 const struct nfs_server
* server
;
744 struct nfs_fattr
* fattr
;
746 struct nfs4_sequence_res seq_res
;
749 struct nfs4_lookup_root_arg
{
751 struct nfs4_sequence_args seq_args
;
754 struct nfs4_pathconf_arg
{
755 const struct nfs_fh
* fh
;
757 struct nfs4_sequence_args seq_args
;
760 struct nfs4_pathconf_res
{
761 struct nfs_pathconf
*pathconf
;
762 struct nfs4_sequence_res seq_res
;
765 struct nfs4_readdir_arg
{
766 const struct nfs_fh
* fh
;
768 nfs4_verifier verifier
;
770 struct page
** pages
; /* zero-copy data */
771 unsigned int pgbase
; /* zero-copy data */
773 struct nfs4_sequence_args seq_args
;
776 struct nfs4_readdir_res
{
777 nfs4_verifier verifier
;
779 struct nfs4_sequence_res seq_res
;
782 struct nfs4_readlink
{
783 const struct nfs_fh
* fh
;
785 unsigned int pglen
; /* zero-copy data */
786 struct page
** pages
; /* zero-copy data */
787 struct nfs4_sequence_args seq_args
;
790 struct nfs4_readlink_res
{
791 struct nfs4_sequence_res seq_res
;
794 struct nfs4_rename_arg
{
795 const struct nfs_fh
* old_dir
;
796 const struct nfs_fh
* new_dir
;
797 const struct qstr
* old_name
;
798 const struct qstr
* new_name
;
800 struct nfs4_sequence_args seq_args
;
803 struct nfs4_rename_res
{
804 const struct nfs_server
* server
;
805 struct nfs4_change_info old_cinfo
;
806 struct nfs_fattr
* old_fattr
;
807 struct nfs4_change_info new_cinfo
;
808 struct nfs_fattr
* new_fattr
;
809 struct nfs4_sequence_res seq_res
;
812 #define NFS4_SETCLIENTID_NAMELEN (127)
813 struct nfs4_setclientid
{
814 const nfs4_verifier
* sc_verifier
;
815 unsigned int sc_name_len
;
816 char sc_name
[NFS4_SETCLIENTID_NAMELEN
+ 1];
818 unsigned int sc_netid_len
;
819 char sc_netid
[RPCBIND_MAXNETIDLEN
+ 1];
820 unsigned int sc_uaddr_len
;
821 char sc_uaddr
[RPCBIND_MAXUADDRLEN
+ 1];
825 struct nfs4_statfs_arg
{
826 const struct nfs_fh
* fh
;
828 struct nfs4_sequence_args seq_args
;
831 struct nfs4_statfs_res
{
832 struct nfs_fsstat
*fsstat
;
833 struct nfs4_sequence_res seq_res
;
836 struct nfs4_server_caps_arg
{
837 struct nfs_fh
*fhandle
;
838 struct nfs4_sequence_args seq_args
;
841 struct nfs4_server_caps_res
{
846 struct nfs4_sequence_res seq_res
;
854 #define NFS4_PATHNAME_MAXCOMPONENTS 512
855 struct nfs4_pathname
{
856 unsigned int ncomponents
;
857 struct nfs4_string components
[NFS4_PATHNAME_MAXCOMPONENTS
];
860 #define NFS4_FS_LOCATION_MAXSERVERS 10
861 struct nfs4_fs_location
{
862 unsigned int nservers
;
863 struct nfs4_string servers
[NFS4_FS_LOCATION_MAXSERVERS
];
864 struct nfs4_pathname rootpath
;
867 #define NFS4_FS_LOCATIONS_MAXENTRIES 10
868 struct nfs4_fs_locations
{
869 struct nfs_fattr fattr
;
870 const struct nfs_server
*server
;
871 struct nfs4_pathname fs_path
;
873 struct nfs4_fs_location locations
[NFS4_FS_LOCATIONS_MAXENTRIES
];
876 struct nfs4_fs_locations_arg
{
877 const struct nfs_fh
*dir_fh
;
878 const struct qstr
*name
;
881 struct nfs4_sequence_args seq_args
;
884 struct nfs4_fs_locations_res
{
885 struct nfs4_fs_locations
*fs_locations
;
886 struct nfs4_sequence_res seq_res
;
889 #endif /* CONFIG_NFS_V4 */
896 #ifdef CONFIG_NFS_V4_1
897 struct nfs_impl_id4
{
902 struct nfstime4 date
;
905 #define NFS4_EXCHANGE_ID_LEN (48)
906 struct nfs41_exchange_id_args
{
907 struct nfs_client
*client
;
908 nfs4_verifier
*verifier
;
910 char id
[NFS4_EXCHANGE_ID_LEN
];
914 struct server_owner
{
916 uint32_t major_id_sz
;
917 char major_id
[NFS4_OPAQUE_LIMIT
];
920 struct server_scope
{
921 uint32_t server_scope_sz
;
922 char server_scope
[NFS4_OPAQUE_LIMIT
];
925 struct nfs41_exchange_id_res
{
926 struct nfs_client
*client
;
930 struct nfs41_create_session_args
{
931 struct nfs_client
*client
;
934 struct nfs4_channel_attrs fc_attrs
; /* Fore Channel */
935 struct nfs4_channel_attrs bc_attrs
; /* Back Channel */
938 struct nfs41_create_session_res
{
939 struct nfs_client
*client
;
941 #endif /* CONFIG_NFS_V4_1 */
945 #define NFS_PAGEVEC_SIZE (8U)
947 struct nfs_read_data
{
949 struct rpc_task task
;
951 struct rpc_cred
*cred
;
952 struct nfs_fattr fattr
; /* fattr storage */
953 struct list_head pages
; /* Coalesced read requests */
954 struct nfs_page
*req
; /* multi ops per nfs_page */
955 struct page
**pagevec
;
956 unsigned int npages
; /* Max length of pagevec */
957 struct nfs_readargs args
;
958 struct nfs_readres res
;
960 unsigned long timestamp
; /* For lease renewal */
962 struct page
*page_array
[NFS_PAGEVEC_SIZE
];
965 struct nfs_write_data
{
967 struct rpc_task task
;
969 struct rpc_cred
*cred
;
970 struct nfs_fattr fattr
;
971 struct nfs_writeverf verf
;
972 struct list_head pages
; /* Coalesced requests we wish to flush */
973 struct nfs_page
*req
; /* multi ops per nfs_page */
974 struct page
**pagevec
;
975 unsigned int npages
; /* Max length of pagevec */
976 struct nfs_writeargs args
; /* argument struct */
977 struct nfs_writeres res
; /* result struct */
979 unsigned long timestamp
; /* For lease renewal */
981 struct page
*page_array
[NFS_PAGEVEC_SIZE
];
984 struct nfs_access_entry
;
987 * RPC procedure vector for NFSv2/NFSv3 demuxing
990 u32 version
; /* Protocol version */
991 const struct dentry_operations
*dentry_ops
;
992 const struct inode_operations
*dir_inode_ops
;
993 const struct inode_operations
*file_inode_ops
;
995 int (*getroot
) (struct nfs_server
*, struct nfs_fh
*,
996 struct nfs_fsinfo
*);
997 int (*lookupfh
)(struct nfs_server
*, struct nfs_fh
*,
998 struct qstr
*, struct nfs_fh
*,
1000 int (*getattr
) (struct nfs_server
*, struct nfs_fh
*,
1001 struct nfs_fattr
*);
1002 int (*setattr
) (struct dentry
*, struct nfs_fattr
*,
1004 int (*lookup
) (struct inode
*, struct qstr
*,
1005 struct nfs_fh
*, struct nfs_fattr
*);
1006 int (*access
) (struct inode
*, struct nfs_access_entry
*);
1007 int (*readlink
)(struct inode
*, struct page
*, unsigned int,
1009 int (*create
) (struct inode
*, struct dentry
*,
1010 struct iattr
*, int, struct nameidata
*);
1011 int (*remove
) (struct inode
*, struct qstr
*);
1012 void (*unlink_setup
) (struct rpc_message
*, struct inode
*dir
);
1013 int (*unlink_done
) (struct rpc_task
*, struct inode
*);
1014 int (*rename
) (struct inode
*, struct qstr
*,
1015 struct inode
*, struct qstr
*);
1016 int (*link
) (struct inode
*, struct inode
*, struct qstr
*);
1017 int (*symlink
) (struct inode
*, struct dentry
*, struct page
*,
1018 unsigned int, struct iattr
*);
1019 int (*mkdir
) (struct inode
*, struct dentry
*, struct iattr
*);
1020 int (*rmdir
) (struct inode
*, struct qstr
*);
1021 int (*readdir
) (struct dentry
*, struct rpc_cred
*,
1022 u64
, struct page
*, unsigned int, int);
1023 int (*mknod
) (struct inode
*, struct dentry
*, struct iattr
*,
1025 int (*statfs
) (struct nfs_server
*, struct nfs_fh
*,
1026 struct nfs_fsstat
*);
1027 int (*fsinfo
) (struct nfs_server
*, struct nfs_fh
*,
1028 struct nfs_fsinfo
*);
1029 int (*pathconf
) (struct nfs_server
*, struct nfs_fh
*,
1030 struct nfs_pathconf
*);
1031 int (*set_capabilities
)(struct nfs_server
*, struct nfs_fh
*);
1032 __be32
*(*decode_dirent
)(__be32
*, struct nfs_entry
*, int plus
);
1033 void (*read_setup
) (struct nfs_read_data
*, struct rpc_message
*);
1034 int (*read_done
) (struct rpc_task
*, struct nfs_read_data
*);
1035 void (*write_setup
) (struct nfs_write_data
*, struct rpc_message
*);
1036 int (*write_done
) (struct rpc_task
*, struct nfs_write_data
*);
1037 void (*commit_setup
) (struct nfs_write_data
*, struct rpc_message
*);
1038 int (*commit_done
) (struct rpc_task
*, struct nfs_write_data
*);
1039 int (*lock
)(struct file
*, int, struct file_lock
*);
1040 int (*lock_check_bounds
)(const struct file_lock
*);
1041 void (*clear_acl_cache
)(struct inode
*);
1042 void (*close_context
)(struct nfs_open_context
*ctx
, int);
1046 * NFS_CALL(getattr, inode, (fattr));
1048 * NFS_PROTO(inode)->getattr(fattr);
1050 #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
1053 * Function vectors etc. for the NFS client
1055 extern const struct nfs_rpc_ops nfs_v2_clientops
;
1056 extern const struct nfs_rpc_ops nfs_v3_clientops
;
1057 extern const struct nfs_rpc_ops nfs_v4_clientops
;
1058 extern struct rpc_version nfs_version2
;
1059 extern struct rpc_version nfs_version3
;
1060 extern struct rpc_version nfs_version4
;
1062 extern struct rpc_version nfsacl_version3
;
1063 extern struct rpc_program nfsacl_program
;