2 static char sfs_3_opsSid[] = "@(#)sfs_3_ops.c 2.1 97/10/23";
6 * Copyright (c) 1992-1997,2001 by Standard Performance Evaluation Corporation
8 * Standard Performance Evaluation Corporation (SPEC)
9 * 6585 Merchant Place, Suite 100
12 * This product contains benchmarks acquired from several sources who
13 * understand and agree with SPEC's goal of creating fair and objective
14 * benchmarks to measure computer performance.
16 * This copyright notice is placed here only to protect SPEC in the
17 * event the source is misused in any manner that is contrary to the
18 * spirit, the goals and the intent of SPEC.
20 * The source code is provided to the user or company under the license
21 * agreement for the SPEC Benchmark Suite for this product.
24 /*****************************************************************
26 * Copyright 1991,1992 Legato Systems, Inc. *
27 * Copyright 1991,1992 Auspex Systems, Inc. *
28 * Copyright 1991,1992 Data General Corporation *
29 * Copyright 1991,1992 Digital Equipment Corporation *
30 * Copyright 1991,1992 Interphase Corporation *
31 * Copyright 1991,1992 Sun Microsystems, Inc. *
33 *****************************************************************/
40 #include <sys/types.h>
44 #include "sfs_c_def.h"
45 #include "rfs_c_def.h"
47 #define TRY_SETARG_FAST
48 #define TRY_SETRES_FAST
49 extern fh_map_t * lookup_fh (char * trace_fh);
50 extern void print_result(void);
52 char * lookup_fhandle(char * fhandle)
55 fh = lookup_fh(fhandle);
57 return ((char *)&fh->play_fh);
61 #define setarg_fhandle(fhp) \
63 t = strstr (line, "fh"); \
68 (void) memmove((char *)fhp, &(fh->play_fh), \
71 //t = strchr (t, ' '); t++; \
73 void setarg_getattr (int index, char * line, GETATTR3args * args)
76 #ifdef TRY_SETARG_FAST
77 memcpy (&args->object, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
79 setarg_fhandle(&args->object);
83 struct ladtime * adjust_time (struct timeval tm, int * sec, int * usec)
85 struct ladtime trace_pkt_time;
86 static struct ladtime trace_arg_time;
87 struct timeval curtmp;
90 /* not sure whether sec ==0 means anything special, do not adjust the timestamp for this */
93 RFS_ASSERT (*usec == 0);
94 trace_arg_time.sec = 0;
95 trace_arg_time.usec = 0;
96 return (&trace_arg_time);
98 trace_pkt_time.sec = tm.tv_sec;
99 trace_pkt_time.usec = tm.tv_usec;
101 trace_arg_time.sec = *sec;
102 trace_arg_time.usec = *usec;
104 gettimeofday(&curtmp, NULL);
105 cur.sec = curtmp.tv_sec;
106 cur.usec = curtmp.tv_usec;
108 //fprintf (stderr, "trace_pkt_time %d.%d trace_arg_time %d.%d cur %d.%d\n", trace_pkt_time.sec, trace_pkt_time.usec, trace_arg_time.sec, trace_arg_time.usec, cur.sec, cur.usec);
110 ADDTIME (trace_arg_time, cur);
111 //fprintf(stderr, "after add, %d.%d\n", trace_arg_time.sec, trace_arg_time.usec);
112 RFS_ASSERT (LARGERTIME (trace_arg_time, trace_pkt_time));
113 SUBTIME (trace_arg_time, trace_pkt_time);
114 return (&trace_arg_time);
117 char * parse_create_mode(char * t, createmode3 * mode)
121 /* anyway, we can not get concrete result from the trace, just chose this mode */
125 char * parse_sattr3(char * t, sattr3 * args, sattrguard3 * guard, int index)
130 /* set the default value of SETATTR3args->*/
131 args->mode.set_it = FALSE;
132 args->uid.set_it = FALSE;
133 args->gid.set_it = FALSE;
134 args->size.set_it = FALSE;
135 args->atime.set_it = FALSE;
136 args->mtime.set_it = FALSE;
138 //fprintf(stderr, "parse_sattr: line %s\n", t);
140 if (!strncmp (t, "mode", 4)) {
143 args->mode.set_it = TRUE;
144 args->mode.mode = i; // (uint32_t) 0666;
145 } else if (!strncmp (t, "ctime", 5)) {
148 RFS_ASSERT (strncmp(t, "SERVER", 6));
149 sscanf (t, "%d.%d", &i, &j);
150 tm = adjust_time (dep_tab[index].timestamp, &i, &j);
151 #ifndef IGNORE_SETATTR_CTIME
154 guard->obj_ctime.seconds = tm->sec;
155 guard->obj_ctime.nseconds = tm->usec*1000;
156 } else if (!strncmp (t, "atime", 5)) {
158 if (!strncmp(t, "SERVER", 6)) {
159 args->atime.set_it = SET_TO_SERVER_TIME;
161 args->atime.set_it = SET_TO_CLIENT_TIME;
162 sscanf (t, "%d.%d", &i, &j);
165 args->atime.atime.seconds = 0;
166 args->atime.atime.nseconds = 0;
168 tm = adjust_time (dep_tab[index].timestamp, &i, &j);
169 args->atime.atime.seconds = tm->sec;
170 args->atime.atime.nseconds = tm->usec * 1000;
173 } else if (!strncmp (t, "mtime", 5)) {
175 if (!strncmp(t, "SERVER", 6)) {
176 args->mtime.set_it = SET_TO_SERVER_TIME;
178 args->mtime.set_it = SET_TO_CLIENT_TIME;
179 sscanf (t, "%d.%d", &i, &j);
182 args->mtime.mtime.seconds = 0;
183 args->mtime.mtime.nseconds = 0;
185 tm = adjust_time (dep_tab[index].timestamp, &i, &j);
186 args->mtime.set_it = TRUE;
187 args->mtime.mtime.seconds = tm->sec;
188 args->mtime.mtime.nseconds = tm->usec * 1000;
191 } else if (!strncmp (t, "size", 4)) {
194 args->size.set_it = TRUE;
195 args->size.size._p._u = (uint32_t) 0;
196 args->size.size._p._l = (uint32_t) i;
197 } else if (!strncmp (t, "gid", 3)) {
200 args->gid.set_it = TRUE;
201 #ifdef TAKE_CARE_SETATTR_GID
206 } else if ( !strncmp (t, "uid", 3)) {
209 args->uid.set_it = TRUE;
210 #ifdef TAKE_CARE_SETATTR_UID
215 } else if (!strncmp (t, "con", 3)) {
217 } else if (!strncmp (t, "sdata", 5)) {
220 fprintf(stderr, "parse_sattr t: %s\n", t);
231 char * parse_name (char * t, char * buf)
234 if (!strncmp(t, "fn2", 3))
236 else if (!strncmp(t, "fn", 2))
238 else if (!strncmp(t, "name2", 5))
240 else if (!strncmp(t, "name", 4))
242 else if (!strncmp(t, "sdata", 5))
245 fprintf(stderr, "%s\n", t);
249 RFS_ASSERT (*t=='"');
253 buf[i++] = *t++; // ??? name buffer?
254 RFS_ASSERT ((*t)=='"');
259 char * parse_access_mode (char * line, int * mode)
261 *mode = ACCESS3_READ;
263 /* anyway the information in the trace is not enough, so we just make up something */
266 char * parse_stable_mode (char * line, stable_how * mode)
269 case 'U': *mode = UNSTABLE;
271 case 'F': *mode = FILE_SYNC;
273 case 'D': *mode = DATA_SYNC;
282 void setarg_setattr (int index, char * line, SETATTR3args * args)
287 #ifdef TRY_SETARG_FAST
288 memcpy (&args->object, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
289 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
290 t = strchr(dep_tab[index].trace_fh, ' '); t++;
292 setarg_fhandle(&args->object);
295 args->guard.check = FALSE;
296 t = parse_sattr3 (t, &(args->new_attributes), &(args->guard), index);
299 void setarg_lookup (int index, char * line, LOOKUP3args * args, char * Cur_filename)
302 #ifdef TRY_SETARG_FAST
303 memcpy (&args->what.dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
304 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
305 t = strchr(dep_tab[index].trace_fh, ' '); t++;
307 setarg_fhandle(&args->what.dir)
309 t = parse_name (t, Cur_filename);
310 args->what.name = Cur_filename;
313 void setarg_access (int index, char * line, ACCESS3args * args)
317 #ifdef TRY_SETARG_FAST
318 memcpy (&args->object, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
319 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
320 t = strchr(dep_tab[index].trace_fh, ' '); t++;
322 setarg_fhandle(&args->object);
325 parse_access_mode (t, &args->access); //ACCESS3_MODIFY; // ??? the actual parameter can be different
328 void setarg_readlink (int index, char * line, READLINK3args * args)
331 #ifdef TRY_SETARG_FAST
332 memcpy (&args->symlink, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
333 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
334 t = strchr(dep_tab[index].trace_fh, ' '); t++;
336 setarg_fhandle (&args->symlink);
340 void setarg_read (int index, char * line, READ3args * args, char * buf)
344 #ifdef TRY_SETARG_FAST
345 memcpy (&args->file, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
346 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
347 t = strchr(dep_tab[index].trace_fh, ' '); t++;
349 setarg_fhandle (&args->file);
352 if (line[TRACE_VERSION_POS]=='3') {
353 t = strstr (t, "off");
357 t = strstr (t, "offset");
361 sscanf (t, "%x", &i);
363 RFS_ASSERT (i>=0 && i<0x7FFFFFFF)
364 args->offset._p._u = 0;
365 args->offset._p._l = i;
367 if (index>=memory_trace_index.head)
368 args->offset._p._l = (index-memory_trace_index.head)*4096;
370 t = strstr (t, "count");
373 sscanf (t, "%x", &i);
375 RFS_ASSERT (i <= 32768);
376 if (i > NFS_MAXDATA) {
377 read_data_owe += (i-NFS_MAXDATA);
378 read_data_adjust_times ++;
379 if (read_data_owe > 1073741824) {
380 read_data_owe -= 1073741824;
384 //printf ("adjust read count from %d to %d\n", i, NFS_MAXDATA);
387 read_data_total += i;
388 if (read_data_total > 1073741824) {
389 read_data_total -= 1073741824;
390 read_data_total_GB ++;
396 void setarg_write (int index, char * line, WRITE3args * args, char * buf)
400 #ifdef TRY_SETARG_FAST
401 memcpy (&args->file, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
402 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
403 t = strchr(dep_tab[index].trace_fh, ' '); t++;
405 setarg_fhandle (&args->file);
408 //fprintf (stderr, "process write: %s\n", line);
409 if (line[TRACE_VERSION_POS]=='3') {
410 t = strstr (t, "off");
414 RFS_ASSERT (line[TRACE_VERSION_POS]=='2');
415 t = strstr (t, "offset");
420 sscanf (t, "%x", &i);
421 RFS_ASSERT (i>=0 && i<0x7FFFFFFF)
422 args->offset._p._u = 0;
423 args->offset._p._l = i;
425 t = strstr (t, "count");
428 sscanf (t, "%x", &i);
429 RFS_ASSERT (i <= 32768);
430 if (i > NFS_MAXDATA) {
431 write_data_owe += (i-NFS_MAXDATA);
432 if (write_data_owe > 1073741824) {
433 write_data_owe -= 1073741824;
434 write_data_owe_GB ++;
436 write_data_adjust_times ++;
437 //printf ("adjust write count from %d to %d\n", i, NFS_MAXDATA);
440 write_data_total += i;
441 if (write_data_total > 1073741824) {
442 write_data_total -= 1073741824;
443 write_data_total_GB ++;
446 RFS_ASSERT (i < MAX_BUF1_SIZE-128); /* 128 is some random safe number to add */
449 if (line[TRACE_VERSION_POS]==3) {
450 t = strstr (t, "stable");
453 parse_stable_mode(t, &args->stable); /* *t can be F, U, etc */
455 args->stable = UNSTABLE;
456 args->data.data_len = args->count;
457 args->data.data_val = buf;
460 void setarg_create (int index, char * line, CREATE3args * args, char * Cur_filename)
463 //fprintf(stderr, "process create %s\n", line);
464 #ifdef TRY_SETARG_FAST
465 memcpy (&args->where.dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
466 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
467 t = strchr(dep_tab[index].trace_fh, ' '); t++;
469 setarg_fhandle (&args->where.dir);
471 t = parse_name (t, Cur_filename);
472 args->where.name = Cur_filename;
473 if (line[TRACE_VERSION_POS]=='3') {
474 RFS_ASSERT (!strncmp(t, "how", 3));
476 t = parse_create_mode (t, &args->how.mode);
478 args->how.mode = UNCHECKED;
479 t = parse_sattr3 (t, &(args->how.createhow3_u.obj_attributes), NULL, index);
482 void setarg_mkdir (int index, char * line, MKDIR3args * args, char * Cur_filename)
485 #ifdef TRY_SETARG_FAST
486 memcpy (&args->where.dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
487 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
488 t = strchr(dep_tab[index].trace_fh, ' '); t++;
490 setarg_fhandle (&args->where.dir);
492 t = parse_name (t, Cur_filename);
493 args->where.name = Cur_filename;
494 t = parse_sattr3 (t, &(args->attributes), NULL, index);
497 void setarg_symlink(int index, char * line, SYMLINK3args * args, char * Cur_filename, char * sym_data)
500 #ifdef TRY_SETARG_FAST
501 memcpy (&args->where.dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
502 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
503 t = strchr(dep_tab[index].trace_fh, ' '); t++;
505 setarg_fhandle (&args->where.dir);
507 t = parse_name (t, Cur_filename);
508 args->where.name = Cur_filename;
509 if (line[TRACE_VERSION_POS]=='2') {
510 t = parse_name (t, sym_data);
511 t = parse_sattr3 (t, &(args->symlink.symlink_attributes), NULL, index);
513 t = parse_sattr3 (t, &(args->symlink.symlink_attributes), NULL, index);
514 t = parse_name (t, sym_data);
516 args->symlink.symlink_data = sym_data;
519 void setarg_mknod(int index, char * line, MKNOD3args * args, char * Cur_filename)
524 /* set up the arguments */
525 (void) memmove((char *) &args.where.dir, (char *) &Cur_file_ptr->dir->fh3,
527 args.where.name = Cur_filename;
528 args.what.type = NF3FIFO;
529 args.what.mknoddata3_u.pipe_attributes.mode.set_it = TRUE;
530 args.what.mknoddata3_u.pipe_attributes.mode.mode = (NFSMODE_FIFO | 0777);
531 args.what.mknoddata3_u.pipe_attributes.uid.set_it = TRUE;
532 args.what.mknoddata3_u.pipe_attributes.uid.uid = Cur_uid;
533 args.what.mknoddata3_u.pipe_attributes.gid.set_it = TRUE;
534 args.what.mknoddata3_u.pipe_attributes.gid.gid = Cur_gid;
535 args.what.mknoddata3_u.pipe_attributes.size.set_it = TRUE;
536 args.what.mknoddata3_u.pipe_attributes.size.size._p._u = (uint32_t) 0;
537 args.what.mknoddata3_u.pipe_attributes.size.size._p._l =
539 args.what.mknoddata3_u.pipe_attributes.atime.set_it = TRUE;
540 args.what.mknoddata3_u.pipe_attributes.atime.atime.seconds =
542 args.what.mknoddata3_u.pipe_attributes.atime.atime.nseconds =
543 Cur_time.usec * 1000;
544 args.what.mknoddata3_u.pipe_attributes.mtime.set_it = TRUE;
545 args.what.mknoddata3_u.pipe_attributes.mtime.mtime.seconds =
547 args.what.mknoddata3_u.pipe_attributes.mtime.mtime.nseconds =
548 Cur_time.usec * 1000;
552 void setarg_remove (int index, char * line, REMOVE3args * args, char * Cur_filename)
555 #ifdef TRY_SETARG_FAST
556 memcpy (&args->object.dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
557 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
558 t = strchr(dep_tab[index].trace_fh, ' '); t++;
560 setarg_fhandle(&args->object.dir)
562 t = parse_name (t, Cur_filename);
563 args->object.name = Cur_filename;
566 void setarg_rmdir (int index, char * line, RMDIR3args * args, char * Cur_filename)
569 #ifdef TRY_SETARG_FAST
570 memcpy (&args->object.dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
571 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
572 t = strchr(dep_tab[index].trace_fh, ' '); t++;
574 setarg_fhandle(&args->object.dir)
576 t = parse_name (t, Cur_filename);
577 args->object.name = Cur_filename;
580 void setarg_rename (int index, char * line, RENAME3args * args, char * fromname, char * toname)
583 #ifdef TRY_SETARG_FAST
584 memcpy (&args->from.dir, &dep_tab[index].fh_2->play_fh, sizeof(nfs_fh3));
585 //t = dep_tab[index].trace_fh_2 + TRACE_FH_SIZE+1;
586 t = strchr(dep_tab[index].trace_fh_2, ' '); t++;
588 setarg_fhandle(&args->from.dir)
590 t = parse_name (t, fromname);
591 args->from.name = fromname;
593 t = strstr (t, "fh2");
596 memmove((char *)&args->to.dir, lookup_fhandle(t), sizeof (nfs_fh3));
599 t = parse_name (t, toname);
600 args->to.name = toname;
603 void setarg_link (int index, char * line, LINK3args * args, char * Cur_filename)
607 #ifdef TRY_SETARG_FAST
608 memcpy (&args->file, &dep_tab[index].fh_2->play_fh, sizeof(nfs_fh3));
609 //t = dep_tab[index].trace_fh_2 + TRACE_FH_SIZE+1;
610 t = strchr(dep_tab[index].trace_fh_2, ' '); t++;
612 setarg_fhandle(&args->file)
615 t = strstr (t, "fh2");
618 memmove((char *)&args->link.dir, lookup_fhandle(t), sizeof (nfs_fh3));
621 t = parse_name (t, Cur_filename);
622 args->link.name = Cur_filename;
625 void setarg_readdir (int index, char * line, READDIR3args * args)
629 #ifdef TRY_SETARG_FAST
630 memcpy (&args->dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
631 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
632 t = strchr(dep_tab[index].trace_fh, ' '); t++;
634 setarg_fhandle(&args->dir);
636 /* args->cookieverf is notset, it is not implemented in the linux-2.4.7 */
637 sscanf(t, "cookie %d count %d", &args->cookie._p._l, &args->count);
638 (void) memset((char *) args->cookieverf, '\0', NFS3_COOKIEVERFSIZE);
639 args->cookie._p._u = (uint32_t) 0;
642 void setarg_readdirplus (int index, char * line, READDIRPLUS3args * args)
646 #ifdef TRY_SETARG_FAST
647 memcpy (&args->dir, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
648 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
649 t = strchr(dep_tab[index].trace_fh, ' '); t++;
651 setarg_fhandle(&args->dir);
653 /* args->cookieverf is notset, it is not implemented in the linux-2.4.7 */
654 sscanf(t, "cookie %d count %d maxcnt", &args->cookie._p._l, &args->dircount, &args->maxcount);
655 (void) memset((char *) args->cookieverf, '\0', NFS3_COOKIEVERFSIZE);
656 args->cookie._p._u = (uint32_t) 0;
659 /* set up the arguments */
660 (void) memmove((char *) &args.dir, (char *) &Cur_file_ptr->dir->fh3,
662 args.cookie._p._l = args.cookie._p._u = (uint32_t) 0;
663 (void) memset((char *) args.cookieverf, '\0', NFS3_COOKIEVERFSIZE);
664 args.dircount = DEFAULT_MAX_BUFSIZE;
665 args.maxcount = DEFAULT_MAX_BUFSIZE;
669 void setarg_fsstat (int index, char * line, FSSTAT3args * args)
672 setarg_fhandle(&args->fsroot);
675 void setarg_fsinfo (int index, char * line, FSINFO3args * args)
678 setarg_fhandle(&args->fsroot);
681 void setarg_pathconf (int index, char * line, PATHCONF3args * args)
684 #ifdef TRY_SETARG_FAST
685 memcpy (&args->object, &dep_tab[index].fh->play_fh, sizeof(nfs_fh3));
686 //t = dep_tab[index].trace_fh + TRACE_FH_SIZE+1;
687 t = strchr(dep_tab[index].trace_fh, ' '); t++;
689 setarg_fhandle(&args->object);
693 void setarg_commit (int index, char * line, COMMIT3args * args)
698 /* set up the arguments */
699 (void) memmove((char *) &args.file, (char *) &Cur_file_ptr->fh3,
701 args.offset._p._u = args.offset._p._l = (uint32_t) 0;
702 args.count = Cur_file_ptr->attributes3.size._p._l;
706 void setbuf_void (char * buf)
711 void setbuf_invalid (char * buf)
716 void setres_lookup (LOOKUP3res * reply)
718 #ifndef TRY_SETRES_FAST
719 (void) memset((char *) &(reply->resok.object), '\0', sizeof (nfs_fh3));
723 void setres_readlink (READLINK3res * reply, char * sym_data)
725 /* Have lower layers fill in the data directly. */
726 reply->resok.data = sym_data;
729 void setres_read (READ3res * reply, char * buf)
731 /* Have lower layers fill in the data directly. */
732 reply->resok.data.data_len = 0;
733 reply->resok.data.data_val = buf;
736 void setres_readdir (READDIR3res * reply, entry3 * entry_stream)
738 #ifndef TRY_SETRES_FAST
739 /* Have lower layers fill in the data directly. */
740 (void) memset((char *) reply, '\0', sizeof (READDIR3res));
741 (void) memset((char *) entry_stream, '\0',
742 sizeof (entry3) * SFS_MAXDIRENTS);
744 reply->resok.count = SFS_MAXDIRENTS;
745 reply->resok.reply.entries = entry_stream;
748 void setres_readdirplus (READDIRPLUS3res * reply, entryplus3 * entry_stream)
750 #ifndef TRY_SETRES_FAST
751 (void) memset((char *) reply, '\0', sizeof (READDIRPLUS3res));
752 //printf ("sizeof(entryplus3) %d SFS_MAXDIRENT %d\n", sizeof (entryplus3), SFS_MAXDIRENTS);
753 (void) memset((char *) entry_stream, '\0',
754 sizeof (entryplus3) * SFS_MAXDIRENTS);
756 reply->resok.count = SFS_MAXDIRENTS;
757 reply->resok.reply.entries = entry_stream;
760 #define NFSPROC3_INVALID -1
761 /* the array is indexed by sfs operation number */
762 rfs_op_type rfs_Ops[TOTAL] = {
763 {NFSPROC3_NULL, setbuf_void, setbuf_void, xdr_void, xdr_void},
764 {NFSPROC3_GETATTR, setarg_getattr, setbuf_void, xdr_GETATTR3args, xdr_GETATTR3res},
765 {NFSPROC3_SETATTR, setarg_setattr, setbuf_void, xdr_SETATTR3args, xdr_SETATTR3res},
766 {NFSPROC3_INVALID, setbuf_invalid, setbuf_invalid, NULL, NULL},
767 {NFSPROC3_LOOKUP, setarg_lookup, setres_lookup, xdr_LOOKUP3args, xdr_LOOKUP3res},
768 {NFSPROC3_READLINK, setarg_readlink, setres_readlink, xdr_READLINK3args, xdr_READLINK3res},
769 {NFSPROC3_READ, setarg_read, setres_read, xdr_READ3args, xdr_READ3res},
770 {NFSPROC3_INVALID, setbuf_invalid, setbuf_invalid, NULL, NULL},
771 {NFSPROC3_WRITE, setarg_write, setbuf_void, xdr_WRITE3args, xdr_WRITE3res},
772 {NFSPROC3_CREATE, setarg_create, setbuf_void, xdr_CREATE3args, xdr_CREATE3res},
773 {NFSPROC3_REMOVE, setarg_remove, setbuf_void, xdr_REMOVE3args, xdr_REMOVE3res},
774 {NFSPROC3_RENAME, setarg_rename, setbuf_void, xdr_RENAME3args, xdr_RENAME3res},
775 {NFSPROC3_LINK, setarg_link, setbuf_void, xdr_LINK3args, xdr_LINK3res},
776 {NFSPROC3_SYMLINK, setarg_symlink, setbuf_void, xdr_SYMLINK3args, xdr_SYMLINK3res},
777 {NFSPROC3_MKDIR, setarg_mkdir, setbuf_void, xdr_MKDIR3args, xdr_MKDIR3res},
778 {NFSPROC3_RMDIR, setarg_rmdir, setbuf_void, xdr_RMDIR3args, xdr_RMDIR3res},
779 {NFSPROC3_READDIR, setarg_readdir, setres_readdir, xdr_READDIR3args, xdr_READDIR3res},
780 {NFSPROC3_FSSTAT, setarg_fsstat, setbuf_void, xdr_FSSTAT3args, xdr_FSSTAT3res},
781 {NFSPROC3_ACCESS, setarg_access, setbuf_void, xdr_ACCESS3args, xdr_ACCESS3res},
782 {NFSPROC3_COMMIT, setarg_commit, setbuf_void, xdr_COMMIT3args, xdr_COMMIT3res},
783 {NFSPROC3_FSINFO, setarg_fsinfo, setbuf_void, xdr_FSINFO3args, xdr_FSINFO3res},
784 {NFSPROC3_MKNOD, setarg_mknod, setbuf_void, xdr_MKNOD3args, xdr_MKNOD3res},
785 {NFSPROC3_PATHCONF, setarg_pathconf, setbuf_void, xdr_PATHCONF3args, xdr_PATHCONF3res},
786 {NFSPROC3_READDIRPLUS, setarg_readdirplus, setres_readdirplus, xdr_READDIRPLUS3args, xdr_READDIRPLUS3res}};
789 * -------------------- NFS ops vector --------------------
792 * per operation information
794 sfs_op_type nfsv3_Ops[] = {
796 /* name mix op call no req req req results */
797 /* pcnt class targ call pcnt cnt targ */
799 { "null", 0, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
800 { "getattr", 11, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
801 { "setattr", 1, Write, 0, 0, 0.0, 0, 0, { 0, }},
802 { "root", 0, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
803 { "lookup", 27, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
804 { "readlink", 7, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
805 { "read", 18, Read, 0, 0, 0.0, 0, 0, { 0, }},
806 { "wrcache", 0, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
807 { "write", 9, Write, 0, 0, 0.0, 0, 0, { 0, }},
808 { "create", 1, Write, 0, 0, 0.0, 0, 0, { 0, }},
809 { "remove", 1, Write, 0, 0, 0.0, 0, 0, { 0, }},
810 { "rename", 0, Write, 0, 0, 0.0, 0, 0, { 0, }},
811 { "link", 0, Write, 0, 0, 0.0, 0, 0, { 0, }},
812 { "symlink", 0, Write, 0, 0, 0.0, 0, 0, { 0, }},
813 { "mkdir", 0, Write, 0, 0, 0.0, 0, 0, { 0, }},
814 { "rmdir", 0, Write, 0, 0, 0.0, 0, 0, { 0, }},
815 { "readdir", 2, Read, 0, 0, 0.0, 0, 0, { 0, }},
816 { "fsstat", 1, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
817 { "access", 7, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
818 { "commit", 5, Write, 0, 0, 0.0, 0, 0, { 0, }},
819 { "fsinfo", 1, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
820 { "mknod", 0, Write, 0, 0, 0.0, 0, 0, { 0, }},
821 { "pathconf", 0, Lookup, 0, 0, 0.0, 0, 0, { 0, }},
822 { "readdirplus", 9, Read, 0, 0, 0.0, 0, 0, { 0, }},
823 { "TOTAL", 100, Lookup, 0, 0, 0.0, 0, 0, { 0, }}