1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_NFS_XDR_H
3 #define _LINUX_NFS_XDR_H
5 #include <linux/nfsacl.h>
6 #include <linux/sunrpc/gss_api.h>
9 * To change the maximum rsize and wsize supported by the NFS client, adjust
10 * NFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can
11 * support a megabyte or more. The default is left at 4096 bytes, which is
12 * reasonable for NFS over UDP.
14 #define NFS_MAX_FILE_IO_SIZE (1048576U)
15 #define NFS_DEF_FILE_IO_SIZE (4096U)
16 #define NFS_MIN_FILE_IO_SIZE (1024U)
29 * Helper for checking equality between 2 fsids.
31 static inline int nfs_fsid_equal(const struct nfs_fsid
*a
, const struct nfs_fsid
*b
)
33 return a
->major
== b
->major
&& a
->minor
== b
->minor
;
36 struct nfs4_threshold
{
46 unsigned int valid
; /* which fields are valid */
64 __u64 mounted_on_fileid
;
65 struct timespec64 atime
;
66 struct timespec64 mtime
;
67 struct timespec64 ctime
;
68 __u64 change_attr
; /* NFSv4 change attribute */
69 __u64 pre_change_attr
;/* pre-op NFSv4 change attribute */
70 __u64 pre_size
; /* pre_op_attr.size */
71 struct timespec64 pre_mtime
; /* pre_op_attr.mtime */
72 struct timespec64 pre_ctime
; /* pre_op_attr.ctime */
73 unsigned long time_start
;
74 unsigned long gencount
;
75 struct nfs4_string
*owner_name
;
76 struct nfs4_string
*group_name
;
77 struct nfs4_threshold
*mdsthreshold
; /* pNFS threshold hints */
78 struct nfs4_label
*label
;
81 #define NFS_ATTR_FATTR_TYPE (1U << 0)
82 #define NFS_ATTR_FATTR_MODE (1U << 1)
83 #define NFS_ATTR_FATTR_NLINK (1U << 2)
84 #define NFS_ATTR_FATTR_OWNER (1U << 3)
85 #define NFS_ATTR_FATTR_GROUP (1U << 4)
86 #define NFS_ATTR_FATTR_RDEV (1U << 5)
87 #define NFS_ATTR_FATTR_SIZE (1U << 6)
88 #define NFS_ATTR_FATTR_PRESIZE (1U << 7)
89 #define NFS_ATTR_FATTR_BLOCKS_USED (1U << 8)
90 #define NFS_ATTR_FATTR_SPACE_USED (1U << 9)
91 #define NFS_ATTR_FATTR_FSID (1U << 10)
92 #define NFS_ATTR_FATTR_FILEID (1U << 11)
93 #define NFS_ATTR_FATTR_ATIME (1U << 12)
94 #define NFS_ATTR_FATTR_MTIME (1U << 13)
95 #define NFS_ATTR_FATTR_CTIME (1U << 14)
96 #define NFS_ATTR_FATTR_PREMTIME (1U << 15)
97 #define NFS_ATTR_FATTR_PRECTIME (1U << 16)
98 #define NFS_ATTR_FATTR_CHANGE (1U << 17)
99 #define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
100 #define NFS_ATTR_FATTR_V4_LOCATIONS (1U << 19)
101 #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 20)
102 #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 21)
103 #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 22)
104 #define NFS_ATTR_FATTR_OWNER_NAME (1U << 23)
105 #define NFS_ATTR_FATTR_GROUP_NAME (1U << 24)
106 #define NFS_ATTR_FATTR_V4_SECURITY_LABEL (1U << 25)
108 #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
109 | NFS_ATTR_FATTR_MODE \
110 | NFS_ATTR_FATTR_NLINK \
111 | NFS_ATTR_FATTR_OWNER \
112 | NFS_ATTR_FATTR_GROUP \
113 | NFS_ATTR_FATTR_RDEV \
114 | NFS_ATTR_FATTR_SIZE \
115 | NFS_ATTR_FATTR_FSID \
116 | NFS_ATTR_FATTR_FILEID \
117 | NFS_ATTR_FATTR_ATIME \
118 | NFS_ATTR_FATTR_MTIME \
119 | NFS_ATTR_FATTR_CTIME \
120 | NFS_ATTR_FATTR_CHANGE)
121 #define NFS_ATTR_FATTR_V2 (NFS_ATTR_FATTR \
122 | NFS_ATTR_FATTR_BLOCKS_USED)
123 #define NFS_ATTR_FATTR_V3 (NFS_ATTR_FATTR \
124 | NFS_ATTR_FATTR_SPACE_USED)
125 #define NFS_ATTR_FATTR_V4 (NFS_ATTR_FATTR \
126 | NFS_ATTR_FATTR_SPACE_USED \
127 | NFS_ATTR_FATTR_V4_SECURITY_LABEL)
130 * Maximal number of supported layout drivers.
132 #define NFS_MAX_LAYOUT_TYPES 8
135 * Info on the file system
138 struct nfs_fattr
*fattr
; /* Post-op attributes */
139 __u32 rtmax
; /* max. read transfer size */
140 __u32 rtpref
; /* pref. read transfer size */
141 __u32 rtmult
; /* reads should be multiple of this */
142 __u32 wtmax
; /* max. write transfer size */
143 __u32 wtpref
; /* pref. write transfer size */
144 __u32 wtmult
; /* writes should be multiple of this */
145 __u32 dtpref
; /* pref. readdir transfer size */
147 struct timespec64 time_delta
; /* server time granularity */
148 __u32 lease_time
; /* in seconds */
149 __u32 nlayouttypes
; /* number of layouttypes */
150 __u32 layouttype
[NFS_MAX_LAYOUT_TYPES
]; /* supported pnfs layout driver */
151 __u32 blksize
; /* preferred pnfs io block size */
152 __u32 clone_blksize
; /* granularity of a CLONE operation */
156 struct nfs_fattr
*fattr
; /* Post-op attributes */
157 __u64 tbytes
; /* total size in bytes */
158 __u64 fbytes
; /* # of free bytes */
159 __u64 abytes
; /* # of bytes available to user */
160 __u64 tfiles
; /* # of files */
161 __u64 ffiles
; /* # of free files */
162 __u64 afiles
; /* # of files available to user */
166 __u32 tsize
; /* Server transfer size */
167 __u32 bsize
; /* Filesystem block size */
168 __u32 blocks
; /* No. of "bsize" blocks on filesystem */
169 __u32 bfree
; /* No. of free "bsize" blocks */
170 __u32 bavail
; /* No. of available "bsize" blocks */
173 struct nfs_pathconf
{
174 struct nfs_fattr
*fattr
; /* Post-op attributes */
175 __u32 max_link
; /* max # of hard links */
176 __u32 max_namelen
; /* max name length */
179 struct nfs4_change_info
{
187 /* nfs41 sessions channel attributes */
188 struct nfs4_channel_attrs
{
191 u32 max_resp_sz_cached
;
197 struct nfs4_sequence_args
{
198 struct nfs4_slot
*sa_slot
;
199 u8 sa_cache_this
: 1,
203 struct nfs4_sequence_res
{
204 struct nfs4_slot
*sr_slot
; /* slot used to send request */
205 unsigned long sr_timestamp
;
206 int sr_status
; /* sequence operation status */
208 u32 sr_highest_slotid
;
209 u32 sr_target_highest_slotid
;
212 struct nfs4_get_lease_time_args
{
213 struct nfs4_sequence_args la_seq_args
;
216 struct nfs4_get_lease_time_res
{
217 struct nfs4_sequence_res lr_seq_res
;
218 struct nfs_fsinfo
*lr_fsinfo
;
222 struct nfs4_xdr_opaque_data
;
224 struct nfs4_xdr_opaque_ops
{
225 void (*encode
)(struct xdr_stream
*, const void *args
,
226 const struct nfs4_xdr_opaque_data
*);
227 void (*free
)(struct nfs4_xdr_opaque_data
*);
230 struct nfs4_xdr_opaque_data
{
231 const struct nfs4_xdr_opaque_ops
*ops
;
235 #define PNFS_LAYOUT_MAXSIZE 4096
237 struct nfs4_layoutdriver_data
{
243 struct pnfs_layout_range
{
249 struct nfs4_layoutget_args
{
250 struct nfs4_sequence_args seq_args
;
252 struct pnfs_layout_range range
;
256 struct nfs_open_context
*ctx
;
257 nfs4_stateid stateid
;
258 struct nfs4_layoutdriver_data layout
;
261 struct nfs4_layoutget_res
{
262 struct nfs4_sequence_res seq_res
;
264 __u32 return_on_close
;
265 struct pnfs_layout_range range
;
267 nfs4_stateid stateid
;
268 struct nfs4_layoutdriver_data
*layoutp
;
271 struct nfs4_layoutget
{
272 struct nfs4_layoutget_args args
;
273 struct nfs4_layoutget_res res
;
274 const struct cred
*cred
;
278 struct nfs4_getdeviceinfo_args
{
279 struct nfs4_sequence_args seq_args
;
280 struct pnfs_device
*pdev
;
284 struct nfs4_getdeviceinfo_res
{
285 struct nfs4_sequence_res seq_res
;
286 struct pnfs_device
*pdev
;
290 struct nfs4_layoutcommit_args
{
291 struct nfs4_sequence_args seq_args
;
292 nfs4_stateid stateid
;
293 __u64 lastbytewritten
;
296 size_t layoutupdate_len
;
297 struct page
*layoutupdate_page
;
298 struct page
**layoutupdate_pages
;
302 struct nfs4_layoutcommit_res
{
303 struct nfs4_sequence_res seq_res
;
304 struct nfs_fattr
*fattr
;
305 const struct nfs_server
*server
;
309 struct nfs4_layoutcommit_data
{
310 struct rpc_task task
;
311 struct nfs_fattr fattr
;
312 struct list_head lseg_list
;
313 const struct cred
*cred
;
315 struct nfs4_layoutcommit_args args
;
316 struct nfs4_layoutcommit_res res
;
319 struct nfs4_layoutreturn_args
{
320 struct nfs4_sequence_args seq_args
;
321 struct pnfs_layout_hdr
*layout
;
323 struct pnfs_layout_range range
;
324 nfs4_stateid stateid
;
326 struct nfs4_xdr_opaque_data
*ld_private
;
329 struct nfs4_layoutreturn_res
{
330 struct nfs4_sequence_res seq_res
;
332 nfs4_stateid stateid
;
335 struct nfs4_layoutreturn
{
336 struct nfs4_layoutreturn_args args
;
337 struct nfs4_layoutreturn_res res
;
338 const struct cred
*cred
;
339 struct nfs_client
*clp
;
342 struct nfs4_xdr_opaque_data ld_private
;
345 #define PNFS_LAYOUTSTATS_MAXSIZE 256
347 struct nfs42_layoutstat_args
;
348 struct nfs42_layoutstat_devinfo
;
349 typedef void (*layoutstats_encode_t
)(struct xdr_stream
*,
350 struct nfs42_layoutstat_args
*,
351 struct nfs42_layoutstat_devinfo
*);
353 /* Per file per deviceid layoutstats */
354 struct nfs42_layoutstat_devinfo
{
355 struct nfs4_deviceid dev_id
;
363 struct nfs4_xdr_opaque_data ld_private
;
366 struct nfs42_layoutstat_args
{
367 struct nfs4_sequence_args seq_args
;
370 nfs4_stateid stateid
;
372 struct nfs42_layoutstat_devinfo
*devinfo
;
375 struct nfs42_layoutstat_res
{
376 struct nfs4_sequence_res seq_res
;
381 struct nfs42_layoutstat_data
{
383 struct nfs42_layoutstat_args args
;
384 struct nfs42_layoutstat_res res
;
387 struct nfs42_device_error
{
388 struct nfs4_deviceid dev_id
;
390 enum nfs_opnum4 opnum
;
393 struct nfs42_layout_error
{
396 nfs4_stateid stateid
;
397 struct nfs42_device_error errors
[1];
400 #define NFS42_LAYOUTERROR_MAX 5
402 struct nfs42_layouterror_args
{
403 struct nfs4_sequence_args seq_args
;
405 unsigned int num_errors
;
406 struct nfs42_layout_error errors
[NFS42_LAYOUTERROR_MAX
];
409 struct nfs42_layouterror_res
{
410 struct nfs4_sequence_res seq_res
;
411 unsigned int num_errors
;
415 struct nfs42_layouterror_data
{
416 struct nfs42_layouterror_args args
;
417 struct nfs42_layouterror_res res
;
419 struct pnfs_layout_segment
*lseg
;
422 struct nfs42_clone_args
{
423 struct nfs4_sequence_args seq_args
;
424 struct nfs_fh
*src_fh
;
425 struct nfs_fh
*dst_fh
;
426 nfs4_stateid src_stateid
;
427 nfs4_stateid dst_stateid
;
431 const u32
*dst_bitmask
;
434 struct nfs42_clone_res
{
435 struct nfs4_sequence_res seq_res
;
436 unsigned int rpc_status
;
437 struct nfs_fattr
*dst_fattr
;
438 const struct nfs_server
*server
;
441 struct stateowner_id
{
447 * Arguments to the open call.
449 struct nfs_openargs
{
450 struct nfs4_sequence_args seq_args
;
451 const struct nfs_fh
* fh
;
452 struct nfs_seqid
* seqid
;
458 struct stateowner_id id
;
461 struct iattr
* attrs
; /* UNCHECKED, GUARDED, EXCLUSIVE4_1 */
462 nfs4_verifier verifier
; /* EXCLUSIVE */
464 nfs4_stateid delegation
; /* CLAIM_DELEGATE_CUR */
465 fmode_t delegation_type
; /* CLAIM_PREVIOUS */
467 const struct qstr
* name
;
468 const struct nfs_server
*server
; /* Needed for ID mapping */
470 const u32
* open_bitmap
;
471 enum open_claim_type4 claim
;
472 enum createmode4 createmode
;
473 const struct nfs4_label
*label
;
475 struct nfs4_layoutget_args
*lg_args
;
479 struct nfs4_sequence_res seq_res
;
480 nfs4_stateid stateid
;
482 struct nfs4_change_info cinfo
;
484 struct nfs_fattr
* f_attr
;
485 struct nfs4_label
*f_label
;
486 struct nfs_seqid
* seqid
;
487 const struct nfs_server
*server
;
488 fmode_t delegation_type
;
489 nfs4_stateid delegation
;
490 unsigned long pagemod_limit
;
492 __u32 attrset
[NFS4_BITMAP_SIZE
];
493 struct nfs4_string
*owner
;
494 struct nfs4_string
*group_owner
;
495 __u32 access_request
;
496 __u32 access_supported
;
498 struct nfs4_layoutget_res
*lg_res
;
502 * Arguments to the open_confirm call.
504 struct nfs_open_confirmargs
{
505 struct nfs4_sequence_args seq_args
;
506 const struct nfs_fh
* fh
;
507 nfs4_stateid
* stateid
;
508 struct nfs_seqid
* seqid
;
511 struct nfs_open_confirmres
{
512 struct nfs4_sequence_res seq_res
;
513 nfs4_stateid stateid
;
514 struct nfs_seqid
* seqid
;
518 * Arguments to the close call.
520 struct nfs_closeargs
{
521 struct nfs4_sequence_args seq_args
;
523 nfs4_stateid stateid
;
524 struct nfs_seqid
* seqid
;
528 struct nfs4_layoutreturn_args
*lr_args
;
531 struct nfs_closeres
{
532 struct nfs4_sequence_res seq_res
;
533 nfs4_stateid stateid
;
534 struct nfs_fattr
* fattr
;
535 struct nfs_seqid
* seqid
;
536 const struct nfs_server
*server
;
537 struct nfs4_layoutreturn_res
*lr_res
;
541 * * Arguments to the lock,lockt, and locku call.
549 struct nfs_lock_args
{
550 struct nfs4_sequence_args seq_args
;
552 struct file_lock
* fl
;
553 struct nfs_seqid
* lock_seqid
;
554 nfs4_stateid lock_stateid
;
555 struct nfs_seqid
* open_seqid
;
556 nfs4_stateid open_stateid
;
557 struct nfs_lowner lock_owner
;
558 unsigned char block
: 1;
559 unsigned char reclaim
: 1;
560 unsigned char new_lock
: 1;
561 unsigned char new_lock_owner
: 1;
564 struct nfs_lock_res
{
565 struct nfs4_sequence_res seq_res
;
566 nfs4_stateid stateid
;
567 struct nfs_seqid
* lock_seqid
;
568 struct nfs_seqid
* open_seqid
;
571 struct nfs_locku_args
{
572 struct nfs4_sequence_args seq_args
;
574 struct file_lock
* fl
;
575 struct nfs_seqid
* seqid
;
576 nfs4_stateid stateid
;
579 struct nfs_locku_res
{
580 struct nfs4_sequence_res seq_res
;
581 nfs4_stateid stateid
;
582 struct nfs_seqid
* seqid
;
585 struct nfs_lockt_args
{
586 struct nfs4_sequence_args seq_args
;
588 struct file_lock
* fl
;
589 struct nfs_lowner lock_owner
;
592 struct nfs_lockt_res
{
593 struct nfs4_sequence_res seq_res
;
594 struct file_lock
* denied
; /* LOCK, LOCKT failed */
597 struct nfs_release_lockowner_args
{
598 struct nfs4_sequence_args seq_args
;
599 struct nfs_lowner lock_owner
;
602 struct nfs_release_lockowner_res
{
603 struct nfs4_sequence_res seq_res
;
606 struct nfs4_delegreturnargs
{
607 struct nfs4_sequence_args seq_args
;
608 const struct nfs_fh
*fhandle
;
609 const nfs4_stateid
*stateid
;
611 struct nfs4_layoutreturn_args
*lr_args
;
614 struct nfs4_delegreturnres
{
615 struct nfs4_sequence_res seq_res
;
616 struct nfs_fattr
* fattr
;
617 struct nfs_server
*server
;
618 struct nfs4_layoutreturn_res
*lr_res
;
623 * Arguments to the write call.
625 struct nfs_write_verifier
{
629 struct nfs_writeverf
{
630 struct nfs_write_verifier verifier
;
631 enum nfs3_stable_how committed
;
635 * Arguments shared by the read and write call.
637 struct nfs_pgio_args
{
638 struct nfs4_sequence_args seq_args
;
640 struct nfs_open_context
*context
;
641 struct nfs_lock_context
*lock_context
;
642 nfs4_stateid stateid
;
646 struct page
** pages
;
648 unsigned int replen
; /* used by read */
650 const u32
* bitmask
; /* used by write */
651 enum nfs3_stable_how stable
; /* used by write */
656 struct nfs_pgio_res
{
657 struct nfs4_sequence_res seq_res
;
658 struct nfs_fattr
* fattr
;
663 unsigned int replen
; /* used by read */
664 int eof
; /* used by read */
667 struct nfs_writeverf
* verf
; /* used by write */
668 const struct nfs_server
*server
; /* used by write */
674 * Arguments to the commit call.
676 struct nfs_commitargs
{
677 struct nfs4_sequence_args seq_args
;
684 struct nfs_commitres
{
685 struct nfs4_sequence_res seq_res
;
687 struct nfs_fattr
*fattr
;
688 struct nfs_writeverf
*verf
;
689 const struct nfs_server
*server
;
693 * Common arguments to the unlink call
695 struct nfs_removeargs
{
696 struct nfs4_sequence_args seq_args
;
697 const struct nfs_fh
*fh
;
701 struct nfs_removeres
{
702 struct nfs4_sequence_res seq_res
;
703 struct nfs_server
*server
;
704 struct nfs_fattr
*dir_attr
;
705 struct nfs4_change_info cinfo
;
709 * Common arguments to the rename call
711 struct nfs_renameargs
{
712 struct nfs4_sequence_args seq_args
;
713 const struct nfs_fh
*old_dir
;
714 const struct nfs_fh
*new_dir
;
715 const struct qstr
*old_name
;
716 const struct qstr
*new_name
;
719 struct nfs_renameres
{
720 struct nfs4_sequence_res seq_res
;
721 struct nfs_server
*server
;
722 struct nfs4_change_info old_cinfo
;
723 struct nfs_fattr
*old_fattr
;
724 struct nfs4_change_info new_cinfo
;
725 struct nfs_fattr
*new_fattr
;
728 /* parsed sec= options */
729 #define NFS_AUTH_INFO_MAX_FLAVORS 12 /* see fs/nfs/super.c */
730 struct nfs_auth_info
{
731 unsigned int flavor_len
;
732 rpc_authflavor_t flavors
[NFS_AUTH_INFO_MAX_FLAVORS
];
736 * Argument struct for decode_entry function
746 struct nfs_fattr
* fattr
;
747 struct nfs4_label
*label
;
748 unsigned char d_type
;
749 struct nfs_server
* server
;
753 * The following types are for NFSv2 only.
755 struct nfs_sattrargs
{
757 struct iattr
* sattr
;
760 struct nfs_diropargs
{
766 struct nfs_createargs
{
770 struct iattr
* sattr
;
773 struct nfs_setattrargs
{
774 struct nfs4_sequence_args seq_args
;
776 nfs4_stateid stateid
;
778 const struct nfs_server
* server
; /* Needed for name mapping */
780 const struct nfs4_label
*label
;
783 struct nfs_setaclargs
{
784 struct nfs4_sequence_args seq_args
;
787 struct page
** acl_pages
;
790 struct nfs_setaclres
{
791 struct nfs4_sequence_res seq_res
;
794 struct nfs_getaclargs
{
795 struct nfs4_sequence_args seq_args
;
798 struct page
** acl_pages
;
801 /* getxattr ACL interface flags */
802 #define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */
803 struct nfs_getaclres
{
804 struct nfs4_sequence_res seq_res
;
806 size_t acl_data_offset
;
808 struct page
* acl_scratch
;
811 struct nfs_setattrres
{
812 struct nfs4_sequence_res seq_res
;
813 struct nfs_fattr
* fattr
;
814 struct nfs4_label
*label
;
815 const struct nfs_server
* server
;
818 struct nfs_linkargs
{
819 struct nfs_fh
* fromfh
;
820 struct nfs_fh
* tofh
;
825 struct nfs_symlinkargs
{
826 struct nfs_fh
* fromfh
;
827 const char * fromname
;
828 unsigned int fromlen
;
829 struct page
** pages
;
830 unsigned int pathlen
;
831 struct iattr
* sattr
;
834 struct nfs_readdirargs
{
838 struct page
** pages
;
841 struct nfs3_getaclargs
{
844 struct page
** pages
;
847 struct nfs3_setaclargs
{
848 struct inode
* inode
;
850 struct posix_acl
* acl_access
;
851 struct posix_acl
* acl_default
;
854 struct page
** pages
;
859 struct nfs_fattr
* fattr
;
862 struct nfs_readlinkargs
{
866 struct page
** pages
;
869 struct nfs3_sattrargs
{
871 struct iattr
* sattr
;
873 struct timespec64 guardtime
;
876 struct nfs3_diropargs
{
882 struct nfs3_accessargs
{
887 struct nfs3_createargs
{
891 struct iattr
* sattr
;
892 enum nfs3_createmode createmode
;
896 struct nfs3_mkdirargs
{
900 struct iattr
* sattr
;
903 struct nfs3_symlinkargs
{
904 struct nfs_fh
* fromfh
;
905 const char * fromname
;
906 unsigned int fromlen
;
907 struct page
** pages
;
908 unsigned int pathlen
;
909 struct iattr
* sattr
;
912 struct nfs3_mknodargs
{
916 enum nfs3_ftype type
;
917 struct iattr
* sattr
;
921 struct nfs3_linkargs
{
922 struct nfs_fh
* fromfh
;
923 struct nfs_fh
* tofh
;
928 struct nfs3_readdirargs
{
934 struct page
** pages
;
937 struct nfs3_diropres
{
938 struct nfs_fattr
* dir_attr
;
940 struct nfs_fattr
* fattr
;
943 struct nfs3_accessres
{
944 struct nfs_fattr
* fattr
;
948 struct nfs3_readlinkargs
{
952 struct page
** pages
;
955 struct nfs3_linkres
{
956 struct nfs_fattr
* dir_attr
;
957 struct nfs_fattr
* fattr
;
960 struct nfs3_readdirres
{
961 struct nfs_fattr
* dir_attr
;
966 struct nfs3_getaclres
{
967 struct nfs_fattr
* fattr
;
969 unsigned int acl_access_count
;
970 unsigned int acl_default_count
;
971 struct posix_acl
* acl_access
;
972 struct posix_acl
* acl_default
;
975 #if IS_ENABLED(CONFIG_NFS_V4)
977 typedef u64 clientid4
;
979 struct nfs4_accessargs
{
980 struct nfs4_sequence_args seq_args
;
981 const struct nfs_fh
* fh
;
986 struct nfs4_accessres
{
987 struct nfs4_sequence_res seq_res
;
988 const struct nfs_server
* server
;
989 struct nfs_fattr
* fattr
;
994 struct nfs4_create_arg
{
995 struct nfs4_sequence_args seq_args
;
999 struct page
** pages
;
1001 } symlink
; /* NF4LNK */
1005 } device
; /* NF4BLK, NF4CHR */
1007 const struct qstr
* name
;
1008 const struct nfs_server
* server
;
1009 const struct iattr
* attrs
;
1010 const struct nfs_fh
* dir_fh
;
1011 const u32
* bitmask
;
1012 const struct nfs4_label
*label
;
1016 struct nfs4_create_res
{
1017 struct nfs4_sequence_res seq_res
;
1018 const struct nfs_server
* server
;
1020 struct nfs_fattr
* fattr
;
1021 struct nfs4_label
*label
;
1022 struct nfs4_change_info dir_cinfo
;
1025 struct nfs4_fsinfo_arg
{
1026 struct nfs4_sequence_args seq_args
;
1027 const struct nfs_fh
* fh
;
1028 const u32
* bitmask
;
1031 struct nfs4_fsinfo_res
{
1032 struct nfs4_sequence_res seq_res
;
1033 struct nfs_fsinfo
*fsinfo
;
1036 struct nfs4_getattr_arg
{
1037 struct nfs4_sequence_args seq_args
;
1038 const struct nfs_fh
* fh
;
1039 const u32
* bitmask
;
1042 struct nfs4_getattr_res
{
1043 struct nfs4_sequence_res seq_res
;
1044 const struct nfs_server
* server
;
1045 struct nfs_fattr
* fattr
;
1046 struct nfs4_label
*label
;
1049 struct nfs4_link_arg
{
1050 struct nfs4_sequence_args seq_args
;
1051 const struct nfs_fh
* fh
;
1052 const struct nfs_fh
* dir_fh
;
1053 const struct qstr
* name
;
1054 const u32
* bitmask
;
1057 struct nfs4_link_res
{
1058 struct nfs4_sequence_res seq_res
;
1059 const struct nfs_server
* server
;
1060 struct nfs_fattr
* fattr
;
1061 struct nfs4_label
*label
;
1062 struct nfs4_change_info cinfo
;
1063 struct nfs_fattr
* dir_attr
;
1066 struct nfs4_lookup_arg
{
1067 struct nfs4_sequence_args seq_args
;
1068 const struct nfs_fh
* dir_fh
;
1069 const struct qstr
* name
;
1070 const u32
* bitmask
;
1073 struct nfs4_lookup_res
{
1074 struct nfs4_sequence_res seq_res
;
1075 const struct nfs_server
* server
;
1076 struct nfs_fattr
* fattr
;
1078 struct nfs4_label
*label
;
1081 struct nfs4_lookupp_arg
{
1082 struct nfs4_sequence_args seq_args
;
1083 const struct nfs_fh
*fh
;
1087 struct nfs4_lookupp_res
{
1088 struct nfs4_sequence_res seq_res
;
1089 const struct nfs_server
*server
;
1090 struct nfs_fattr
*fattr
;
1092 struct nfs4_label
*label
;
1095 struct nfs4_lookup_root_arg
{
1096 struct nfs4_sequence_args seq_args
;
1097 const u32
* bitmask
;
1100 struct nfs4_pathconf_arg
{
1101 struct nfs4_sequence_args seq_args
;
1102 const struct nfs_fh
* fh
;
1103 const u32
* bitmask
;
1106 struct nfs4_pathconf_res
{
1107 struct nfs4_sequence_res seq_res
;
1108 struct nfs_pathconf
*pathconf
;
1111 struct nfs4_readdir_arg
{
1112 struct nfs4_sequence_args seq_args
;
1113 const struct nfs_fh
* fh
;
1115 nfs4_verifier verifier
;
1117 struct page
** pages
; /* zero-copy data */
1118 unsigned int pgbase
; /* zero-copy data */
1119 const u32
* bitmask
;
1123 struct nfs4_readdir_res
{
1124 struct nfs4_sequence_res seq_res
;
1125 nfs4_verifier verifier
;
1126 unsigned int pgbase
;
1129 struct nfs4_readlink
{
1130 struct nfs4_sequence_args seq_args
;
1131 const struct nfs_fh
* fh
;
1132 unsigned int pgbase
;
1133 unsigned int pglen
; /* zero-copy data */
1134 struct page
** pages
; /* zero-copy data */
1137 struct nfs4_readlink_res
{
1138 struct nfs4_sequence_res seq_res
;
1141 struct nfs4_setclientid
{
1142 const nfs4_verifier
* sc_verifier
;
1144 unsigned int sc_netid_len
;
1145 char sc_netid
[RPCBIND_MAXNETIDLEN
+ 1];
1146 unsigned int sc_uaddr_len
;
1147 char sc_uaddr
[RPCBIND_MAXUADDRLEN
+ 1];
1148 struct nfs_client
*sc_clnt
;
1149 struct rpc_cred
*sc_cred
;
1152 struct nfs4_setclientid_res
{
1154 nfs4_verifier confirm
;
1157 struct nfs4_statfs_arg
{
1158 struct nfs4_sequence_args seq_args
;
1159 const struct nfs_fh
* fh
;
1160 const u32
* bitmask
;
1163 struct nfs4_statfs_res
{
1164 struct nfs4_sequence_res seq_res
;
1165 struct nfs_fsstat
*fsstat
;
1168 struct nfs4_server_caps_arg
{
1169 struct nfs4_sequence_args seq_args
;
1170 struct nfs_fh
*fhandle
;
1171 const u32
* bitmask
;
1174 struct nfs4_server_caps_res
{
1175 struct nfs4_sequence_res seq_res
;
1176 u32 attr_bitmask
[3];
1177 u32 exclcreat_bitmask
[3];
1184 #define NFS4_PATHNAME_MAXCOMPONENTS 512
1185 struct nfs4_pathname
{
1186 unsigned int ncomponents
;
1187 struct nfs4_string components
[NFS4_PATHNAME_MAXCOMPONENTS
];
1190 #define NFS4_FS_LOCATION_MAXSERVERS 10
1191 struct nfs4_fs_location
{
1192 unsigned int nservers
;
1193 struct nfs4_string servers
[NFS4_FS_LOCATION_MAXSERVERS
];
1194 struct nfs4_pathname rootpath
;
1197 #define NFS4_FS_LOCATIONS_MAXENTRIES 10
1198 struct nfs4_fs_locations
{
1199 struct nfs_fattr fattr
;
1200 const struct nfs_server
*server
;
1201 struct nfs4_pathname fs_path
;
1203 struct nfs4_fs_location locations
[NFS4_FS_LOCATIONS_MAXENTRIES
];
1206 struct nfs4_fs_locations_arg
{
1207 struct nfs4_sequence_args seq_args
;
1208 const struct nfs_fh
*dir_fh
;
1209 const struct nfs_fh
*fh
;
1210 const struct qstr
*name
;
1214 unsigned char migration
:1, renew
:1;
1217 struct nfs4_fs_locations_res
{
1218 struct nfs4_sequence_res seq_res
;
1219 struct nfs4_fs_locations
*fs_locations
;
1220 unsigned char migration
:1, renew
:1;
1223 struct nfs4_secinfo4
{
1225 struct rpcsec_gss_info flavor_info
;
1228 struct nfs4_secinfo_flavors
{
1229 unsigned int num_flavors
;
1230 struct nfs4_secinfo4 flavors
[0];
1233 struct nfs4_secinfo_arg
{
1234 struct nfs4_sequence_args seq_args
;
1235 const struct nfs_fh
*dir_fh
;
1236 const struct qstr
*name
;
1239 struct nfs4_secinfo_res
{
1240 struct nfs4_sequence_res seq_res
;
1241 struct nfs4_secinfo_flavors
*flavors
;
1244 struct nfs4_fsid_present_arg
{
1245 struct nfs4_sequence_args seq_args
;
1246 const struct nfs_fh
*fh
;
1248 unsigned char renew
:1;
1251 struct nfs4_fsid_present_res
{
1252 struct nfs4_sequence_res seq_res
;
1254 unsigned char renew
:1;
1257 #endif /* CONFIG_NFS_V4 */
1264 #ifdef CONFIG_NFS_V4_1
1266 struct pnfs_commit_bucket
{
1267 struct list_head written
;
1268 struct list_head committing
;
1269 struct pnfs_layout_segment
*lseg
;
1270 struct nfs_writeverf direct_verf
;
1273 struct pnfs_commit_array
{
1274 struct list_head cinfo_list
;
1275 struct list_head lseg_list
;
1276 struct pnfs_layout_segment
*lseg
;
1277 struct rcu_head rcu
;
1278 refcount_t refcount
;
1279 unsigned int nbuckets
;
1280 struct pnfs_commit_bucket buckets
[];
1283 struct pnfs_ds_commit_info
{
1284 struct list_head commits
;
1285 unsigned int nwritten
;
1286 unsigned int ncommitting
;
1287 const struct pnfs_commit_ops
*ops
;
1290 struct nfs41_state_protection
{
1292 struct nfs4_op_map enforce
;
1293 struct nfs4_op_map allow
;
1296 struct nfs41_exchange_id_args
{
1297 struct nfs_client
*client
;
1298 nfs4_verifier verifier
;
1300 struct nfs41_state_protection state_protect
;
1303 struct nfs41_server_owner
{
1305 uint32_t major_id_sz
;
1306 char major_id
[NFS4_OPAQUE_LIMIT
];
1309 struct nfs41_server_scope
{
1310 uint32_t server_scope_sz
;
1311 char server_scope
[NFS4_OPAQUE_LIMIT
];
1314 struct nfs41_impl_id
{
1315 char domain
[NFS4_OPAQUE_LIMIT
+ 1];
1316 char name
[NFS4_OPAQUE_LIMIT
+ 1];
1317 struct nfstime4 date
;
1320 #define MAX_BIND_CONN_TO_SESSION_RETRIES 3
1321 struct nfs41_bind_conn_to_session_args
{
1322 struct nfs_client
*client
;
1323 struct nfs4_sessionid sessionid
;
1325 bool use_conn_in_rdma_mode
;
1329 struct nfs41_bind_conn_to_session_res
{
1330 struct nfs4_sessionid sessionid
;
1332 bool use_conn_in_rdma_mode
;
1335 struct nfs41_exchange_id_res
{
1339 struct nfs41_server_owner
*server_owner
;
1340 struct nfs41_server_scope
*server_scope
;
1341 struct nfs41_impl_id
*impl_id
;
1342 struct nfs41_state_protection state_protect
;
1345 struct nfs41_create_session_args
{
1346 struct nfs_client
*client
;
1350 uint32_t cb_program
;
1351 struct nfs4_channel_attrs fc_attrs
; /* Fore Channel */
1352 struct nfs4_channel_attrs bc_attrs
; /* Back Channel */
1355 struct nfs41_create_session_res
{
1356 struct nfs4_sessionid sessionid
;
1359 struct nfs4_channel_attrs fc_attrs
; /* Fore Channel */
1360 struct nfs4_channel_attrs bc_attrs
; /* Back Channel */
1363 struct nfs41_reclaim_complete_args
{
1364 struct nfs4_sequence_args seq_args
;
1365 /* In the future extend to include curr_fh for use with migration */
1366 unsigned char one_fs
:1;
1369 struct nfs41_reclaim_complete_res
{
1370 struct nfs4_sequence_res seq_res
;
1373 #define SECINFO_STYLE_CURRENT_FH 0
1374 #define SECINFO_STYLE_PARENT 1
1375 struct nfs41_secinfo_no_name_args
{
1376 struct nfs4_sequence_args seq_args
;
1380 struct nfs41_test_stateid_args
{
1381 struct nfs4_sequence_args seq_args
;
1382 nfs4_stateid
*stateid
;
1385 struct nfs41_test_stateid_res
{
1386 struct nfs4_sequence_res seq_res
;
1387 unsigned int status
;
1390 struct nfs41_free_stateid_args
{
1391 struct nfs4_sequence_args seq_args
;
1392 nfs4_stateid stateid
;
1395 struct nfs41_free_stateid_res
{
1396 struct nfs4_sequence_res seq_res
;
1397 unsigned int status
;
1402 struct pnfs_ds_commit_info
{
1405 #endif /* CONFIG_NFS_V4_1 */
1407 #ifdef CONFIG_NFS_V4_2
1408 struct nfs42_falloc_args
{
1409 struct nfs4_sequence_args seq_args
;
1411 struct nfs_fh
*falloc_fh
;
1412 nfs4_stateid falloc_stateid
;
1415 const u32
*falloc_bitmask
;
1418 struct nfs42_falloc_res
{
1419 struct nfs4_sequence_res seq_res
;
1420 unsigned int status
;
1422 struct nfs_fattr
*falloc_fattr
;
1423 const struct nfs_server
*falloc_server
;
1426 struct nfs42_copy_args
{
1427 struct nfs4_sequence_args seq_args
;
1429 struct nfs_fh
*src_fh
;
1430 nfs4_stateid src_stateid
;
1433 struct nfs_fh
*dst_fh
;
1434 nfs4_stateid dst_stateid
;
1439 struct nl4_server
*cp_src
;
1442 struct nfs42_write_res
{
1443 nfs4_stateid stateid
;
1445 struct nfs_writeverf verifier
;
1448 struct nfs42_copy_res
{
1449 struct nfs4_sequence_res seq_res
;
1450 struct nfs42_write_res write_res
;
1453 struct nfs_commitres commit_res
;
1456 struct nfs42_offload_status_args
{
1457 struct nfs4_sequence_args osa_seq_args
;
1458 struct nfs_fh
*osa_src_fh
;
1459 nfs4_stateid osa_stateid
;
1462 struct nfs42_offload_status_res
{
1463 struct nfs4_sequence_res osr_seq_res
;
1468 struct nfs42_copy_notify_args
{
1469 struct nfs4_sequence_args cna_seq_args
;
1471 struct nfs_fh
*cna_src_fh
;
1472 nfs4_stateid cna_src_stateid
;
1473 struct nl4_server cna_dst
;
1476 struct nfs42_copy_notify_res
{
1477 struct nfs4_sequence_res cnr_seq_res
;
1479 struct nfstime4 cnr_lease_time
;
1480 nfs4_stateid cnr_stateid
;
1481 struct nl4_server cnr_src
;
1484 struct nfs42_seek_args
{
1485 struct nfs4_sequence_args seq_args
;
1487 struct nfs_fh
*sa_fh
;
1488 nfs4_stateid sa_stateid
;
1493 struct nfs42_seek_res
{
1494 struct nfs4_sequence_res seq_res
;
1495 unsigned int status
;
1504 #define NFS_PAGEVEC_SIZE (8U)
1506 struct nfs_page_array
{
1507 struct page
**pagevec
;
1508 unsigned int npages
; /* Max length of pagevec */
1509 struct page
*page_array
[NFS_PAGEVEC_SIZE
];
1512 /* used as flag bits in nfs_pgio_header */
1514 NFS_IOHDR_ERROR
= 0,
1518 NFS_IOHDR_RESEND_PNFS
,
1519 NFS_IOHDR_RESEND_MDS
,
1522 struct nfs_io_completion
;
1523 struct nfs_pgio_header
{
1524 struct inode
*inode
;
1525 const struct cred
*cred
;
1526 struct list_head pages
;
1527 struct nfs_page
*req
;
1528 struct nfs_writeverf verf
; /* Used for writes */
1530 struct pnfs_layout_segment
*lseg
;
1532 const struct rpc_call_ops
*mds_ops
;
1533 void (*release
) (struct nfs_pgio_header
*hdr
);
1534 const struct nfs_pgio_completion_ops
*completion_ops
;
1535 const struct nfs_rw_ops
*rw_ops
;
1536 struct nfs_io_completion
*io_completion
;
1537 struct nfs_direct_req
*dreq
;
1540 int error
; /* merge with pnfs_error */
1541 unsigned int good_bytes
; /* boundary of good data */
1542 unsigned long flags
;
1547 struct rpc_task task
;
1548 struct nfs_fattr fattr
;
1549 struct nfs_pgio_args args
; /* argument struct */
1550 struct nfs_pgio_res res
; /* result struct */
1551 unsigned long timestamp
; /* For lease renewal */
1552 int (*pgio_done_cb
)(struct rpc_task
*, struct nfs_pgio_header
*);
1553 __u64 mds_offset
; /* Filelayout dense stripe */
1554 struct nfs_page_array page_array
;
1555 struct nfs_client
*ds_clp
; /* pNFS data server */
1556 int ds_commit_idx
; /* ds index if ds_clp is set */
1557 int pgio_mirror_idx
;/* mirror index in pgio layer */
1560 struct nfs_mds_commit_info
{
1562 atomic_long_t ncommit
;
1563 struct list_head list
;
1566 struct nfs_commit_info
;
1567 struct nfs_commit_data
;
1569 struct nfs_commit_completion_ops
{
1570 void (*completion
) (struct nfs_commit_data
*data
);
1571 void (*resched_write
) (struct nfs_commit_info
*, struct nfs_page
*);
1574 struct nfs_commit_info
{
1575 struct inode
*inode
; /* Needed for inode->i_lock */
1576 struct nfs_mds_commit_info
*mds
;
1577 struct pnfs_ds_commit_info
*ds
;
1578 struct nfs_direct_req
*dreq
; /* O_DIRECT request */
1579 const struct nfs_commit_completion_ops
*completion_ops
;
1582 struct nfs_commit_data
{
1583 struct rpc_task task
;
1584 struct inode
*inode
;
1585 const struct cred
*cred
;
1586 struct nfs_fattr fattr
;
1587 struct nfs_writeverf verf
;
1588 struct list_head pages
; /* Coalesced requests we wish to flush */
1589 struct list_head list
; /* lists of struct nfs_write_data */
1590 struct nfs_direct_req
*dreq
; /* O_DIRECT request */
1591 struct nfs_commitargs args
; /* argument struct */
1592 struct nfs_commitres res
; /* result struct */
1593 struct nfs_open_context
*context
;
1594 struct pnfs_layout_segment
*lseg
;
1595 struct nfs_client
*ds_clp
; /* pNFS data server */
1596 int ds_commit_index
;
1598 const struct rpc_call_ops
*mds_ops
;
1599 const struct nfs_commit_completion_ops
*completion_ops
;
1600 int (*commit_done_cb
) (struct rpc_task
*task
, struct nfs_commit_data
*data
);
1601 unsigned long flags
;
1604 struct nfs_pgio_completion_ops
{
1605 void (*error_cleanup
)(struct list_head
*head
, int);
1606 void (*init_hdr
)(struct nfs_pgio_header
*hdr
);
1607 void (*completion
)(struct nfs_pgio_header
*hdr
);
1608 void (*reschedule_io
)(struct nfs_pgio_header
*hdr
);
1611 struct nfs_unlinkdata
{
1612 struct nfs_removeargs args
;
1613 struct nfs_removeres res
;
1614 struct dentry
*dentry
;
1615 wait_queue_head_t wq
;
1616 const struct cred
*cred
;
1617 struct nfs_fattr dir_attr
;
1621 struct nfs_renamedata
{
1622 struct nfs_renameargs args
;
1623 struct nfs_renameres res
;
1624 const struct cred
*cred
;
1625 struct inode
*old_dir
;
1626 struct dentry
*old_dentry
;
1627 struct nfs_fattr old_fattr
;
1628 struct inode
*new_dir
;
1629 struct dentry
*new_dentry
;
1630 struct nfs_fattr new_fattr
;
1631 void (*complete
)(struct rpc_task
*, struct nfs_renamedata
*);
1636 struct nfs_access_entry
;
1639 struct nfs_subversion
;
1640 struct nfs_mount_info
;
1641 struct nfs_client_initdata
;
1642 struct nfs_pageio_descriptor
;
1646 * RPC procedure vector for NFSv2/NFSv3 demuxing
1648 struct nfs_rpc_ops
{
1649 u32 version
; /* Protocol version */
1650 const struct dentry_operations
*dentry_ops
;
1651 const struct inode_operations
*dir_inode_ops
;
1652 const struct inode_operations
*file_inode_ops
;
1653 const struct file_operations
*file_ops
;
1654 const struct nlmclnt_operations
*nlmclnt_ops
;
1656 int (*getroot
) (struct nfs_server
*, struct nfs_fh
*,
1657 struct nfs_fsinfo
*);
1658 int (*submount
) (struct fs_context
*, struct nfs_server
*);
1659 int (*try_get_tree
) (struct fs_context
*);
1660 int (*getattr
) (struct nfs_server
*, struct nfs_fh
*,
1661 struct nfs_fattr
*, struct nfs4_label
*,
1663 int (*setattr
) (struct dentry
*, struct nfs_fattr
*,
1665 int (*lookup
) (struct inode
*, struct dentry
*,
1666 struct nfs_fh
*, struct nfs_fattr
*,
1667 struct nfs4_label
*);
1668 int (*lookupp
) (struct inode
*, struct nfs_fh
*,
1669 struct nfs_fattr
*, struct nfs4_label
*);
1670 int (*access
) (struct inode
*, struct nfs_access_entry
*);
1671 int (*readlink
)(struct inode
*, struct page
*, unsigned int,
1673 int (*create
) (struct inode
*, struct dentry
*,
1674 struct iattr
*, int);
1675 int (*remove
) (struct inode
*, struct dentry
*);
1676 void (*unlink_setup
) (struct rpc_message
*, struct dentry
*, struct inode
*);
1677 void (*unlink_rpc_prepare
) (struct rpc_task
*, struct nfs_unlinkdata
*);
1678 int (*unlink_done
) (struct rpc_task
*, struct inode
*);
1679 void (*rename_setup
) (struct rpc_message
*msg
,
1680 struct dentry
*old_dentry
,
1681 struct dentry
*new_dentry
);
1682 void (*rename_rpc_prepare
)(struct rpc_task
*task
, struct nfs_renamedata
*);
1683 int (*rename_done
) (struct rpc_task
*task
, struct inode
*old_dir
, struct inode
*new_dir
);
1684 int (*link
) (struct inode
*, struct inode
*, const struct qstr
*);
1685 int (*symlink
) (struct inode
*, struct dentry
*, struct page
*,
1686 unsigned int, struct iattr
*);
1687 int (*mkdir
) (struct inode
*, struct dentry
*, struct iattr
*);
1688 int (*rmdir
) (struct inode
*, const struct qstr
*);
1689 int (*readdir
) (struct dentry
*, const struct cred
*,
1690 u64
, struct page
**, unsigned int, bool);
1691 int (*mknod
) (struct inode
*, struct dentry
*, struct iattr
*,
1693 int (*statfs
) (struct nfs_server
*, struct nfs_fh
*,
1694 struct nfs_fsstat
*);
1695 int (*fsinfo
) (struct nfs_server
*, struct nfs_fh
*,
1696 struct nfs_fsinfo
*);
1697 int (*pathconf
) (struct nfs_server
*, struct nfs_fh
*,
1698 struct nfs_pathconf
*);
1699 int (*set_capabilities
)(struct nfs_server
*, struct nfs_fh
*);
1700 int (*decode_dirent
)(struct xdr_stream
*, struct nfs_entry
*, bool);
1701 int (*pgio_rpc_prepare
)(struct rpc_task
*,
1702 struct nfs_pgio_header
*);
1703 void (*read_setup
)(struct nfs_pgio_header
*, struct rpc_message
*);
1704 int (*read_done
)(struct rpc_task
*, struct nfs_pgio_header
*);
1705 void (*write_setup
)(struct nfs_pgio_header
*, struct rpc_message
*,
1706 struct rpc_clnt
**);
1707 int (*write_done
)(struct rpc_task
*, struct nfs_pgio_header
*);
1708 void (*commit_setup
) (struct nfs_commit_data
*, struct rpc_message
*,
1709 struct rpc_clnt
**);
1710 void (*commit_rpc_prepare
)(struct rpc_task
*, struct nfs_commit_data
*);
1711 int (*commit_done
) (struct rpc_task
*, struct nfs_commit_data
*);
1712 int (*lock
)(struct file
*, int, struct file_lock
*);
1713 int (*lock_check_bounds
)(const struct file_lock
*);
1714 void (*clear_acl_cache
)(struct inode
*);
1715 void (*close_context
)(struct nfs_open_context
*ctx
, int);
1716 struct inode
* (*open_context
) (struct inode
*dir
,
1717 struct nfs_open_context
*ctx
,
1719 struct iattr
*iattr
,
1721 int (*have_delegation
)(struct inode
*, fmode_t
);
1722 struct nfs_client
*(*alloc_client
) (const struct nfs_client_initdata
*);
1723 struct nfs_client
*(*init_client
) (struct nfs_client
*,
1724 const struct nfs_client_initdata
*);
1725 void (*free_client
) (struct nfs_client
*);
1726 struct nfs_server
*(*create_server
)(struct fs_context
*);
1727 struct nfs_server
*(*clone_server
)(struct nfs_server
*, struct nfs_fh
*,
1728 struct nfs_fattr
*, rpc_authflavor_t
);
1732 * NFS_CALL(getattr, inode, (fattr));
1734 * NFS_PROTO(inode)->getattr(fattr);
1736 #define NFS_CALL(op, inode, args) NFS_PROTO(inode)->op args
1739 * Function vectors etc. for the NFS client
1741 extern const struct nfs_rpc_ops nfs_v2_clientops
;
1742 extern const struct nfs_rpc_ops nfs_v3_clientops
;
1743 extern const struct nfs_rpc_ops nfs_v4_clientops
;
1744 extern const struct rpc_version nfs_version2
;
1745 extern const struct rpc_version nfs_version3
;
1746 extern const struct rpc_version nfs_version4
;
1748 extern const struct rpc_version nfsacl_version3
;
1749 extern const struct rpc_program nfsacl_program
;