xref: /titanic_41/usr/src/head/metad.x (revision 337314b168c54664c60b2a5071e5b3d509167aef)
1 %/*
2 % * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3 % * Use is subject to license terms.
4 % *
5 % * CDDL HEADER START
6 % *
7 % * The contents of this file are subject to the terms of the
8 % * Common Development and Distribution License, Version 1.0 only
9 % * (the "License").  You may not use this file except in compliance
10 % * with the License.
11 % *
12 % * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 % * or http://www.opensolaris.org/os/licensing.
14 % * See the License for the specific language governing permissions
15 % * and limitations under the License.
16 % *
17 % * When distributing Covered Code, include this CDDL HEADER in each
18 % * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 % * If applicable, add the following below this CDDL HEADER, with the
20 % * fields enclosed by brackets "[]" replaced with your own identifying
21 % * information: Portions Copyright [yyyy] [name of copyright owner]
22 % *
23 % * CDDL HEADER END
24 % */
25 %
26 %#pragma ident	"%Z%%M%	%I%	%E% SMI"
27 %
28 
29 %#include <mdiox.h>
30 %#include <meta_basic.h>
31 %#include <sys/lvm/mdmn_commd.h>
32 
33 #ifdef RPC_SVC
34 %
35 %int md_in_daemon = 1;
36 %#include <signal.h>
37 #endif /* RPC_SVC */
38 
39 #ifdef RPC_CLNT
40 %int _md_in_daemon = 0;
41 %#pragma weak md_in_daemon = _md_in_daemon
42 #endif /* RPC_CLNT */
43 
44 #ifdef RPC_HDR
45 %
46 %extern	int	md_in_daemon;
47 %/*
48 % * There are too many external factors that affect the timing of the
49 % * operations, so we set the timeout to a very large value, in this
50 % * case 1 day, which should handle HW timeouts, large configurations,
51 % * and other potential delays.
52 % */
53 %#define	CL_LONG_TMO	86400L
54 #endif /* RPC_HDR */
55 
56 #ifdef	RPC_XDR
57 %
58 %/* Start - Avoid duplicate definitions, but get the xdr calls right */
59 %#if 0
60 #include "../uts/common/sys/lvm/meta_arr.x"
61 %#endif	/* 0 */
62 %/* End   - Avoid duplicate definitions, but get the xdr calls right */
63 %
64 #endif	/* RPC_XDR */
65 
66 %
67 %/*
68 % * Structure Revisions
69 % */
70 enum mdrpc_metad_args_rev {
71 	MD_METAD_ARGS_REV_1 = 1			/* Revision 1 */
72 };
73 
74 %
75 %/*
76 % *	device id
77 % */
78 struct mdrpc_devid_res {
79 	string		enc_devid<>;		/* encoded device id */
80 	md_error_t	status;			/* status of RPC call */
81 };
82 
83 %
84 %/*
85 % * svm rpc version 2 device id arguments
86 % * (member union in mdrpc_devid_2_args)
87 % */
88 struct mdrpc_devid_args {
89 	md_setkey_t	*cl_sk;
90 	mdsetname_t	*sp;
91 	mddrivename_t	*drivenamep;
92 };
93 
94 %
95 %/*
96 % * svm rpc version 2 device id arguments
97 % * (union of all version 2 revisions)
98 % */
99 union mdrpc_devid_2_args switch (mdrpc_metad_args_rev rev) {
100 	case MD_METAD_ARGS_REV_1:
101 	    mdrpc_devid_args	rev1;
102 	default:
103 	    void;
104 };
105 
106 %
107 %/*
108 % * For getting the devinfo based upon devid
109 % */
110 struct mdrpc_devidstr_args {
111 	mdsetname_t	*sp;
112 	string		enc_devid<>;		/* encoded device id */
113 	md_error_t	status;			/* status of RPC call */
114 };
115 
116 %
117 %/*
118 % * For getting the devinfo based upon devid/devname
119 % */
120 struct mdrpc_devid_name_args {
121 	mdsetname_t	*sp;
122 	string		orig_devname<>;		/* devname on orig node */
123 	string		enc_devid<>;		/* encoded device id */
124 };
125 
126 %
127 %/*
128 % * svm rpc version 2 devinfo based upon devid/devname
129 % * (union of all version 2 revisions)
130 % */
131 union mdrpc_devid_name_2_args switch (mdrpc_metad_args_rev rev) {
132 	case MD_METAD_ARGS_REV_1:
133 	    mdrpc_devid_name_args	rev1;
134 	default:
135 	    void;
136 };
137 
138 %
139 %/*
140 % * version 1 device info
141 % */
142 struct mdrpc_devinfo_res {
143 	dev_t		dev;			/* major.minor */
144 	int		vtime;			/* vtoc timestamp */
145 	md_error_t	status;			/* status of RPC call */
146 };
147 
148 %
149 %/*
150 % * version 2 device info. dev_t is always 64-bit
151 % */
152 struct mdrpc_devinfo_2_res {
153 	md_dev64_t	dev;			/* major.minor */
154 	int		vtime;			/* vtoc timestamp */
155 	string		enc_devid<>;		/* encoded device id */
156 	string		devname<>;		/* name of the device */
157 	string		drivername<>;		/* name of the driver */
158 	md_error_t	status;			/* status of RPC call */
159 };
160 
161 %
162 %/*
163 % * svm rpc version 1 device info arguments
164 % */
165 struct mdrpc_devinfo_args {
166 	md_setkey_t	*cl_sk;
167 	mdsetname_t	*sp;
168 	o_mddrivename_t	*drivenamep;
169 };
170 
171 %
172 %/*
173 % * svm rpc version 2 (revision 1) device info arguments
174 % * (member of union in mdrpc_devinfo_2_args)
175 % */
176 struct mdrpc_devinfo_2_args_r1 {
177 	md_setkey_t	*cl_sk;
178 	mdsetname_t	*sp;
179 	mddrivename_t	*drivenamep;
180 	string		enc_devid<>;	/* encoded device id */
181 };
182 
183 %
184 %/*
185 % * svm rpc version 2 device info arguments
186 % * (union of all version 2 revisions)
187 % */
188 union mdrpc_devinfo_2_args switch (mdrpc_metad_args_rev rev) {
189     case MD_METAD_ARGS_REV_1:
190 	mdrpc_devinfo_2_args_r1	rev1;
191     default:
192 	void;
193 };
194 
195 struct mdrpc_hostname_res {
196 	string		hostname<>;
197 	md_error_t	status;
198 };
199 
200 %
201 %/*
202 % * svm rpc version 1 and version 2 (revision 1) getset arguments
203 % */
204 struct mdrpc_getset_args {
205 	string		setname<>;
206 	set_t		setno;
207 };
208 
209 %
210 %/*
211 % * svm rpc version 2 getset arguments
212 % * (union of all version 2 revisions)
213 % */
214 union mdrpc_getset_2_args switch (mdrpc_metad_args_rev rev) {
215     case MD_METAD_ARGS_REV_1:
216 	mdrpc_getset_args	rev1;
217     default:
218 	void;
219 };
220 
221 %
222 %/* NOTE: if you add to this struct, then fix the clnt_getset() */
223 %/*	  to prevent memory leaks */
224 struct mdrpc_getset_res {
225 	md_set_record	*sr;
226 	md_error_t	status;
227 };
228 
229 %
230 %/* NOTE: if you add to this struct, then fix the clnt_mngetset() */
231 %/*	  to prevent memory leaks */
232 struct mdrpc_mngetset_res {
233 	md_mnset_record	*mnsr;
234 	md_error_t	status;
235 };
236 
237 %
238 %/* NOTE: if you add to this struct, then fix the clnt_getdrivedesc() */
239 %/*	  to prevent memory leaks */
240 struct mdrpc_getdrivedesc_res {
241 	md_drive_desc	*dd;
242 	md_error_t	status;
243 };
244 
245 #ifdef RPC_HDR
246 %#ifndef STRINGARRAY
247 #endif
248 typedef string stringarray<>;
249 #ifdef RPC_HDR
250 %#define STRINGARRAY
251 %#endif
252 #endif
253 
254 %
255 %/*
256 % * svm rpc version 1 and version 2 (revision 1) createset arguments
257 % */
258 struct mdrpc_createset_args {
259 	md_setkey_t		*cl_sk;
260 	mdsetname_t		*sp;
261 	md_node_nm_arr_t	nodes;
262 	md_timeval32_t		timestamp;
263 	u_long			genid;
264 };
265 
266 %
267 %/*
268 % * svm rpc version 2 createset arguments
269 % * (union of all version 2 revisions)
270 % */
271 union mdrpc_createset_2_args switch (mdrpc_metad_args_rev rev) {
272     case MD_METAD_ARGS_REV_1:
273 	mdrpc_createset_args	rev1;
274     default:
275 	void;
276 };
277 
278 struct mdrpc_mncreateset_args {
279 	md_setkey_t		*cl_sk;
280 	mdsetname_t		*sp;
281 	md_mnnode_desc		*nodelist;
282 	md_timeval32_t		timestamp;
283 	u_long			genid;
284 	md_node_nm_t		master_nodenm;
285 	int			master_nodeid;
286 };
287 
288 %
289 %/*
290 % * svm rpc version 2 mncreateset arguments
291 % * (union of all version 2 revisions)
292 % */
293 union mdrpc_mncreateset_2_args switch (mdrpc_metad_args_rev rev) {
294     case MD_METAD_ARGS_REV_1:
295 	mdrpc_mncreateset_args  rev1;
296     default:
297 	void;
298 };
299 
300 
301 struct mdrpc_bool_res {
302 	int		value;
303 	md_error_t	status;
304 };
305 
306 %
307 %/*
308 % * svm rpc version 1 drive arguments
309 % */
310 struct mdrpc_drives_args {
311 	md_setkey_t	*cl_sk;
312 	mdsetname_t	*sp;
313 	o_md_drive_desc	*drivedescs;
314 	md_timeval32_t	timestamp;
315 	u_long		genid;
316 };
317 
318 %
319 %/*
320 % * svm rpc version 2 (revision 1) drive arguments
321 % * (member of union in mrpc_drives_2_args)
322 % */
323 struct mdrpc_drives_2_args_r1 {
324 	md_setkey_t	*cl_sk;
325 	mdsetname_t	*sp;
326 	md_drive_desc	*drivedescs;
327 	md_timeval32_t	timestamp;
328 	u_long		genid;
329 };
330 
331 %
332 %/*
333 % * svm rpc version 2 drive arguments
334 % * (union of all version 2 revisions)
335 % */
336 union mdrpc_drives_2_args switch (mdrpc_metad_args_rev rev) {
337     case MD_METAD_ARGS_REV_1:
338 	mdrpc_drives_2_args_r1	rev1;
339     default:
340 	void;
341 };
342 
343 %
344 %/*
345 % * svm rpc version 1 sidename arguments
346 % */
347 struct mdrpc_drv_sidenm_args {
348 	md_setkey_t	*cl_sk;
349 	string		hostname<>;
350 	mdsetname_t	*sp;
351 	o_md_set_desc	*sd;
352 	stringarray	node_v<>;
353 };
354 
355 %
356 %/*
357 % * svm rpc version 2 (revision 1) sidename arguments
358 % * (member of union in mdrpc_drv_sidenm_2_args)
359 % */
360 struct mdrpc_drv_sidenm_2_args_r1 {
361 	md_setkey_t	*cl_sk;
362 	string		hostname<>;
363 	mdsetname_t	*sp;
364 	md_set_desc	*sd;
365 	stringarray	node_v<>;
366 };
367 
368 %
369 %/*
370 % * svm rpc version 2 sidename arguments
371 % * (union of all version 2 revisions)
372 % */
373 union mdrpc_drv_sidenm_2_args switch (mdrpc_metad_args_rev rev) {
374     case MD_METAD_ARGS_REV_1:
375 	mdrpc_drv_sidenm_2_args_r1	rev1;
376     default:
377 	void;
378 };
379 
380 %
381 %/*
382 % * svm rpc version 1 drvused arguments
383 % */
384 struct mdrpc_drvused_args {
385 	md_setkey_t	*cl_sk;
386 	mdsetname_t	*sp;
387 	o_mddrivename_t	*drivenamep;
388 };
389 
390 %
391 %/*
392 % * svm rpc version 2 (revision 1) drvused arguments
393 % * (member of union in mdrpc_drvused_2_args)
394 % */
395 struct mdrpc_drvused_2_args_r1 {
396 	md_setkey_t	*cl_sk;
397 	mdsetname_t	*sp;
398 	mddrivename_t	*drivenamep;
399 };
400 
401 %
402 %/*
403 % * svm rpc version 2 drvused arguments
404 % * (union of all version 2 revisions)
405 % */
406 union mdrpc_drvused_2_args switch (mdrpc_metad_args_rev rev) {
407     case MD_METAD_ARGS_REV_1:
408 	mdrpc_drvused_2_args_r1	rev1;
409     default:
410 	void;
411 };
412 
413 %
414 %/*
415 % * svm rpc version 1 and version 2 (revision 1) host arguments
416 % */
417 struct mdrpc_host_args {
418 	md_setkey_t	*cl_sk;
419 	mdsetname_t	*sp;
420 	stringarray	hosts<>;
421 };
422 
423 %
424 %/*
425 % * svm rpc version 2 host arguments
426 % * (union of all version 2 revisions)
427 % */
428 union mdrpc_host_2_args switch (mdrpc_metad_args_rev rev) {
429     case MD_METAD_ARGS_REV_1:
430 	mdrpc_host_args	rev1;
431     default:
432 	void;
433 };
434 
435 struct mdrpc_gtimeout_res {
436 	md_error_t	status;
437 	mhd_mhiargs_t	*mhiargsp;
438 };
439 
440 %
441 %/*
442 % * svm rpc version 1 and version 2 (revision 1) set timeout arguments
443 % */
444 struct mdrpc_stimeout_args {
445 	md_setkey_t	*cl_sk;
446 	mdsetname_t	*sp;
447 	mhd_mhiargs_t	*mhiargsp;
448 };
449 
450 %
451 %/*
452 % * svm rpc version 2 set timeout arguments
453 % * (union of all version 2 revisions)
454 % */
455 union mdrpc_stimeout_2_args switch (mdrpc_metad_args_rev rev) {
456     case MD_METAD_ARGS_REV_1:
457 	mdrpc_stimeout_args	rev1;
458     default:
459 	void;
460 };
461 
462 %
463 %/*
464 % * svm rpc version 1 arguments
465 % */
466 struct mdrpc_upd_dr_flags_args {
467 	md_setkey_t	*cl_sk;
468 	mdsetname_t	*sp;
469 	o_md_drive_desc	*drivedescs;
470 	u_int		new_flags;
471 };
472 
473 %
474 %/*
475 % * svm rpc version 2 (revision 1) arguments
476 % * (member of union in mdrpc_upd_dr_flags_2_args)
477 % */
478 struct mdrpc_upd_dr_flags_2_args_r1 {
479 	md_setkey_t	*cl_sk;
480 	mdsetname_t	*sp;
481 	md_drive_desc	*drivedescs;
482 	u_int		new_flags;
483 };
484 
485 %
486 %/*
487 % * svm rpc version 2 arguments
488 % * (union of all version 2 revisions)
489 % */
490 union mdrpc_upd_dr_flags_2_args switch (mdrpc_metad_args_rev rev) {
491     case MD_METAD_ARGS_REV_1:
492 	mdrpc_upd_dr_flags_2_args_r1	rev1;
493     default:
494 	void;
495 };
496 
497 %
498 %/*
499 % * svm rpc version 1 and version 2 (revision 1) arguments
500 % */
501 struct mdrpc_upd_sr_flags_args {
502 	md_setkey_t	*cl_sk;
503 	mdsetname_t	*sp;
504 	u_int		new_flags;
505 };
506 
507 %
508 %/*
509 % * svm rpc version 2 arguments
510 % * (union of all version 2 revisions)
511 % */
512 union mdrpc_upd_sr_flags_2_args switch (mdrpc_metad_args_rev rev) {
513     case MD_METAD_ARGS_REV_1:
514 	mdrpc_upd_sr_flags_args	rev1;
515     default:
516 	void;
517 };
518 
519 %
520 %/*
521 % * svm rpc version 2 (revision 1) arguments
522 % */
523 struct mdrpc_upd_nr_flags_args {
524 	md_setkey_t	*cl_sk;
525 	mdsetname_t	*sp;
526 	md_mnnode_desc	*nodedescs;
527 	u_int		flag_action;
528 	u_int		flags;
529 };
530 
531 %
532 %/*
533 % * svm rpc version 2 arguments
534 % * (union of all version 2 revisions)
535 % */
536 union mdrpc_upd_nr_flags_2_args switch (mdrpc_metad_args_rev rev) {
537     case MD_METAD_ARGS_REV_1:
538 	mdrpc_upd_nr_flags_args	rev1;
539     default:
540 	void;
541 };
542 
543 
544 struct mdrpc_setlock_res {
545 	md_setkey_t	*cl_sk;
546 	md_error_t	status;
547 };
548 
549 struct mdrpc_generic_res {
550 	md_error_t	status;
551 };
552 
553 %
554 %/*
555 % * svm rpc version 1 and version 2 (revision 1) set arguments
556 % */
557 struct mdrpc_setno_args {
558 	md_setkey_t	*cl_sk;
559 	set_t		setno;
560 };
561 
562 %
563 %/*
564 % * svm rpc version 2 set arguments
565 % * (union of all version 2 revisions)
566 % */
567 union mdrpc_setno_2_args switch (mdrpc_metad_args_rev rev) {
568     case MD_METAD_ARGS_REV_1:
569 	mdrpc_setno_args	rev1;
570     default:
571 	void;
572 };
573 
574 struct mdrpc_null_args {
575 	md_setkey_t	*cl_sk;
576 };
577 
578 %
579 %/*
580 % * svm rpc version 1 and version 2 (revision 1) arguments
581 % */
582 struct mdrpc_sp_args {
583 	md_setkey_t	*cl_sk;
584 	mdsetname_t	*sp;
585 };
586 
587 %
588 %/*
589 % * svm rpc version 2 arguments
590 % * (union of all version 2 revisions)
591 % */
592 union mdrpc_sp_2_args switch (mdrpc_metad_args_rev rev) {
593     case MD_METAD_ARGS_REV_1:
594 	mdrpc_sp_args	rev1;
595     default:
596 	void;
597 };
598 
599 %
600 %/*
601 % * svm rpc version 2 (revision 1) arguments
602 % */
603 struct mdrpc_sp_flags_args {
604 	md_setkey_t	*cl_sk;
605 	mdsetname_t	*sp;
606 	int		flags;
607 };
608 
609 %
610 %/*
611 % * svm rpc version 2 arguments
612 % * (union of all version 2 revisions)
613 % */
614 union mdrpc_sp_flags_2_args switch (mdrpc_metad_args_rev rev) {
615     case MD_METAD_ARGS_REV_1:
616 	mdrpc_sp_flags_args	rev1;
617     default:
618 	void;
619 };
620 
621 %
622 %/*
623 % * svm rpc version 1 and version 2 (revision 1) arguments
624 % */
625 struct mdrpc_updmeds_args {
626 	md_setkey_t		*cl_sk;
627 	mdsetname_t		*sp;
628 	md_h_arr_t		meds;
629 };
630 
631 %
632 %/*
633 % * svm rpc version 2 arguments
634 % * (union of all version 2 revisions)
635 % */
636 union mdrpc_updmeds_2_args switch (mdrpc_metad_args_rev rev) {
637     case MD_METAD_ARGS_REV_1:
638 	mdrpc_updmeds_args	rev1;
639     default:
640 	void;
641 };
642 
643 struct mdrpc_mnsetmaster_args {
644 	md_setkey_t	*cl_sk;
645 	mdsetname_t	*sp;
646 	md_node_nm_t	master_nodenm;
647 	int		master_nodeid;
648 };
649 
650 %
651 %/*
652 % * svm rpc version 2 arguments
653 % * (union of all version 2 revisions)
654 % */
655 union mdrpc_mnsetmaster_2_args switch (mdrpc_metad_args_rev rev) {
656     case MD_METAD_ARGS_REV_1:
657 	mdrpc_mnsetmaster_args  rev1;
658     default:
659 	void;
660 };
661 
662 /*
663  * Defines and structures to support rpc.mdcommd.
664  * RPC routines in rpc.metad will be used to suspend, resume
665  * and reinitialize the rpc.mdcommd running on that node.
666  * These actions are needed when the nodelist is changing.
667  */
668 %#define	COMMDCTL_SUSPEND	1
669 %#define	COMMDCTL_RESUME		2
670 %#define	COMMDCTL_REINIT		3
671 
672 struct mdrpc_mdcommdctl_args {
673 	int			flag_action;
674 	set_t			setno;
675 	md_mn_msgclass_t	class;
676 	int			flags;
677 };
678 
679 %
680 %
681 %/*
682 % * svm rpc version 2 arguments
683 % * (union of all version 2 revisions)
684 % */
685 union mdrpc_mdcommdctl_2_args switch (mdrpc_metad_args_rev rev) {
686     case MD_METAD_ARGS_REV_1:
687 	mdrpc_mdcommdctl_args  rev1;
688     default:
689 	void;
690 };
691 
692 %
693 %/*
694 % * svm rpc version 2 (revision 1) nodeid arguments
695 % */
696 struct mdrpc_nodeid_args {
697 	md_setkey_t	*cl_sk;
698 	mdsetname_t	*sp;
699 	int		nodeid<>;
700 };
701 
702 %
703 %/*
704 % * svm rpc version 2 nodeid arguments
705 % * (union of all version 2 revisions)
706 % */
707 union mdrpc_nodeid_2_args switch (mdrpc_metad_args_rev rev) {
708     case MD_METAD_ARGS_REV_1:
709 	mdrpc_nodeid_args 	rev1;
710     default:
711 	void;
712 };
713 
714 %
715 %/*
716 % * Defines and structures to support suspend and resume I/O
717 % * driven by a remote node.
718 % */
719 %#define	MN_SUSP_IO	1
720 %#define	MN_RES_IO	2
721 %
722 %/*
723 % * svm rpc version 2 (revision 1) mn_susp_res_io arguments
724 % * setno of 0 represents all disksets.
725 % */
726 struct mdrpc_mn_susp_res_io_args {
727 	md_setkey_t	*susp_res_l_sk;
728 	set_t		susp_res_setno;
729 	int		susp_res_cmd;
730 };
731 
732 %
733 %/*
734 % * svm rpc version 2 nodeid arguments
735 % * (union of all version 2 revisions)
736 % */
737 union mdrpc_mn_susp_res_io_2_args switch (mdrpc_metad_args_rev rev) {
738     case MD_METAD_ARGS_REV_1:
739 	mdrpc_mn_susp_res_io_args 	rev1;
740     default:
741 	void;
742 };
743 
744 #ifdef	RPC_HDR
745 %
746 %/*
747 % *	authorization info
748 % */
749 const	METAD_GID = 14;				/* magic sysadmin group */
750 #endif	/* RPC_HDR */
751 
752 %
753 %/*
754 % *	services available
755 % */
756 program METAD {
757 	version METAD_VERSION {
758 		md_error_t
759 		mdrpc_nullproc(void)				= 0;
760 
761 		mdrpc_hostname_res
762 		mdrpc_hostname(mdrpc_null_args)			= 1;
763 
764 		mdrpc_generic_res
765 		mdrpc_addhosts(mdrpc_host_args)			= 2;
766 
767 		mdrpc_generic_res
768 		mdrpc_delhosts(mdrpc_host_args)			= 3;
769 
770 		mdrpc_generic_res
771 		mdrpc_createset(mdrpc_createset_args)		= 4;
772 
773 		mdrpc_generic_res
774 		mdrpc_delset(mdrpc_sp_args)			= 5;
775 
776 		mdrpc_getset_res
777 		mdrpc_getset(mdrpc_getset_args)			= 6;
778 
779 		mdrpc_bool_res
780 		mdrpc_setnumbusy(mdrpc_setno_args)		= 7;
781 
782 		mdrpc_bool_res
783 		mdrpc_setnameok(mdrpc_sp_args)			= 8;
784 
785 		mdrpc_bool_res
786 		mdrpc_ownset(mdrpc_sp_args)			= 9;
787 
788 		mdrpc_generic_res
789 		mdrpc_adddrvs(mdrpc_drives_args)		= 10;
790 
791 		mdrpc_generic_res
792 		mdrpc_deldrvs(mdrpc_drives_args)		= 11;
793 
794 		mdrpc_generic_res
795 		mdrpc_upd_dr_dbinfo(mdrpc_drives_args)		= 12;
796 
797 		mdrpc_devinfo_res
798 		mdrpc_devinfo(mdrpc_devinfo_args)		= 13;
799 
800 		mdrpc_generic_res
801 		mdrpc_drvused(mdrpc_drvused_args)		= 14;
802 
803 		mdrpc_generic_res
804 		mdrpc_add_drv_sidenms(mdrpc_drv_sidenm_args)	= 15;
805 
806 		mdrpc_generic_res
807 		mdrpc_del_drv_sidenms(mdrpc_sp_args)		= 16;
808 
809 		mdrpc_gtimeout_res
810 		mdrpc_gtimeout(mdrpc_sp_args)			= 17;
811 
812 		mdrpc_generic_res
813 		mdrpc_stimeout(mdrpc_stimeout_args)		= 18;
814 
815 		mdrpc_generic_res
816 		mdrpc_upd_dr_flags(mdrpc_upd_dr_flags_args)	= 19;
817 
818 		mdrpc_generic_res
819 		mdrpc_upd_sr_flags(mdrpc_upd_sr_flags_args)	= 20;
820 
821 		mdrpc_setlock_res
822 		mdrpc_unlock_set(mdrpc_null_args)		= 21;
823 
824 		mdrpc_setlock_res
825 		mdrpc_lock_set(mdrpc_null_args)			= 22;
826 
827 		mdrpc_generic_res
828 		mdrpc_updmeds(mdrpc_updmeds_args)		= 23;
829 
830 		mdrpc_generic_res
831 		mdrpc_flush_internal(mdrpc_null_args)		= 24;
832 
833 	} = 1;
834 
835 	version METAD_VERSION_DEVID {
836 		md_error_t
837 		mdrpc_nullproc(void)				= 0;
838 
839 		mdrpc_hostname_res
840 		mdrpc_hostname(mdrpc_null_args)			= 1;
841 
842 		mdrpc_generic_res
843 		mdrpc_addhosts(mdrpc_host_2_args)		= 2;
844 
845 		mdrpc_generic_res
846 		mdrpc_delhosts(mdrpc_host_2_args)		= 3;
847 
848 		mdrpc_generic_res
849 		mdrpc_createset(mdrpc_createset_2_args)		= 4;
850 
851 		mdrpc_generic_res
852 		mdrpc_delset(mdrpc_sp_2_args)			= 5;
853 
854 		mdrpc_getset_res
855 		mdrpc_getset(mdrpc_getset_2_args)		= 6;
856 
857 		mdrpc_bool_res
858 		mdrpc_setnumbusy(mdrpc_setno_2_args)		= 7;
859 
860 		mdrpc_bool_res
861 		mdrpc_setnameok(mdrpc_sp_2_args)		= 8;
862 
863 		mdrpc_bool_res
864 		mdrpc_ownset(mdrpc_sp_2_args)			= 9;
865 
866 		mdrpc_generic_res
867 		mdrpc_adddrvs(mdrpc_drives_2_args)		= 10;
868 
869 		mdrpc_generic_res
870 		mdrpc_deldrvs(mdrpc_drives_2_args)		= 11;
871 
872 		mdrpc_generic_res
873 		mdrpc_upd_dr_dbinfo(mdrpc_drives_2_args)	= 12;
874 
875 		mdrpc_devinfo_2_res
876 		mdrpc_devinfo(mdrpc_devinfo_2_args)		= 13;
877 
878 		mdrpc_generic_res
879 		mdrpc_drvused(mdrpc_drvused_2_args)		= 14;
880 
881 		mdrpc_generic_res
882 		mdrpc_add_drv_sidenms(mdrpc_drv_sidenm_2_args)	= 15;
883 
884 		mdrpc_generic_res
885 		mdrpc_del_drv_sidenms(mdrpc_sp_2_args)		= 16;
886 
887 		mdrpc_gtimeout_res
888 		mdrpc_gtimeout(mdrpc_sp_2_args)			= 17;
889 
890 		mdrpc_generic_res
891 		mdrpc_stimeout(mdrpc_stimeout_2_args)		= 18;
892 
893 		mdrpc_generic_res
894 		mdrpc_upd_dr_flags(mdrpc_upd_dr_flags_2_args)	= 19;
895 
896 		mdrpc_generic_res
897 		mdrpc_upd_sr_flags(mdrpc_upd_sr_flags_2_args)	= 20;
898 
899 		mdrpc_setlock_res
900 		mdrpc_unlock_set(mdrpc_null_args)		= 21;
901 
902 		mdrpc_setlock_res
903 		mdrpc_lock_set(mdrpc_null_args)			= 22;
904 
905 		mdrpc_generic_res
906 		mdrpc_updmeds(mdrpc_updmeds_2_args)		= 23;
907 
908 		mdrpc_generic_res
909 		mdrpc_flush_internal(mdrpc_null_args)		= 24;
910 
911 		mdrpc_devid_res
912 		mdrpc_devid(mdrpc_devid_2_args)			= 25;
913 
914 		mdrpc_devinfo_2_res
915 		mdrpc_devinfo_by_devid(mdrpc_devidstr_args)	= 26;
916 
917 		mdrpc_generic_res
918 		mdrpc_resnarf_set(mdrpc_setno_2_args)		= 27;
919 
920 		mdrpc_generic_res
921 		mdrpc_mncreateset(mdrpc_mncreateset_2_args)	= 28;
922 
923 		mdrpc_mngetset_res
924 		mdrpc_mngetset(mdrpc_getset_2_args)		= 29;
925 
926 		mdrpc_generic_res
927 		mdrpc_mnsetmaster(mdrpc_mnsetmaster_2_args)	= 30;
928 
929 		mdrpc_generic_res
930 		mdrpc_joinset(mdrpc_sp_flags_2_args)		= 31;
931 
932 		mdrpc_generic_res
933 		mdrpc_withdrawset(mdrpc_sp_2_args)		= 32;
934 
935 		mdrpc_generic_res
936 		mdrpc_upd_nr_flags(mdrpc_upd_nr_flags_2_args)	= 33;
937 
938 		mdrpc_bool_res
939 		mdrpc_mn_is_stale(mdrpc_setno_2_args)		= 34;
940 
941 		mdrpc_generic_res
942 		mdrpc_mdcommdctl(mdrpc_mdcommdctl_2_args)	= 35;
943 
944 		mdrpc_generic_res
945 		mdrpc_clr_mnsetlock(mdrpc_null_args)		= 36;
946 
947 		mdrpc_getdrivedesc_res
948 		mdrpc_getdrivedesc(mdrpc_sp_2_args)		= 37;
949 
950 		mdrpc_generic_res
951 		mdrpc_upd_dr_reconfig(mdrpc_upd_dr_flags_2_args) = 38;
952 
953 		mdrpc_generic_res
954 		mdrpc_reset_mirror_owner(mdrpc_nodeid_2_args)	 = 39;
955 
956 		mdrpc_generic_res
957 		mdrpc_mn_susp_res_io(mdrpc_mn_susp_res_io_2_args) = 40;
958 
959 		mdrpc_generic_res
960 		mdrpc_mn_mirror_resync_all(mdrpc_setno_2_args) = 41;
961 
962 		mdrpc_devinfo_2_res
963 		mdrpc_devinfo_by_devid_name(mdrpc_devid_name_2_args) = 42;
964 
965 		mdrpc_generic_res
966 		mdrpc_mn_sp_update_abr(mdrpc_setno_2_args) = 43;
967 
968 		mdrpc_generic_res
969 		mdrpc_imp_adddrvs(mdrpc_drives_2_args) = 44;
970 
971 	} = 2;
972 } = 100229;
973 
974 #ifdef RPC_HDR
975 %
976 %extern	void	short_circuit_getset(mdrpc_getset_args *args,
977 %		    mdrpc_getset_res *res);
978 %extern	void	short_circuit_mngetset(mdrpc_getset_args *args,
979 %		    mdrpc_mngetset_res *res);
980 #endif	/* RPC_HDR */
981