1 /* NFSv4.1 client for Windows
2 * Copyright © 2012 The Regents of the University of Michigan
4 * Olga Kornievskaia <aglo@umich.edu>
5 * Casey Bodley <cbodley@umich.edu>
7 * This library is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
12 * This library is distributed in the hope that it will be useful, but
13 * without any warranty; without even the implied warranty of merchantability
14 * or fitness for a particular purpose. See the GNU Lesser General Public
15 * License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef __NFS41_NFS_OPS_H__
23 #define __NFS41_NFS_OPS_H__
29 /* Operation arrays */
48 OP_OPEN_CONFIRM
= 20, /* Mandatory not-to-implement */
49 OP_OPEN_DOWNGRADE
= 21,
58 OP_RENEW
= 30, /* Mandatory not-to-implement */
63 OP_SETCLIENTID
= 35, /* Mandatory not-to-implement */
64 OP_SETCLIENTID_CONFIRM
= 36, /* Mandatory not-to-implement */
67 OP_RELEASE_LOCKOWNER
= 39, /* Mandatory not-to-implement */
69 /* new operations for NFSv4.1 */
70 OP_BACKCHANNEL_CTL
= 40,
71 OP_BIND_CONN_TO_SESSION
= 41,
73 OP_CREATE_SESSION
= 43,
74 OP_DESTROY_SESSION
= 44,
76 OP_GET_DIR_DELEGATION
= 46,
77 OP_GETDEVICEINFO
= 47,
78 OP_GETDEVICELIST
= 48,
82 OP_SECINFO_NO_NAME
= 52,
86 OP_WANT_DELEGATION
= 56,
87 OP_DESTROY_CLIENTID
= 57,
88 OP_RECLAIM_COMPLETE
= 58,
95 EXCHGID4_FLAG_SUPP_MOVED_REFER
= 0x00000001,
96 EXCHGID4_FLAG_SUPP_MOVED_MIGR
= 0x00000002,
98 EXCHGID4_FLAG_BIND_PRINC_STATEID
= 0x00000100,
100 EXCHGID4_FLAG_USE_NON_PNFS
= 0x00010000,
101 EXCHGID4_FLAG_USE_PNFS_MDS
= 0x00020000,
102 EXCHGID4_FLAG_USE_PNFS_DS
= 0x00040000,
104 EXCHGID4_FLAG_MASK_PNFS
= 0x00070000,
106 EXCHGID4_FLAG_UPD_CONFIRMED_REC_A
= 0x40000000,
107 EXCHGID4_FLAG_CONFIRMED_R
= 0x80000000
114 } state_protect_how4
;
116 typedef struct __state_protect4_a
{
117 state_protect_how4 spa_how
;
120 typedef struct __nfs41_exchange_id_args
{
121 client_owner4
*eia_clientowner
;
123 state_protect4_a eia_state_protect
;
124 nfs_impl_id4
*eia_client_impl_id
; /* <1> */
125 } nfs41_exchange_id_args
;
127 typedef struct __state_protect4_r
{
128 state_protect_how4 spr_how
;
131 typedef struct __nfs41_exchange_id_res
{
136 state_protect4_r state_protect
;
137 server_owner4 server_owner
;
138 uint32_t server_scope_len
;
139 char server_scope
[NFS4_OPAQUE_LIMIT
];
140 } nfs41_exchange_id_res
;
142 typedef struct __nfs41_callback_sec_parms
{
146 struct __authsys_parms
{
150 /* case RPCSEC_GSS */
151 struct __rpcsec_gss_parms
{
152 uint32_t gss_srv_type
;
153 char *srv_gssctx_handle
;
154 uint32_t srv_gssctx_hdle_len
;
155 char *clnt_gssctx_handle
;
156 uint32_t clnt_gssctx_hdle_len
;
159 } nfs41_callback_secparms
;
161 /* OP_CREATE_SESSION */
162 typedef struct __nfs41_create_session_args
{
163 uint64_t csa_clientid
;
164 uint32_t csa_sequence
;
166 nfs41_channel_attrs csa_fore_chan_attrs
;
167 nfs41_channel_attrs csa_back_chan_attrs
;
168 uint32_t csa_cb_program
;
169 nfs41_callback_secparms csa_cb_secparams
[2];
170 } nfs41_create_session_args
;
172 typedef struct __nfs41_create_session_res
{
173 unsigned char *csr_sessionid
;
174 uint32_t csr_sequence
;
176 nfs41_channel_attrs
*csr_fore_chan_attrs
;
177 nfs41_channel_attrs
*csr_back_chan_attrs
;
178 } nfs41_create_session_res
;
181 /* OP_BIND_CONN_TO_SESSION */
182 enum channel_dir_from_client4
{
185 CDFC4_FORE_OR_BOTH
= 0x3,
186 CDFC4_BACK_OR_BOTH
= 0x7
189 enum channel_dir_from_server4
{
195 typedef struct __nfs41_bind_conn_to_session_args
{
196 unsigned char *sessionid
;
197 enum channel_dir_from_client4 dir
;
198 } nfs41_bind_conn_to_session_args
;
200 typedef struct __nfs41_bind_conn_to_session_res
{
201 enum nfsstat4 status
;
203 enum channel_dir_from_server4 dir
;
204 } nfs41_bind_conn_to_session_res
;
207 /* OP_DESTROY_SESSION */
208 typedef struct __nfs41_destroy_session_args
{
209 unsigned char *dsa_sessionid
;
210 } nfs41_destroy_session_args
;
212 typedef struct __nfs41_destroy_session_res
{
214 } nfs41_destroy_session_res
;
217 /* OP_DESTROY_CLIENTID */
218 typedef struct __nfs41_destroy_clientid_args
{
219 uint64_t dca_clientid
;
220 } nfs41_destroy_clientid_args
;
222 typedef struct __nfs41_destroy_clientid_res
{
224 } nfs41_destroy_clientid_res
;
228 typedef struct __nfs41_sequence_args
{
229 unsigned char *sa_sessionid
;
230 uint32_t sa_sequenceid
;
232 uint32_t sa_highest_slotid
;
234 } nfs41_sequence_args
;
237 SEQ4_STATUS_CB_PATH_DOWN
= 0x00000001,
238 SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING
= 0x00000002,
239 SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED
= 0x00000004,
240 SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED
= 0x00000008,
241 SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED
= 0x00000010,
242 SEQ4_STATUS_ADMIN_STATE_REVOKED
= 0x00000020,
243 SEQ4_STATUS_RECALLABLE_STATE_REVOKED
= 0x00000040,
244 SEQ4_STATUS_LEASE_MOVED
= 0x00000080,
245 SEQ4_STATUS_RESTART_RECLAIM_NEEDED
= 0x00000100,
246 SEQ4_STATUS_CB_PATH_DOWN_SESSION
= 0x00000200,
247 SEQ4_STATUS_BACKCHANNEL_FAULT
= 0x00000400,
248 SEQ4_STATUS_DEVID_CHANGED
= 0x00000800,
249 SEQ4_STATUS_DEVID_DELETED
= 0x00001000
252 typedef struct __nfs41_sequence_res_ok
{
253 unsigned char sr_sessionid
[NFS4_SESSIONID_SIZE
];
254 uint32_t sr_sequenceid
;
256 uint32_t sr_highest_slotid
;
257 uint32_t sr_target_highest_slotid
;
258 uint32_t sr_status_flags
;
259 } nfs41_sequence_res_ok
;
261 typedef struct __nfs41_sequence_res
{
264 nfs41_sequence_res_ok sr_resok4
;
265 } nfs41_sequence_res
;
268 /* OP_RECLAIM_COMPLETE */
269 typedef struct __nfs41_reclaim_complete_res
{
270 enum nfsstat4 status
;
271 } nfs41_reclaim_complete_res
;
274 /* recoverable stateid argument */
283 typedef struct __stateid_arg
{
285 enum stateid_type type
;
286 nfs41_open_state
*open
;
287 nfs41_delegation_state
*delegation
;
293 ACCESS4_READ
= 0x00000001,
294 ACCESS4_LOOKUP
= 0x00000002,
295 ACCESS4_MODIFY
= 0x00000004,
296 ACCESS4_EXTEND
= 0x00000008,
297 ACCESS4_DELETE
= 0x00000010,
298 ACCESS4_EXECUTE
= 0x00000020
301 typedef struct __nfs41_access_args
{
305 typedef struct __nfs41_access_res
{
314 typedef struct __nfs41_op_close_args
{
315 // uint32_t seqid; // not used, always 0
316 stateid_arg
*stateid
;
317 } nfs41_op_close_args
;
319 typedef struct __nfs41_op_close_res
{
321 } nfs41_op_close_res
;
325 typedef struct __nfs41_commit_args
{
330 typedef struct __nfs41_commit_res
{
332 nfs41_write_verf
*verf
;
337 typedef struct __specdata4
{
342 typedef struct __createtype4
{
346 struct __create_type_lnk
{
347 uint32_t linkdata_len
;
348 const char *linkdata
;
350 /* case NF4BLK, NF4CHR: */
355 typedef struct __nfs41_create_args
{
357 const nfs41_component
*name
;
358 nfs41_file_info
*createattrs
;
361 typedef struct __nfs41_create_res
{
370 typedef struct __nfs41_delegpurge_res
{
372 } nfs41_delegpurge_res
;
376 typedef struct __nfs41_delegreturn_args
{
377 stateid_arg
*stateid
;
378 } nfs41_delegreturn_args
;
380 typedef struct __nfs41_delegreturn_res
{
382 } nfs41_delegreturn_res
;
386 typedef struct __nfs41_link_args
{
387 const nfs41_component
*newname
;
390 typedef struct __nfs41_link_res
{
401 READW_LT
= 3, /* blocking read */
402 WRITEW_LT
= 4 /* blocking write */
405 typedef struct __open_to_lock_owner4
{
407 stateid_arg
*open_stateid
;
409 state_owner4
*lock_owner
;
410 } open_to_lock_owner4
;
412 typedef struct __exist_lock_owner4
{
413 stateid_arg
*lock_stateid
;
417 typedef struct __locker4
{
418 bool_t new_lock_owner
;
421 open_to_lock_owner4 open_owner
;
423 exist_lock_owner4 lock_owner
;
427 typedef struct __nfs41_lock_args
{
435 typedef struct __lock_res_denied
{
442 typedef struct __lock_res_ok
{
443 stateid4
*lock_stateid
;
446 typedef struct __nfs41_lock_res
{
451 /* case NFS4ERR_DENIED: */
452 lock_res_denied denied
;
459 typedef struct __nfs41_lockt_args
{
466 typedef struct __nfs41_lockt_res
{
468 /* case NFS4ERR_DENIED: */
469 lock_res_denied denied
;
475 typedef struct __nfs41_locku_args
{
478 stateid_arg
*lock_stateid
;
483 typedef struct __nfs41_locku_res
{
486 stateid4
*lock_stateid
;
491 typedef struct __nfs41_lookup_args
{
492 const nfs41_component
*name
;
495 typedef struct __nfs41_lookup_res
{
501 typedef struct __nfs41_getfh_res
{
509 typedef struct __nfs41_putfh_args
{
514 typedef struct __nfs41_putfh_res
{
520 typedef struct __nfs41_putrootfh_res
{
522 } nfs41_putrootfh_res
;
526 typedef struct __nfs41_getattr_args
{
527 bitmap4
*attr_request
;
528 } nfs41_getattr_args
;
530 typedef struct __nfs41_getattr_res
{
533 fattr4 obj_attributes
;
534 nfs41_file_info
*info
;
546 typedef struct __createhow4
{
548 nfs41_file_info
*createattrs
;
549 unsigned char createverf
[NFS4_VERIFIER_SIZE
];
557 typedef struct __openflag4
{
559 /* case OPEN4_CREATE: */
564 OPEN4_SHARE_ACCESS_READ
= 0x00000001,
565 OPEN4_SHARE_ACCESS_WRITE
= 0x00000002,
566 OPEN4_SHARE_ACCESS_BOTH
= 0x00000003,
568 OPEN4_SHARE_DENY_NONE
= 0x00000000,
569 OPEN4_SHARE_DENY_READ
= 0x00000001,
570 OPEN4_SHARE_DENY_WRITE
= 0x00000002,
571 OPEN4_SHARE_DENY_BOTH
= 0x00000003,
573 OPEN4_SHARE_ACCESS_WANT_DELEG_MASK
= 0xFF00,
574 OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE
= 0x0000,
575 OPEN4_SHARE_ACCESS_WANT_READ_DELEG
= 0x0100,
576 OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG
= 0x0200,
577 OPEN4_SHARE_ACCESS_WANT_ANY_DELEG
= 0x0300,
578 OPEN4_SHARE_ACCESS_WANT_NO_DELEG
= 0x0400,
579 OPEN4_SHARE_ACCESS_WANT_CANCEL
= 0x0500,
581 OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL
= 0x10000,
582 OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED
= 0x20000
585 enum open_delegation_type4
{
586 OPEN_DELEGATE_NONE
= 0,
587 OPEN_DELEGATE_READ
= 1,
588 OPEN_DELEGATE_WRITE
= 2,
589 OPEN_DELEGATE_NONE_EXT
= 3
592 enum open_claim_type4
{
595 CLAIM_DELEGATE_CUR
= 2,
596 CLAIM_DELEGATE_PREV
= 3,
598 CLAIM_DELEG_CUR_FH
= 5,
599 CLAIM_DELEG_PREV_FH
= 6
602 enum why_no_delegation4
{
606 WND4_NOT_SUPP_FTYPE
= 3,
607 WND4_WRITE_DELEG_NOT_SUPP_FTYPE
= 4,
608 WND4_NOT_SUPP_UPGRADE
= 5,
609 WND4_NOT_SUPP_DOWNGRADE
= 6,
614 typedef struct __open_claim4
{
617 /* case CLAIM_NULL: */
618 struct __open_claim_null
{
619 const nfs41_component
*filename
;
621 /* case CLAIM_PREVIOUS: */
622 struct __open_claim_prev
{
623 uint32_t delegate_type
;
625 /* case CLAIM_DELEGATE_CUR: */
626 struct __open_claim_deleg_cur
{
627 stateid_arg
*delegate_stateid
;
628 nfs41_component
*name
;
630 /* case CLAIM_DELEG_CUR_FH: */
631 struct __open_claim_deleg_cur_fh
{
632 stateid_arg
*delegate_stateid
;
634 /* case CLAIM_DELEGATE_PREV: */
635 struct __open_claim_deleg_prev
{
636 const nfs41_component
*filename
;
641 typedef struct __nfs41_op_open_args
{
643 uint32_t share_access
;
648 } nfs41_op_open_args
;
651 OPEN4_RESULT_CONFIRM
= 0x00000002,
652 OPEN4_RESULT_LOCKTYPE_POSIX
= 0x00000004,
653 OPEN4_RESULT_PRESERVE_UNLINKED
= 0x00000008,
654 OPEN4_RESULT_MAY_NOTIFY_LOCK
= 0x00000020
657 typedef struct __nfs41_op_open_res_ok
{
662 open_delegation4
*delegation
;
663 } nfs41_op_open_res_ok
;
665 typedef struct __nfs41_op_open_res
{
668 nfs41_op_open_res_ok resok4
;
673 typedef struct __nfs41_openattr_args
{
675 } nfs41_openattr_args
;
677 typedef struct __nfs41_openattr_res
{
679 } nfs41_openattr_res
;
683 typedef struct __nfs41_read_args
{
684 stateid_arg
*stateid
; /* -> nfs41_op_open_res_ok.stateid */
689 typedef struct __nfs41_read_res_ok
{
692 unsigned char *data
; /* caller-allocated */
695 typedef struct __nfs41_read_res
{
698 nfs41_read_res_ok resok4
;
703 typedef struct __nfs41_readdir_args
{
704 nfs41_readdir_cookie cookie
;
707 bitmap4
*attr_request
;
708 } nfs41_readdir_args
;
710 typedef struct __nfs41_readdir_entry
{
713 uint32_t next_entry_offset
;
714 nfs41_file_info attr_info
;
716 } nfs41_readdir_entry
;
718 typedef struct __nfs41_readdir_list
{
720 uint32_t entries_len
;
721 unsigned char *entries
;
723 } nfs41_readdir_list
;
725 typedef struct __nfs41_readdir_res
{
728 unsigned char cookieverf
[NFS4_VERIFIER_SIZE
];
729 nfs41_readdir_list reply
;
734 typedef struct __nfs41_readlink_res
{
739 } nfs41_readlink_res
;
743 typedef struct __nfs41_remove_args
{
744 const nfs41_component
*target
;
747 typedef struct __nfs41_remove_res
{
755 typedef struct __nfs41_rename_args
{
756 const nfs41_component
*oldname
;
757 const nfs41_component
*newname
;
760 typedef struct __nfs41_rename_res
{
763 change_info4 source_cinfo
;
764 change_info4 target_cinfo
;
770 typedef struct __nfs41_restorefh_savefh_res
{
772 } nfs41_restorefh_res
, nfs41_savefh_res
;
777 SET_TO_SERVER_TIME4
= 0,
778 SET_TO_CLIENT_TIME4
= 1
781 typedef struct __nfs41_setattr_args
{
782 stateid_arg
*stateid
;
783 nfs41_file_info
*info
;
784 } nfs41_setattr_args
;
786 typedef struct __nfs41_setattr_res
{
792 /* OP_WANT_DELEGATION */
793 typedef struct __deleg_claim4
{
795 /* case CLAIM_PREVIOUS: */
796 uint32_t prev_delegate_type
;
799 typedef struct __nfs41_want_delegation_args
{
802 } nfs41_want_delegation_args
;
804 typedef struct __nfs41_want_delegation_res
{
807 open_delegation4
*delegation
;
808 } nfs41_want_delegation_res
;
809 /* OP_FREE_STATEID */
810 typedef struct __nfs41_free_stateid_args
{
812 } nfs41_free_stateid_args
;
814 typedef struct __nfs41_free_stateid_res
{
816 } nfs41_free_stateid_res
;
819 /* OP_TEST_STATEID */
820 typedef struct __nfs41_test_stateid_args
{
822 stateid_arg
*stateids
; // caller-allocated array
823 } nfs41_test_stateid_args
;
825 typedef struct __nfs41_test_stateid_res
{
829 uint32_t *status
; // caller-allocated array
831 } nfs41_test_stateid_res
;
841 typedef struct __nfs41_write_args
{
842 stateid_arg
*stateid
; /* -> nfs41_op_open_res_ok.stateid */
844 uint32_t stable
; /* stable_how4 */
846 unsigned char *data
; /* caller-allocated */
849 typedef struct __nfs41_write_res_ok
{
851 nfs41_write_verf
*verf
;
852 } nfs41_write_res_ok
;
854 typedef struct __nfs41_write_res
{
857 nfs41_write_res_ok resok4
;
862 RPC_GSS_SVC_NONE
= 1,
863 RPC_GSS_SVC_INTEGRITY
= 2,
864 RPC_GSS_SVC_PRIVACY
= 3,
868 #define MAX_OID_LEN 128
869 typedef struct __nfs41_secinfo_info
{
870 char oid
[MAX_OID_LEN
];
874 enum sec_flavor type
;
875 } nfs41_secinfo_info
;
877 typedef struct __nfs41_secinfo_args
{
878 const nfs41_component
*name
;
879 } nfs41_secinfo_args
;
881 #define MAX_SECINFOS 6
883 /* OP_SECINFO_NO_NAME */
884 enum secinfo_no_name_type
{
885 SECINFO_STYLE4_CURRENT_FH
= 0,
886 SECINFO_STYLE4_PARENT
= 1
889 typedef struct __nfs41_secinfo_noname_args
{
893 enum secinfo_noname_type type
;
895 } nfs41_secinfo_noname_args
;
897 typedef struct __nfs41_secinfo_noname_res
{
900 nfs41_secinfo_info
*secinfo
;
902 } nfs41_secinfo_noname_res
;
905 typedef struct __pnfs_layoutget_args
{
906 bool_t signal_layout_avail
;
907 enum pnfs_layout_type layout_type
;
908 enum pnfs_iomode iomode
;
912 stateid_arg
*stateid
;
914 } pnfs_layoutget_args
;
916 typedef struct __pnfs_layoutget_res_ok
{
917 bool_t return_on_close
;
920 struct list_entry layouts
; /* list of pnfs_layouts */
921 } pnfs_layoutget_res_ok
;
923 typedef struct __pnfs_layoutget_res
{
924 enum nfsstat4 status
;
927 pnfs_layoutget_res_ok
*res_ok
;
928 /* case NFS4ERR_LAYOUTTRYLATER: */
929 bool_t will_signal_layout_avail
;
932 } pnfs_layoutget_res
;
936 typedef struct __pnfs_layoutcommit_args
{
941 uint64_t *new_offset
;
942 } pnfs_layoutcommit_args
;
944 typedef struct __pnfs_layoutcommit_res
{
950 } pnfs_layoutcommit_res
;
954 typedef struct __pnfs_layoutreturn_args
{
956 enum pnfs_layout_type type
;
957 enum pnfs_iomode iomode
;
958 enum pnfs_return_type return_type
;
959 /* case LAYOUTRETURN4_FILE: */
963 } pnfs_layoutreturn_args
;
965 typedef struct __pnfs_layoutreturn_res
{
966 enum nfsstat4 status
;
968 bool_t stateid_present
;
971 } pnfs_layoutreturn_res
;
975 typedef struct __pnfs_getdeviceinfo_args
{
976 unsigned char *deviceid
;
977 enum pnfs_layout_type layout_type
;
979 bitmap4 notify_types
;
980 } pnfs_getdeviceinfo_args
;
982 typedef struct __pnfs_getdeviceinfo_res_ok
{
983 pnfs_file_device
*device
;
984 bitmap4 notification
;
985 } pnfs_getdeviceinfo_res_ok
;
987 typedef struct __pnfs_getdeviceinfo_res
{
988 enum nfsstat4 status
;
991 pnfs_getdeviceinfo_res_ok res_ok
;
992 /* case NFS4ERR_TOOSMALL: */
996 } pnfs_getdeviceinfo_res
;
1000 int nfs41_exchange_id(
1001 IN nfs41_rpc_clnt
*rpc
,
1002 IN client_owner4
*owner
,
1003 IN
uint32_t flags_in
,
1004 OUT nfs41_exchange_id_res
*res_out
);
1006 int nfs41_create_session(
1007 IN nfs41_client
*clnt
,
1008 OUT nfs41_session
*session
,
1009 IN bool_t try_recovery
);
1011 enum nfsstat4
nfs41_bind_conn_to_session(
1012 IN nfs41_rpc_clnt
*rpc
,
1013 IN
const unsigned char *sessionid
,
1014 IN
enum channel_dir_from_client4 dir
);
1016 int nfs41_destroy_session(
1017 IN nfs41_session
*session
);
1019 int nfs41_destroy_clientid(
1020 IN nfs41_rpc_clnt
*rpc
,
1021 IN
uint64_t clientid
);
1023 int nfs41_send_sequence(
1024 IN nfs41_session
*session
);
1026 enum nfsstat4
nfs41_reclaim_complete(
1027 IN nfs41_session
*session
);
1030 IN nfs41_root
*root
,
1031 IN nfs41_session
*session
,
1032 IN OUT nfs41_abs_path
*path
,
1033 OUT OPTIONAL nfs41_path_fh
*parent_out
,
1034 OUT OPTIONAL nfs41_path_fh
*target_out
,
1035 OUT OPTIONAL nfs41_file_info
*info_out
,
1036 OUT nfs41_session
**session_out
);
1039 IN nfs41_session
*session
,
1040 IN nfs41_path_fh
*parent
,
1041 IN nfs41_path_fh
*file
,
1042 IN state_owner4
*owner
,
1043 IN open_claim4
*claim
,
1047 IN
uint32_t how_mode
,
1048 IN OPTIONAL nfs41_file_info
*createattrs
,
1049 IN bool_t try_recovery
,
1050 OUT stateid4
*stateid
,
1051 OUT open_delegation4
*delegation
,
1052 OUT OPTIONAL nfs41_file_info
*info
);
1055 IN nfs41_session
*session
,
1057 IN nfs41_file_info
*createattrs
,
1058 IN OPTIONAL
const char *symlink
,
1059 IN nfs41_path_fh
*parent
,
1060 OUT nfs41_path_fh
*file
,
1061 OUT nfs41_file_info
*info
);
1064 IN nfs41_session
*session
,
1065 IN nfs41_path_fh
*file
,
1066 IN stateid_arg
*stateid
);
1069 IN nfs41_session
*session
,
1070 IN nfs41_path_fh
*file
,
1071 IN stateid_arg
*stateid
,
1072 IN
unsigned char *data
,
1073 IN
uint32_t data_len
,
1075 IN
enum stable_how4 stable
,
1076 OUT
uint32_t *bytes_written
,
1077 OUT nfs41_write_verf
*verf
,
1078 OUT nfs41_file_info
*cinfo
);
1081 IN nfs41_session
*session
,
1082 IN nfs41_path_fh
*file
,
1083 IN stateid_arg
*stateid
,
1086 OUT
unsigned char *data_out
,
1087 OUT
uint32_t *data_len_out
,
1088 OUT bool_t
*eof_out
);
1091 IN nfs41_session
*session
,
1092 IN nfs41_path_fh
*file
,
1095 IN bool_t do_getattr
,
1096 OUT nfs41_write_verf
*verf
,
1097 OUT nfs41_file_info
*cinfo
);
1100 IN nfs41_session
*session
,
1101 IN nfs41_path_fh
*file
,
1102 IN state_owner4
*owner
,
1107 IN bool_t try_recovery
,
1108 IN OUT stateid_arg
*stateid
);
1111 IN nfs41_session
*session
,
1112 IN nfs41_path_fh
*file
,
1115 IN OUT stateid_arg
*stateid
);
1117 stateid4
* nfs41_lock_stateid_copy(
1118 IN nfs41_lock_state
*lock_state
,
1119 IN OUT stateid4
*dest
);
1122 IN nfs41_session
*session
,
1123 IN nfs41_path_fh
*file
,
1124 IN bitmap4
*attr_request
,
1125 IN nfs41_readdir_cookie
*cookie
,
1126 OUT
unsigned char *entries
,
1127 IN OUT
uint32_t *entries_len
,
1128 OUT bool_t
*eof_out
);
1131 IN nfs41_session
*session
,
1132 IN OPTIONAL nfs41_path_fh
*file
,
1133 IN bitmap4
*attr_request
,
1134 OUT nfs41_file_info
*info
);
1136 int nfs41_superblock_getattr(
1137 IN nfs41_session
*session
,
1138 IN nfs41_path_fh
*file
,
1139 IN bitmap4
*attr_request
,
1140 OUT nfs41_file_info
*info
,
1141 OUT bool_t
*supports_named_attrs
);
1144 int nfs41_cached_getattr(
1145 IN nfs41_session
*session
,
1146 IN nfs41_path_fh
*file
,
1147 OUT nfs41_file_info
*info
);
1150 IN nfs41_session
*session
,
1151 IN nfs41_path_fh
*parent
,
1152 IN
const nfs41_component
*target
,
1153 IN
uint64_t fileid
);
1156 IN nfs41_session
*session
,
1157 IN nfs41_path_fh
*src_dir
,
1158 IN
const nfs41_component
*src_name
,
1159 IN nfs41_path_fh
*dst_dir
,
1160 IN
const nfs41_component
*dst_name
);
1163 IN nfs41_session
*session
,
1164 IN nfs41_path_fh
*file
,
1165 IN stateid_arg
*stateid
,
1166 IN nfs41_file_info
*info
);
1169 IN nfs41_session
*session
,
1170 IN nfs41_path_fh
*src
,
1171 IN nfs41_path_fh
*dst_dir
,
1172 IN
const nfs41_component
*target
,
1173 OUT nfs41_file_info
*cinfo
);
1176 int nfs41_symlink_target(
1177 IN nfs41_session
*session
,
1178 IN nfs41_path_fh
*file
,
1179 OUT nfs41_abs_path
*target
);
1181 int nfs41_symlink_follow(
1182 IN nfs41_root
*root
,
1183 IN nfs41_session
*session
,
1184 IN nfs41_path_fh
*symlink
,
1185 OUT nfs41_file_info
*info
);
1188 IN nfs41_session
*session
,
1189 IN nfs41_path_fh
*file
,
1190 IN
uint32_t max_len
,
1192 OUT
uint32_t *len_out
);
1195 IN nfs41_session
*session
,
1196 IN nfs41_path_fh
*file
,
1197 IN
uint32_t requested
,
1198 OUT
uint32_t *supported OPTIONAL
,
1199 OUT
uint32_t *access OPTIONAL
);
1201 enum nfsstat4
nfs41_want_delegation(
1202 IN nfs41_session
*session
,
1203 IN nfs41_path_fh
*file
,
1204 IN deleg_claim4
*claim
,
1206 IN bool_t try_recovery
,
1207 OUT open_delegation4
*delegation
);
1209 int nfs41_delegpurge(
1210 IN nfs41_session
*session
);
1212 int nfs41_delegreturn(
1213 IN nfs41_session
*session
,
1214 IN nfs41_path_fh
*file
,
1215 IN stateid_arg
*stateid
,
1216 IN bool_t try_recovery
);
1218 enum nfsstat4
nfs41_fs_locations(
1219 IN nfs41_session
*session
,
1220 IN nfs41_path_fh
*parent
,
1221 IN
const nfs41_component
*name
,
1222 OUT fs_locations4
*locations
);
1225 IN nfs41_session
*session
,
1226 IN nfs41_path_fh
*file
,
1227 IN
const nfs41_component
*name
,
1228 OUT nfs41_secinfo_info
*secinfo
);
1230 int nfs41_secinfo_noname(
1231 IN nfs41_session
*session
,
1232 IN nfs41_path_fh
*file
,
1233 OUT nfs41_secinfo_info
*secinfo
);
1235 enum nfsstat4
nfs41_free_stateid(
1236 IN nfs41_session
*session
,
1237 IN stateid4
*stateid
);
1239 enum nfsstat4
nfs41_test_stateid(
1240 IN nfs41_session
*session
,
1241 IN stateid_arg
*stateid_array
,
1243 OUT
uint32_t *status_array
);
1245 enum nfsstat4
pnfs_rpc_layoutget(
1246 IN nfs41_session
*session
,
1247 IN nfs41_path_fh
*file
,
1248 IN stateid_arg
*stateid
,
1249 IN
enum pnfs_iomode iomode
,
1251 IN
uint64_t minlength
,
1253 OUT pnfs_layoutget_res_ok
*layoutget_res
);
1255 enum nfsstat4
pnfs_rpc_layoutcommit(
1256 IN nfs41_session
*session
,
1257 IN nfs41_path_fh
*file
,
1258 IN stateid4
*stateid
,
1261 IN OPTIONAL
uint64_t *new_last_offset
,
1262 IN OPTIONAL nfstime4
*new_time_modify
,
1263 OUT nfs41_file_info
*info
);
1265 enum nfsstat4
pnfs_rpc_layoutreturn(
1266 IN nfs41_session
*session
,
1267 IN nfs41_path_fh
*file
,
1268 IN
enum pnfs_layout_type type
,
1269 IN
enum pnfs_iomode iomode
,
1272 IN stateid4
*stateid
,
1273 OUT pnfs_layoutreturn_res
*layoutreturn_res
);
1275 enum nfsstat4
pnfs_rpc_getdeviceinfo(
1276 IN nfs41_session
*session
,
1277 IN
unsigned char *deviceid
,
1278 OUT pnfs_file_device
*device
);
1280 enum nfsstat4
nfs41_rpc_openattr(
1281 IN nfs41_session
*session
,
1282 IN nfs41_path_fh
*file
,
1283 IN bool_t createdir
,
1284 OUT nfs41_fh
*fh_out
);
1286 #endif /* !__NFS41_NFS_OPS_H__ */