60 (
char *)&compound.
res);
75 attrs->ca_headerpadsize = 0;
76 attrs->ca_maxrequestsize = rpc->wsize;
77 attrs->ca_maxresponsesize = rpc->rsize;
79 attrs->ca_maxoperations = 0xffffffff;
80 attrs->ca_maxrequests = max_req;
81 attrs->ca_rdma_ird =
NULL;
91 attrs->ca_headerpadsize = 0;
92 attrs->ca_maxrequestsize = rpc->wsize;
93 attrs->ca_maxresponsesize = rpc->rsize;
95 attrs->ca_maxoperations = 0xffffffff;
96 attrs->ca_maxrequests = max_req;
97 attrs->ca_rdma_ird =
NULL;
145 eprintf(
"ERROR: CREATE_SESSION: csa_sequence %d != " 152 eprintf(
"WARNING: requested session flags %x received %x\n",
156 eprintf(
"WARNING: we asked to use this session for callbacks but " 160 eprintf(
"WARNING: we asked for persistent session but " 167 dprintf(1,
"session fore_chan_attrs:\n" 168 " %-32s%d\n %-32s%d\n %-32s%d\n %-32s%d\n %-32s%d\n %-32s%d\n",
169 "headerpadsize",
session->fore_chan_attrs.ca_headerpadsize,
170 "maxrequestsize",
session->fore_chan_attrs.ca_maxrequestsize,
171 "maxresponsesize",
session->fore_chan_attrs.ca_maxresponsesize,
172 "maxresponsesize_cached",
session->fore_chan_attrs.ca_maxresponsesize_cached,
173 "maxoperations",
session->fore_chan_attrs.ca_maxoperations,
174 "maxrequests",
session->fore_chan_attrs.ca_maxrequests);
175 dprintf(1,
"client supports %d max rpc slots, but server has %d\n",
176 session->table.max_slots,
session->fore_chan_attrs.ca_maxrequests);
179 session->fore_chan_attrs.ca_maxrequests);
187 IN const unsigned char *sessionid,
197 compound_init(&compound, &argop, &resop,
"bind_conn_to_session");
200 bind_args.
sessionid = (
unsigned char *)sessionid;
204 (
char*)&compound.
args, (
char*)&compound.
res);
236 eprintf(
"%s failed with status %d.\n",
253 compound_init(&compound, &argops, &resops,
"destroy_clientid");
259 (
char *)&compound.
res);
279 compound_init(&compound, argops, resops,
"reclaim_complete");
336 memcpy(&dir_attrs->info->attrmask, &dir_attrs->obj_attributes.attrmask,
341 memcpy(&file_attrs->info->attrmask, &file_attrs->obj_attributes.attrmask,
346 &
file->fh, file_attrs->info, changeinfo,
355 goto retry_cache_insert;
362 goto retry_cache_insert;
405 switch (claim->claim) {
410 current_fh_is_dir =
TRUE;
421 current_fh_is_dir =
FALSE;
437 if (current_fh_is_dir) {
453 #ifdef DISABLE_FILE_DELEGATIONS 459 open_args.
owner = owner;
469 parent->fh.superblock, &createattrs->attrmask);
470 }
else if (createattrs) {
473 parent->fh.superblock, &createattrs->attrmask);
475 open_args.
claim = claim;
479 if (current_fh_is_dir) {
489 if (current_fh_is_dir) {
500 pgetattr_res.
info = &dir_info;
525 already_delegated, &open_res.
resok4.
cinfo, &pgetattr_res, &getattr_res);
579 parent->fh.superblock, &createattrs->attrmask);
594 pgetattr_res.
info = &dir_info;
611 parent->fh.fileid, &dir_info);
715 stateid->stateid.seqid == 0 ?
"ds write" :
"write");
732 if (cinfo) pinfo = cinfo;
741 getattr_res.
info = pinfo;
756 file->fh.fileid, pinfo);
765 eprintf(
"WRITE succeeded with count=0; returning %s\n",
780 OUT unsigned char *data_out,
796 stateid->stateid.seqid == 0 ?
"ds read" :
"read");
826 eprintf(
"READ succeeded with len=0 and eof=0; returning %s\n",
858 do_getattr ?
"commit" :
"ds commit");
870 commit_res.
verf = verf;
874 if (cinfo) pinfo = cinfo;
882 getattr_res.
info = pinfo;
897 file->fh.fileid, pinfo);
1042 readdir_args.
dircount = *entries_len;
1166 *supports_named_attrs = 0;
1172 *supports_named_attrs = 1;
1281 src_putfh_args.
file = src_dir;
1287 dst_putfh_args.
file = dst_dir;
1291 rename_args.
oldname = src_name;
1292 rename_args.
newname = dst_name;
1297 dst_getattr_res.
info = &dst_info;
1303 src_getattr_res.
info = &src_info;
1316 src_dir->fh.fileid, &src_info);
1322 dst_dir->fh.fileid, &dst_info);
1324 if (src_dir->path == dst_dir->path) {
1327 }
else if (src_dir->path < dst_dir->path) {
1338 src_dir->path->path, src_name, &rename_res.
source_cinfo,
1339 dst_dir->path->path, dst_name, &rename_res.
target_cinfo);
1341 if (src_dir->path == dst_dir->path) {
1381 setattr_args.
stateid = stateid;
1451 putfh_args[1].
file = dst_dir;
1471 getattr_res[1].
info = cinfo;
1485 file.fh.fileid = cinfo->fileid;
1487 &cinfo->fsid, &dst_dir->fh, &
file);
1538 readlink_res.
link_len = max_len - 1;
1539 readlink_res.
link = link_out;
1548 link_out[readlink_res.
link_len] =
'\0';
1582 access_args.
access = requested;
1643 compound_init(&compound, argops, resops,
"want_delegation");
1653 wd_args.
claim = claim;
1654 wd_args.
want = want;
1817 secinfo_res.
secinfo = secinfo;
1844 compound_init(&compound, argops, resops,
"secinfo_no_name");
1889 freestateid_args.
stateid = stateid;
1923 teststateid_res.
resok.status = status_array;
1970 layoutget_args.
iomode = iomode;
1974 layoutget_args.
stateid = stateid;
1977 layoutget_res.
u.
res_ok = layoutget_res_ok;
1991 for (
i = 0;
i <
layout->filehandles.count;
i++)
1992 layout->filehandles.arr[
i].fh.superblock =
file->fh.superblock;
2038 lc_args.
new_time = new_time_modify;
2092 layoutreturn_args.
reclaim = 0;
2094 layoutreturn_args.
iomode = iomode;
2098 layoutreturn_args.
stateid = stateid;
2111 IN unsigned char *deviceid,
2129 &getdeviceinfo_args, &getdeviceinfo_res);
2130 getdeviceinfo_args.
deviceid = deviceid;
2176 getfh_res.
fh = fh_out;
2184 fh_out->superblock =
file->fh.superblock;
struct __createtype4::@38::__create_type_lnk lnk
static void open_delegation_return(IN nfs41_session *session, IN nfs41_path_fh *file, IN open_delegation4 *delegation, IN bool_t try_recovery)
int nfs41_destroy_clientid(IN nfs41_rpc_clnt *rpc, IN uint64_t clientid)
open_delegation4 * delegation
const nfs41_component * name
struct __nfs41_test_stateid_res::@42 resok
int nfs41_remove(IN nfs41_session *session, IN nfs41_path_fh *parent, IN const nfs41_component *target, IN uint64_t fileid)
enum nfsstat4 nfs41_free_stateid(IN nfs41_session *session, IN stateid4 *stateid)
pnfs_getdeviceinfo_res_ok res_ok
int nfs41_send_sequence(IN nfs41_session *session)
unsigned char * sessionid
static __inline void nfs41_superblock_supported_attrs_exclcreat(IN const nfs41_superblock *superblock, IN OUT bitmap4 *attrs)
int nfs41_setattr(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid_arg *stateid, IN nfs41_file_info *info)
nfs41_channel_attrs csa_fore_chan_attrs
static int set_back_channel_attrs(IN nfs41_rpc_clnt *rpc, IN uint32_t max_req, OUT nfs41_channel_attrs *attrs)
int nfs41_write(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid_arg *stateid, IN unsigned char *data, IN uint32_t data_len, IN uint64_t offset, IN enum stable_how4 stable, OUT uint32_t *bytes_written, OUT nfs41_write_verf *verf, OUT nfs41_file_info *cinfo)
nfs41_channel_attrs csa_back_chan_attrs
const nfs41_component * newname
#define NFS4_SESSIONID_SIZE
ACPI_SIZE strlen(const char *String)
nfs41_channel_attrs * csr_fore_chan_attrs
GLuint GLuint GLsizei count
int compound_encode_send_decode(nfs41_session *session, nfs41_compound *compound, bool_t try_recovery)
enum nfsstat4 nfs41_test_stateid(IN nfs41_session *session, IN stateid_arg *stateid_array, IN uint32_t count, OUT uint32_t *status_array)
enum nfsstat4 pnfs_rpc_getdeviceinfo(IN nfs41_session *session, IN unsigned char *deviceid, OUT pnfs_file_device *device)
int nfs41_readdir(IN nfs41_session *session, IN nfs41_path_fh *file, IN bitmap4 *attr_request, IN nfs41_readdir_cookie *cookie, OUT unsigned char *entries, IN OUT uint32_t *entries_len, OUT bool_t *eof_out)
const nfs41_component * name
nfs41_file_info * createattrs
enum nfsstat4 nfs41_want_delegation(IN nfs41_session *session, IN nfs41_path_fh *file, IN deleg_claim4 *claim, IN uint32_t want, IN bool_t try_recovery, OUT open_delegation4 *delegation)
void eprintf(LPCSTR format,...)
nfs41_write_res_ok resok4
int nfs41_delegpurge(IN nfs41_session *session)
nfs41_secinfo_info * secinfo
#define NFS41_RPC_CBPROGRAM
enum nfsstat4 pnfs_rpc_layoutget(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid_arg *stateid, IN enum pnfs_iomode iomode, IN uint64_t offset, IN uint64_t minlength, IN uint64_t length, OUT pnfs_layoutget_res_ok *layoutget_res_ok)
state_owner4 * lock_owner
int nfs41_secinfo_noname(IN nfs41_session *session, IN nfs41_path_fh *file, OUT nfs41_secinfo_info *secinfo)
nfs41_op_open_res_ok resok4
unsigned char createverf[NFS4_VERIFIER_SIZE]
union __createtype4::@38 u
int nfs41_link(IN nfs41_session *session, IN nfs41_path_fh *src, IN nfs41_path_fh *dst_dir, IN const nfs41_component *target, OUT nfs41_file_info *cinfo)
int nfs41_rename(IN nfs41_session *session, IN nfs41_path_fh *src_dir, IN const nfs41_component *src_name, IN nfs41_path_fh *dst_dir, IN const nfs41_component *dst_name)
nfs_impl_id4 * eia_client_impl_id
unsigned char * dsa_sessionid
int nfs41_superblock_for_fh(IN nfs41_session *session, IN const nfs41_fsid *fsid, IN const nfs41_fh *parent OPTIONAL, OUT nfs41_path_fh *file)
static uint32_t stateid_array(IN struct list_entry *delegations, IN struct list_entry *opens, OUT stateid_arg **stateids_out, OUT uint32_t **statuses_out)
#define NFS4_VERIFIER_SIZE
int nfs41_create(IN nfs41_session *session, IN uint32_t type, IN nfs41_file_info *createattrs, IN OPTIONAL const char *symlink, IN nfs41_path_fh *parent, OUT nfs41_path_fh *file, OUT nfs41_file_info *info)
enum nfsstat4 pnfs_rpc_layoutreturn(IN nfs41_session *session, IN nfs41_path_fh *file, IN enum pnfs_layout_type type, IN enum pnfs_iomode iomode, IN uint64_t offset, IN uint64_t length, IN stateid4 *stateid, OUT pnfs_layoutreturn_res *layoutreturn_res)
enum nfsstat4 nfs41_bind_conn_to_session(IN nfs41_rpc_clnt *rpc, IN const unsigned char *sessionid, IN enum channel_dir_from_client4 dir)
int nfs41_superblock_getattr(IN nfs41_session *session, IN nfs41_path_fh *file, IN bitmap4 *attr_request, OUT nfs41_file_info *info, OUT bool_t *supports_named_attrs)
stateid_arg * lock_stateid
nfs41_callback_secparms csa_cb_secparams[2]
VOID WINAPI AcquireSRWLockShared(PSRWLOCK Lock)
enum channel_dir_from_client4 dir
static __inline struct nfs41_name_cache * session_name_cache(IN nfs41_session *session)
#define list_for_each(entry, head)
change_info4 target_cinfo
client_owner4 * eia_clientowner
int nfs41_name_cache_insert(IN struct nfs41_name_cache *cache, IN const char *path, IN const nfs41_component *name, IN OPTIONAL const nfs41_fh *fh, IN OPTIONAL const nfs41_file_info *info, IN OPTIONAL const change_info4 *cinfo, IN enum open_delegation_type4 delegation)
open_delegation4 * delegation
GLenum GLuint GLenum GLsizei length
void nfs41_superblock_space_changed(IN nfs41_superblock *superblock)
#define NFS4_OPAQUE_LIMIT
nfs41_file_info * createattrs
unsigned char cookieverf[NFS4_VERIFIER_SIZE]
#define NFS41_MAX_RPC_REQS
int nfs41_commit(IN nfs41_session *session, IN nfs41_path_fh *file, IN uint64_t offset, IN uint32_t count, IN bool_t do_getattr, OUT nfs41_write_verf *verf, OUT nfs41_file_info *cinfo)
#define list_container(entry, type, field)
static __inline void nfs41_superblock_supported_attrs(IN const nfs41_superblock *superblock, IN OUT bitmap4 *attrs)
char server_name[NI_MAXHOST]
int nfs41_getattr(IN nfs41_session *session, IN OPTIONAL nfs41_path_fh *file, IN bitmap4 *attr_request, OUT nfs41_file_info *info)
DWORD WINAPI GetCurrentThreadId(VOID)
change_info4 source_cinfo
union __nfs41_callback_sec_parms::@37 u
int compound_error(int status)
enum nfsstat4 nfs41_rpc_openattr(IN nfs41_session *session, IN nfs41_path_fh *file, IN bool_t createdir, OUT nfs41_fh *fh_out)
open_to_lock_owner4 open_owner
enum pnfs_layout_type layout_type
int nfs41_attr_cache_update(IN struct nfs41_name_cache *cache, IN uint64_t fileid, IN const nfs41_file_info *info)
int nfs41_name_cache_delegreturn(IN struct nfs41_name_cache *cache, IN uint64_t fileid, IN const char *path, IN const nfs41_component *name)
struct __nfs41_readdir_res nfs41_readdir_res
#define CREATE_SESSION4_FLAG_PERSIST
union __nfs41_lock_res::@40 u
pnfs_file_device * device
nfs41_delegation_state * delegation
int nfs41_send_compound(IN nfs41_rpc_clnt *rpc, IN char *inbuf, OUT char *outbuf)
unsigned char * csr_sessionid
const nfs41_component * oldname
const nfs41_component * name
const char * nfs_error_string(int status)
union __pnfs_layoutget_res::@43 u
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int nfs41_delegreturn(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid_arg *stateid, IN bool_t try_recovery)
int nfs41_read(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid_arg *stateid, IN uint64_t offset, IN uint32_t count, OUT unsigned char *data_out, OUT uint32_t *data_len_out, OUT bool_t *eof_out)
enum nfsstat4 pnfs_rpc_layoutcommit(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid4 *stateid, IN uint64_t offset, IN uint64_t length, IN OPTIONAL uint64_t *new_last_offset, IN OPTIONAL nfstime4 *new_time_modify, OUT nfs41_file_info *info)
int nfs41_exchange_id(IN nfs41_rpc_clnt *rpc, IN client_owner4 *owner, IN uint32_t flags_in, OUT nfs41_exchange_id_res *res_out)
int nfs41_unlock(IN nfs41_session *session, IN nfs41_path_fh *file, IN uint64_t offset, IN uint64_t length, IN OUT stateid_arg *stateid)
nfs41_channel_attrs * csr_back_chan_attrs
enum pnfs_layout_type layout_type
void compound_add_op(nfs41_compound *compound, uint32_t opnum, void *arg, void *res)
enum nfsstat4 nfs41_fs_locations(IN nfs41_session *session, IN nfs41_path_fh *parent, IN const nfs41_component *name, OUT fs_locations4 *locations)
int nfs41_open(IN nfs41_session *session, IN nfs41_path_fh *parent, IN nfs41_path_fh *file, IN state_owner4 *owner, IN open_claim4 *claim, IN uint32_t allow, IN uint32_t deny, IN uint32_t create, IN uint32_t how_mode, IN OPTIONAL nfs41_file_info *createattrs, IN bool_t try_recovery, OUT stateid4 *stateid, OUT open_delegation4 *delegation, OUT OPTIONAL nfs41_file_info *info)
#define memcpy(s1, s2, n)
GLsizei const GLint * locations
int nfs41_access(IN nfs41_session *session, IN nfs41_path_fh *file, IN uint32_t requested, OUT uint32_t *supported OPTIONAL, OUT uint32_t *access OPTIONAL)
int nfs41_readlink(IN nfs41_session *session, IN nfs41_path_fh *file, IN uint32_t max_len, OUT char *link_out, OUT uint32_t *len_out)
#define NFS41_MAX_SERVER_CACHE
enum pnfs_layout_type type
enum secinfo_noname_type type
#define CREATE_SESSION4_FLAG_CONN_BACK_CHAN
bool_t signal_layout_avail
#define ERROR_TOO_MANY_OPEN_FILES
stateid_arg * lock_stateid
pnfs_layoutget_res_ok * res_ok
int nfs41_name_cache_rename(IN struct nfs41_name_cache *cache, IN const char *src_path, IN const nfs41_component *src_name, IN const change_info4 *src_cinfo, IN const char *dst_path, IN const nfs41_component *dst_name, IN const change_info4 *dst_cinfo)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
unsigned char verf[NFS4_VERIFIER_SIZE]
nfs41_readdir_cookie cookie
GLuint GLint GLboolean GLint GLenum access
int nfs41_lock(IN nfs41_session *session, IN nfs41_path_fh *file, IN state_owner4 *owner, IN uint32_t type, IN uint64_t offset, IN uint64_t length, IN bool_t reclaim, IN bool_t try_recovery, IN OUT stateid_arg *stateid)
state_protect_how4 spa_how
const char * nfs_opnum_to_string(int opnum)
static void open_update_cache(IN nfs41_session *session, IN nfs41_path_fh *parent, IN nfs41_path_fh *file, IN bool_t try_recovery, IN open_delegation4 *delegation, IN bool_t already_delegated, IN change_info4 *changeinfo, IN nfs41_getattr_res *dir_attrs, IN nfs41_getattr_res *file_attrs)
int nfs41_secinfo(IN nfs41_session *session, IN nfs41_path_fh *file, IN const nfs41_component *name, OUT nfs41_secinfo_info *secinfo)
int nfs41_close(IN nfs41_session *session, IN nfs41_path_fh *file, IN stateid_arg *stateid)
static int set_fore_channel_attrs(IN nfs41_rpc_clnt *rpc, IN uint32_t max_req, OUT nfs41_channel_attrs *attrs)
int nfs41_create_session(nfs41_client *clnt, nfs41_session *session, bool_t try_recovery)
static __inline void nfs41_superblock_getattr_mask(IN const nfs41_superblock *superblock, OUT bitmap4 *attrs)
exist_lock_owner4 lock_owner
union __pnfs_getdeviceinfo_res::@44 u
void nfs41_session_sequence(struct __nfs41_sequence_args *args, nfs41_session *session, bool_t cachethis)
enum pnfs_return_type return_type
struct __nfs41_callback_sec_parms::@37::__authsys_parms auth_sys
void compound_init(nfs41_compound *compound, nfs_argop4 *argops, nfs_resop4 *resops, const char *tag)
int nfs41_name_cache_remove(IN struct nfs41_name_cache *cache, IN const char *path, IN const nfs41_component *name, IN uint64_t fileid, IN const change_info4 *cinfo)
state_protect4_a eia_state_protect
int nfs41_destroy_session(IN nfs41_session *session)
const nfs41_component * target
GLuint GLuint GLsizei GLenum type
void print_hexbuf(int level, unsigned char *title, unsigned char *buf, int len)
static const struct access_res create[16]
static SERVICE_STATUS status
const nfs41_component * newname
int nfs41_client_delegation_return_lru(IN nfs41_client *client)
enum nfsstat4 nfs41_reclaim_complete(IN nfs41_session *session)
VOID WINAPI ReleaseSRWLockShared(PSRWLOCK Lock)
stateid_arg * open_stateid
PULONG MinorVersion OPTIONAL
GLuint const GLchar * name