ReactOS  0.4.12-dev-36-g472787f
nfs41_compound.h File Reference
#include "nfs41.h"
Include dependency graph for nfs41_compound.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __nfs_argop4
 
struct  __nfs41_compound_args
 
struct  __nfs_resop4
 
struct  __nfs41_compound_res
 
struct  __nfs41_compound
 

Typedefs

typedef struct __nfs_argop4 nfs_argop4
 
typedef struct __nfs41_compound_args nfs41_compound_args
 
typedef struct __nfs_resop4 nfs_resop4
 
typedef struct __nfs41_compound_res nfs41_compound_res
 
typedef struct __nfs41_compound nfs41_compound
 

Functions

int compound_error (int status)
 
void compound_init (nfs41_compound *compound, nfs_argop4 *argops, nfs_resop4 *resops, const char *tag)
 
void compound_add_op (nfs41_compound *compound, uint32_t opnum, void *arg, void *res)
 
int compound_encode_send_decode (nfs41_session *session, nfs41_compound *compound, bool_t try_recovery)
 

Typedef Documentation

◆ nfs41_compound

◆ nfs41_compound_args

◆ nfs41_compound_res

◆ nfs_argop4

◆ nfs_resop4

Function Documentation

◆ compound_add_op()

void compound_add_op ( nfs41_compound compound,
uint32_t  opnum,
void arg,
void res 
)

Definition at line 61 of file nfs41_compound.c.

Referenced by lookup_rpc(), nfs41_access(), nfs41_bind_conn_to_session(), nfs41_close(), nfs41_commit(), nfs41_create(), nfs41_create_session(), nfs41_delegpurge(), nfs41_delegreturn(), nfs41_destroy_clientid(), nfs41_destroy_session(), nfs41_exchange_id(), nfs41_free_stateid(), nfs41_fs_locations(), nfs41_getattr(), nfs41_link(), nfs41_lock(), nfs41_open(), nfs41_read(), nfs41_readdir(), nfs41_readlink(), nfs41_reclaim_complete(), nfs41_remove(), nfs41_rename(), nfs41_rpc_openattr(), nfs41_secinfo(), nfs41_secinfo_noname(), nfs41_send_sequence(), nfs41_setattr(), nfs41_superblock_getattr(), nfs41_test_stateid(), nfs41_unlock(), nfs41_want_delegation(), nfs41_write(), pnfs_rpc_getdeviceinfo(), pnfs_rpc_layoutcommit(), pnfs_rpc_layoutget(), pnfs_rpc_layoutreturn(), and rpc_array_putfh().

66 {
67  const uint32_t i = compound->args.argarray_count++;
68  const uint32_t j = compound->res.resarray_count++;
69  compound->args.argarray[i].op = opnum;
70  compound->args.argarray[i].arg = arg;
71  compound->res.resarray[j].op = opnum;
72  compound->res.resarray[j].res = res;
73 }
GLenum GLclampf GLint GLenum GLuint GLenum GLenum GLsizei GLenum const GLvoid GLfloat GLfloat GLfloat GLfloat GLclampd GLint 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 GLboolean GLboolean GLboolean GLint GLenum GLsizei const GLvoid GLenum GLint GLenum GLint GLint GLsizei GLint GLenum GLint GLint GLint GLint GLsizei GLenum GLsizei const GLuint GLboolean GLenum GLenum GLint GLsizei GLenum GLsizei GLenum const GLvoid GLboolean const GLboolean GLenum const GLdouble const GLfloat const GLdouble const GLfloat GLenum GLint GLint GLint GLint GLint GLint j
Definition: glfuncs.h:98
void * arg
Definition: msvc.h:12
GLenum GLclampf GLint i
Definition: glfuncs.h:14
nfs41_compound_res res
nfs41_compound_args args
nfs_resop4 * resarray
UINT32 uint32_t
Definition: types.h:75
GLuint res
Definition: glext.h:9613

◆ compound_encode_send_decode()

int compound_encode_send_decode ( nfs41_session session,
nfs41_compound compound,
bool_t  try_recovery 
)

Definition at line 137 of file nfs41_compound.c.

Referenced by lookup_rpc(), nfs41_access(), nfs41_close(), nfs41_commit(), nfs41_create(), nfs41_create_session(), nfs41_delegpurge(), nfs41_delegreturn(), nfs41_destroy_session(), nfs41_free_stateid(), nfs41_fs_locations(), nfs41_getattr(), nfs41_link(), nfs41_lock(), nfs41_open(), nfs41_read(), nfs41_readdir(), nfs41_readlink(), nfs41_reclaim_complete(), nfs41_remove(), nfs41_rename(), nfs41_rpc_openattr(), nfs41_secinfo(), nfs41_secinfo_noname(), nfs41_send_sequence(), nfs41_setattr(), nfs41_superblock_getattr(), nfs41_test_stateid(), nfs41_unlock(), nfs41_want_delegation(), nfs41_write(), pnfs_rpc_getdeviceinfo(), pnfs_rpc_layoutcommit(), pnfs_rpc_layoutget(), pnfs_rpc_layoutreturn(), and rpc_array_putfh().

141 {
142  int status, retry_count = 0, delayby = 0, secinfo_status;
144  compound->args.argarray[0].arg;
145  uint32_t saved_sec_flavor;
146  AUTH *saved_auth;
147  int op1 = compound->args.argarray[0].op;
148 
149 retry:
150  /* send compound */
151  retry_count++;
152  set_expected_res(compound);
153  status = nfs41_send_compound(session->client->rpc,
154  (char *)&compound->args, (char *)&compound->res);
155  // bump sequence number if sequence op succeeded.
156  if (compound->res.resarray_count > 0 &&
157  compound->res.resarray[0].op == OP_SEQUENCE) {
158  nfs41_sequence_res *seq =
159  (nfs41_sequence_res *)compound->res.resarray[0].res;
160  if (seq->sr_status == NFS4_OK) {
161  // returned slotid must be the same we sent
162  if (seq->sr_resok4.sr_slotid != args->sa_slotid) {
163  eprintf("[session] sr_slotid=%d != sa_slotid=%d\n",
164  seq->sr_resok4.sr_slotid, args->sa_slotid);
165  status = NFS4ERR_IO;
166  goto out_free_slot;
167  }
168  // returned sessionid must be the same we sent
169  if (memcmp(seq->sr_resok4.sr_sessionid, args->sa_sessionid,
171  eprintf("[session] sr_sessionid != sa_sessionid\n");
172  print_hexbuf(1, (unsigned char *)"sr_sessionid",
174  print_hexbuf(1, (unsigned char *)"sa_sessionid",
176  status = NFS4ERR_IO;
177  goto out_free_slot;
178  }
179  if (seq->sr_resok4.sr_status_flags)
181 
182  nfs41_session_bump_seq(session, args->sa_slotid,
184 
185  /* check sequence status flags for state revocation */
186  if (try_recovery && seq->sr_resok4.sr_status_flags)
189  }
190  }
191 
192  if (status) {
193  eprintf("nfs41_send_compound failed %d for seqid=%d, slotid=%d\n",
194  status, args->sa_sequenceid, args->sa_slotid);
195  status = NFS4ERR_IO;
196  goto out_free_slot;
197  }
198 
199  if (compound->res.status != NFS4_OK)
200  dprintf(1, "\n################ %s ################\n\n",
201  nfs_error_string(compound->res.status));
202 
203  switch (compound->res.status) {
204  case NFS4_OK:
205  break;
206 
208  if (!try_recovery)
209  goto out;
210  if (!nfs41_recovery_start_or_wait(session->client))
211  goto do_retry;
212  // try to create a new client
213  status = nfs41_client_renew(session->client);
214 
215  nfs41_recovery_finish(session->client);
216  if (status) {
217  eprintf("nfs41_client_renew() failed with %d\n", status);
218  status = ERROR_BAD_NET_RESP;
219  goto out;
220  }
221  if (op1 == OP_CREATE_SESSION) {
223  compound->args.argarray[0].arg;
225  csa->csa_clientid = session->client->clnt_id;
226  csa->csa_sequence = session->client->seq_id;
228  }
229  goto do_retry;
230 
231  case NFS4ERR_BADSESSION:
232  if (!try_recovery)
233  goto out;
234  if (!nfs41_recovery_start_or_wait(session->client))
235  goto do_retry;
236  // try to create a new session
237  status = nfs41_recover_session(session, FALSE);
238 
239  nfs41_recovery_finish(session->client);
240  if (status) {
241  eprintf("nfs41_recover_session() failed with %d\n", status);
242  status = ERROR_BAD_NET_RESP;
243  goto out;
244  }
245  goto do_retry;
246 
247  case NFS4ERR_EXPIRED: /* revoked by lease expiration */
248  case NFS4ERR_BAD_STATEID:
249  case NFS4ERR_STALE_STATEID: /* server reboot */
250  if (op1 == OP_SEQUENCE)
251  nfs41_session_free_slot(session, args->sa_slotid);
252  if (try_recovery && nfs41_recover_stateid(session,
253  &compound->args.argarray[compound->res.resarray_count-1]))
254  goto do_retry;
255  goto out;
256 
257  case NFS4ERR_BADSLOT:
258  /* free the slot and retry with a new one */
259  if (op1 != OP_SEQUENCE || nfs41_session_bad_slot(session, args))
260  goto out;
261  goto retry;
262 
263  case NFS4ERR_GRACE:
264  case NFS4ERR_DELAY:
265 #define RETRY_INDEFINITELY
266 #ifndef RETRY_INDEFINITELY
267 #define NUMBER_2_RETRY 19
268 #endif
269 
270 #ifndef RETRY_INDEFINITELY
271  if (retry_count < NUMBER_2_RETRY) {
272 #endif
273  if (op1 == OP_SEQUENCE)
274  nfs41_session_free_slot(session, args->sa_slotid);
275  if (compound->res.status == NFS4ERR_GRACE)
276  delayby = 5000;
277  else
278  delayby = 500*retry_count;
279  dprintf(1, "Compound returned %s: sleeping for %ums..\n",
280  (compound->res.status==NFS4ERR_GRACE)?"NFS4ERR_GRACE":"NFS4ERR_DELAY",
281  delayby);
282  Sleep(delayby);
283  dprintf(1, "Attempting to resend compound.\n");
284  goto do_retry;
285 #ifndef RETRY_INDEFINITELY
286  }
287 #endif
288  break;
289 
290  case NFS4ERR_FHEXPIRED: /* TODO: recover expired volatile filehandles */
291  status = NFS4ERR_STALE; /* for now, treat them as ERR_STALE */
292  /* no break */
293  case NFS4ERR_STALE:
294  {
295  nfs_argop4 *argarray = compound->args.argarray;
296  struct nfs41_name_cache *name_cache =
297  session_name_cache(session);
298  nfs41_putfh_args *putfh;
299  uint32_t i, start = 0;
300 
301  /* NFS4ERR_STALE generally comes from a PUTFH operation. in
302  * this case, remove its filehandle from the name cache. but
303  * because COMPOUNDs are not atomic, a file can be removed
304  * between PUTFH and the operation that uses it. in this
305  * case, we can't tell which PUTFH operation is to blame, so
306  * we must invalidate filehandles of all PUTFH operations in
307  * the COMPOUND */
308 
309  if (argarray[compound->res.resarray_count-1].op == OP_PUTFH)
310  start = compound->res.resarray_count-1;
311 
312  for (i = start; i < compound->res.resarray_count; i++) {
313  if (argarray[i].op == OP_PUTFH) {
314  putfh = (nfs41_putfh_args*)argarray[i].arg;
315 
316  if (!putfh->in_recovery && putfh->file->path)
318  session, putfh->file->path);
319  }
320  }
321  }
322  break;
323  case NFS4ERR_WRONGSEC:
324  {
325  nfs41_secinfo_info secinfo[MAX_SECINFOS] = { 0 };
326  uint32_t rcount = compound->res.resarray_count;
327  nfs_argop4 *argarray = compound->args.argarray;
328  uint32_t op = argarray[rcount-1].op;
329  nfs41_putfh_args *putfh;
331  switch(op) {
332  case OP_PUTFH:
333  case OP_RESTOREFH:
334  case OP_LINK:
335  case OP_RENAME:
336  case OP_PUTROOTFH:
337  case OP_LOOKUP:
338  case OP_OPEN:
339  case OP_SECINFO_NO_NAME:
340  case OP_SECINFO:
341  if (op1 == OP_SEQUENCE)
342  nfs41_session_free_slot(session, args->sa_slotid);
343  /* from: 2.6.3.1.1.5. Put Filehandle Operation + SECINFO/SECINFO_NO_NAME
344  * The NFSv4.1 server MUST NOT return NFS4ERR_WRONGSEC to a put
345  * filehandle operation that is immediately followed by SECINFO or
346  * SECINFO_NO_NAME. The NFSv4.1 server MUST NOT return NFS4ERR_WRONGSEC
347  * from SECINFO or SECINFO_NO_NAME.
348  */
349  if (op1 == OP_SEQUENCE &&
350  (argarray[1].op == OP_PUTFH ||
351  argarray[1].op == OP_PUTROOTFH) &&
352  (argarray[2].op == OP_SECINFO_NO_NAME ||
353  argarray[2].op == OP_SECINFO)) {
354  dprintf(1, "SECINFO: BROKEN SERVER\n");
355  goto out;
356  }
357  if (!try_recovery)
358  goto out;
359  if (!nfs41_recovery_start_or_wait(session->client))
360  goto do_retry;
361 
362  saved_sec_flavor = session->client->rpc->sec_flavor;
363  saved_auth = session->client->rpc->rpc->cl_auth;
364  if (op == OP_LOOKUP || op == OP_OPEN) {
365  const nfs41_component *name;
366  nfs41_path_fh tmp = { 0 };
367  nfs41_getfh_res *getfh;
368  nfs41_lookup_args *largs;
370  if (argarray[rcount-2].op == OP_PUTFH) {
371  putfh = (nfs41_putfh_args *)argarray[rcount-2].arg;
372  file = putfh->file;
373  } else if (argarray[rcount-2].op == OP_GETATTR &&
374  argarray[rcount-3].op == OP_GETFH) {
375  getfh = (nfs41_getfh_res *)compound->res.resarray[rcount-3].res;
376  memcpy(&tmp.fh, getfh->fh, sizeof(nfs41_fh));
377  file = &tmp;
378  }
379  else {
380  nfs41_recovery_finish(session->client);
381  goto out;
382  }
383 
384  if (op == OP_LOOKUP) {
385  largs = (nfs41_lookup_args *)argarray[rcount-1].arg;
386  name = largs->name;
387  } else if (op == OP_OPEN) {
388  oargs = (nfs41_op_open_args *)argarray[rcount-1].arg;
389  name = oargs->claim->u.null.filename;
390  }
391  secinfo_status = nfs41_secinfo(session, file, name, secinfo);
392  if (secinfo_status) {
393  eprintf("nfs41_secinfo failed with %d\n", secinfo_status);
394  nfs41_recovery_finish(session->client);
395  if (secinfo_status == NFS4ERR_BADSESSION) {
396  if (op1 == OP_SEQUENCE)
397  nfs41_session_free_slot(session, args->sa_slotid);
398  goto do_retry;
399  }
400  goto out_free_slot;
401  }
402  }
403  else {
404  if (op == OP_PUTFH) {
405  putfh = (nfs41_putfh_args *)argarray[rcount-1].arg;
406  file = putfh->file;
407  }
408  secinfo_status = nfs41_secinfo_noname(session, file, secinfo);
409  if (secinfo_status) {
410  eprintf("nfs41_secinfo_noname failed with %d\n",
411  secinfo_status);
412  nfs41_recovery_finish(session->client);
413  if (op1 == OP_SEQUENCE)
414  nfs41_session_free_slot(session, args->sa_slotid);
415  goto out_free_slot;
416  }
417  }
418  secinfo_status = create_new_rpc_auth(session, op, secinfo);
419  if (!secinfo_status) {
420  auth_destroy(saved_auth);
421  nfs41_recovery_finish(session->client);
422  // Need to retry only
423  goto do_retry;
424  } else {
425  AcquireSRWLockExclusive(&session->client->rpc->lock);
426  session->client->rpc->sec_flavor = saved_sec_flavor;
427  session->client->rpc->rpc->cl_auth = saved_auth;
428  ReleaseSRWLockExclusive(&session->client->rpc->lock);
429  nfs41_recovery_finish(session->client);
430  }
431  break;
432  }
433  }
434  }
435  if (compound->res.resarray[0].op == OP_SEQUENCE) {
436  nfs41_sequence_res *seq =
437  (nfs41_sequence_res *)compound->res.resarray[0].res;
438  if (seq->sr_status == NFS4_OK && session->client->rpc->needcb &&
440  nfs41_session_free_slot(session, args->sa_slotid);
442  session->session_id, CDFC4_BACK_OR_BOTH);
443  goto out;
444  }
445  }
446 out_free_slot:
447  if (op1 == OP_SEQUENCE)
448  nfs41_session_free_slot(session, args->sa_slotid);
449 out:
450  return status;
451 
452 do_retry:
453  if (compound->res.resarray[0].op == OP_SEQUENCE)
454  nfs41_session_get_slot(session, &args->sa_slotid,
455  &args->sa_sequenceid, &args->sa_highest_slotid);
456  goto retry;
457 }
VOID WINAPI AcquireSRWLockExclusive(PSRWLOCK Lock)
Definition: sync.c:54
nfs41_path_fh * file
Definition: nfs41_ops.h:510
nfs41_fh * fh
Definition: nfs41_ops.h:504
void nfs41_session_bump_seq(IN nfs41_session *session, IN uint32_t slotid, IN uint32_t target_highest_slotid)
Definition: nfs41_session.c:80
SRWLOCK exid_lock
Definition: nfs41.h:198
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:736
nfs41_sequence_res_ok sr_resok4
Definition: nfs41_ops.h:264
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static void set_expected_res(nfs41_compound *compound)
unsigned char sr_sessionid[NFS4_SESSIONID_SIZE]
Definition: nfs41_ops.h:253
#define NFS4_SESSIONID_SIZE
Definition: nfs41_const.h:32
bool_t nfs41_recover_stateid(IN nfs41_session *session, IN nfs_argop4 *argop)
Definition: recovery.c:788
static int create_new_rpc_auth(nfs41_session *session, uint32_t op, nfs41_secinfo_info *secinfo)
uint32_t sr_target_highest_slotid
Definition: nfs41_ops.h:257
Definition: auth.h:205
void eprintf(LPCSTR format,...)
Definition: daemon_debug.c:86
open_claim4 * claim
Definition: nfs41_ops.h:647
void nfs41_recover_sequence_flags(IN nfs41_session *session, IN uint32_t flags)
Definition: recovery.c:98
bool_t needcb
Definition: nfs41.h:183
int nfs41_secinfo_noname(IN nfs41_session *session, IN nfs41_path_fh *file, OUT nfs41_secinfo_info *secinfo)
Definition: nfs41_ops.c:1828
Definition: match.c:390
uint32_t sa_highest_slotid
Definition: nfs41_ops.h:232
enum nfsstat4 nfs41_bind_conn_to_session(IN nfs41_rpc_clnt *rpc, IN const unsigned char *sessionid, IN enum channel_dir_from_client4 dir)
Definition: nfs41_ops.c:185
#define ERROR_BAD_NET_RESP
Definition: winerror.h:150
GLenum GLclampf GLint i
Definition: glfuncs.h:14
void print_sr_status_flags(int level, int flags)
Definition: daemon_debug.c:525
UINT op
Definition: effect.c:223
static __inline struct nfs41_name_cache * session_name_cache(IN nfs41_session *session)
Definition: name_cache.h:34
nfs41_compound_res res
nfs41_client * client
Definition: nfs41.h:256
#define dprintf
Definition: regdump.c:33
nfs41_rpc_clnt * rpc
Definition: nfs41.h:201
smooth NULL
Definition: ftsmooth.c:416
unsigned char session_id[NFS4_SESSIONID_SIZE]
Definition: nfs41.h:257
bool_t nfs41_recovery_start_or_wait(IN nfs41_client *client)
Definition: recovery.c:34
uint32_t sa_sequenceid
Definition: nfs41_ops.h:230
nfs41_compound_args args
nfs41_abs_path * path
Definition: nfs41_types.h:60
unsigned char * sa_sessionid
Definition: nfs41_ops.h:229
int nfs41_recover_session(IN nfs41_session *session, IN bool_t client_state_lost)
Definition: recovery.c:69
if(!(yy_init))
Definition: macro.lex.yy.c:717
#define MAX_SECINFOS
Definition: nfs41_ops.h:881
nfs_resop4 * resarray
void nfs41_recovery_finish(IN nfs41_client *client)
Definition: recovery.c:57
int nfs41_send_compound(IN nfs41_rpc_clnt *rpc, IN char *inbuf, OUT char *outbuf)
Definition: nfs41_rpc.c:337
static FILE * out
Definition: regtests2xml.c:44
const nfs41_component * name
Definition: nfs41_ops.h:492
const char * nfs_error_string(int status)
Definition: daemon_debug.c:370
union __open_claim4::@40 u
uint32_t sec_flavor
Definition: nfs41.h:177
SRWLOCK lock
Definition: nfs41.h:169
int nfs41_client_renew(IN nfs41_client *client)
Definition: nfs41_client.c:168
VOID WINAPI ReleaseSRWLockExclusive(PSRWLOCK Lock)
Definition: sync.c:82
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
uint64_t clnt_id
Definition: nfs41.h:195
struct __rpc_client * rpc
Definition: nfs41.h:168
struct __open_claim4::@40::__open_claim_null null
GLuint start
Definition: gl.h:1545
int nfs41_secinfo(IN nfs41_session *session, IN nfs41_path_fh *file, IN const nfs41_component *name, OUT nfs41_secinfo_info *secinfo)
Definition: nfs41_ops.c:1785
void nfs41_session_get_slot(IN nfs41_session *session, OUT uint32_t *slot, OUT uint32_t *seq, OUT uint32_t *highest)
UINT32 uint32_t
Definition: types.h:75
void nfs41_session_free_slot(IN nfs41_session *session, IN uint32_t slotid)
va_list oargs
Definition: format.c:255
int nfs41_session_bad_slot(IN nfs41_session *session, IN OUT struct __nfs41_sequence_args *args)
uint32_t seq_id
Definition: nfs41.h:196
void print_hexbuf(int level, unsigned char *title, unsigned char *buf, int len)
Definition: daemon_debug.c:98
int nfs41_name_cache_remove_stale(IN struct nfs41_name_cache *cache, IN nfs41_session *session, IN nfs41_abs_path *path)
Definition: name_cache.c:1359
static SERVICE_STATUS status
Definition: service.c:31
VOID WINAPI AcquireSRWLockShared(PSRWLOCK Lock)
Definition: sync.c:61
#define auth_destroy(auth)
Definition: auth.h:259
Definition: fci.c:126
GLuint const GLchar * name
Definition: glext.h:6031

◆ compound_error()

◆ compound_init()

void compound_init ( nfs41_compound compound,
nfs_argop4 argops,
nfs_resop4 resops,
const char tag 
)

Definition at line 41 of file nfs41_compound.c.

Referenced by lookup_rpc(), nfs41_access(), nfs41_bind_conn_to_session(), nfs41_close(), nfs41_commit(), nfs41_create(), nfs41_create_session(), nfs41_delegpurge(), nfs41_delegreturn(), nfs41_destroy_clientid(), nfs41_destroy_session(), nfs41_exchange_id(), nfs41_free_stateid(), nfs41_fs_locations(), nfs41_getattr(), nfs41_link(), nfs41_lock(), nfs41_open(), nfs41_read(), nfs41_readdir(), nfs41_readlink(), nfs41_reclaim_complete(), nfs41_remove(), nfs41_rename(), nfs41_rpc_openattr(), nfs41_secinfo(), nfs41_secinfo_noname(), nfs41_send_sequence(), nfs41_setattr(), nfs41_superblock_getattr(), nfs41_test_stateid(), nfs41_unlock(), nfs41_want_delegation(), nfs41_write(), pnfs_rpc_getdeviceinfo(), pnfs_rpc_layoutcommit(), pnfs_rpc_layoutget(), pnfs_rpc_layoutreturn(), and rpc_array_putfh().

46 {
47  /* initialize args */
48  compound->args.tag_len = (uint32_t)strlen(tag);
49  memcpy(compound->args.tag, tag, compound->args.tag_len);
50  compound->args.minorversion = 1;
51  compound->args.argarray_count = 0;
52  compound->args.argarray = argops;
53 
54  /* initialize results */
55  ZeroMemory(&compound->res, sizeof(nfs41_compound_res));
56  compound->res.tag_len = NFS4_OPAQUE_LIMIT;
57  compound->res.resarray_count = 0;
58  compound->res.resarray = resops;
59 }
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
unsigned char tag[NFS4_OPAQUE_LIMIT]
Definition: ecma_167.h:138
#define ZeroMemory
Definition: winbase.h:1635
nfs41_compound_res res
#define NFS4_OPAQUE_LIMIT
Definition: nfs41_const.h:31
nfs41_compound_args args
nfs_resop4 * resarray
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define uint32_t
Definition: nsiface.idl:61