1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #pragma ident "%Z%%M% %I% %E% SMI" 27 28 #include <meta.h> 29 30 extern void mdmn_do_cmd(HANDLER_PARMS); 31 extern void mdmn_do_clu(HANDLER_PARMS); 32 extern void mdmn_do_req_owner(HANDLER_PARMS); 33 extern void mdmn_do_susp_write(HANDLER_PARMS); 34 extern void mdmn_do_state_upd_reswr(HANDLER_PARMS); 35 extern void mdmn_do_allocate_hotspare(HANDLER_PARMS); 36 extern void mdmn_do_poke_hotspares(HANDLER_PARMS); 37 extern void mdmn_do_resync(HANDLER_PARMS); 38 extern void mdmn_do_setsync(HANDLER_PARMS); 39 extern void mdmn_do_choose_owner(HANDLER_PARMS); 40 extern void mdmn_do_change_owner(HANDLER_PARMS); 41 extern void mdmn_do_set_cap(HANDLER_PARMS); 42 extern void mdmn_do_dummy(HANDLER_PARMS); 43 extern void mdmn_do_mddb_parse(HANDLER_PARMS); 44 extern void mdmn_do_mddb_block(HANDLER_PARMS); 45 extern void mdmn_do_sm_mddb_attach(HANDLER_PARMS); 46 extern void mdmn_do_sm_mddb_detach(HANDLER_PARMS); 47 extern void mdmn_do_meta_db_newside(HANDLER_PARMS); 48 extern void mdmn_do_meta_db_delside(HANDLER_PARMS); 49 extern void mdmn_do_meta_md_addside(HANDLER_PARMS); 50 extern void mdmn_do_meta_md_delside(HANDLER_PARMS); 51 extern void mdmn_do_mddb_optrecerr(HANDLER_PARMS); 52 extern void mdmn_do_iocset(HANDLER_PARMS); 53 extern void mdmn_do_sp_setstat(HANDLER_PARMS); 54 extern void mdmn_do_addkeyname(HANDLER_PARMS); 55 extern void mdmn_do_delkeyname(HANDLER_PARMS); 56 extern void mdmn_do_get_tstate(HANDLER_PARMS); 57 extern void mdmn_do_get_mirstate(HANDLER_PARMS); 58 extern void mdmn_do_addmdname(HANDLER_PARMS); 59 60 extern int mdmn_smgen_test6(SMGEN_PARMS); 61 extern int mdmn_smgen_state_upd(SMGEN_PARMS); 62 extern int mdmn_smgen_mddb_attach(SMGEN_PARMS); 63 extern int mdmn_smgen_mddb_detach(SMGEN_PARMS); 64 65 md_mn_msg_tbl_entry_t msg_table[MD_MN_NMESSAGES] = { 66 67 /* 68 * In order to have fast direct access to the table, we use the message type as 69 * an index into it. 70 * Thus the order of the elements in this table MUST match the order of the 71 * message types specified in mdmn_commd.x! 72 * See the definition of md_mn_msg_t. 73 * 74 * Be careful and do not disturb the order of the messages! 75 */ 76 { 77 /* MD_MN_MSG_NULL */ 78 MD_MSG_CLASS0, /* message class */ 79 NULL, /* message handler */ 80 NULL, /* submessage generator */ 81 1, /* timeout in seconds */ 82 0, 0, /* class busy retry / time delta */ 83 0, 0 /* comm fail retry / time delta */ 84 }, 85 86 { 87 /* MD_MN_MSG_TEST1 */ 88 MD_MSG_CLASS1, /* message class */ 89 mdmn_do_dummy, /* message handler */ 90 NULL, /* submessage generator */ 91 1, /* timeout in seconds */ 92 200, 4, /* class busy retry / time delta */ 93 10, 100 /* comm fail retry / time delta */ 94 }, 95 96 { 97 /* MD_MN_MSG_TEST2 */ 98 MD_MSG_CLASS2, /* message class */ 99 mdmn_do_dummy, /* message handler */ 100 NULL, /* submessage generator */ 101 1, /* timeout in seconds */ 102 200, 4, /* class busy retry / time delta */ 103 10, 100 /* comm fail retry / time delta */ 104 }, 105 106 { 107 /* MD_MN_MSG_TEST3 */ 108 MD_MSG_CLASS3, /* message class */ 109 mdmn_do_dummy, /* message handler */ 110 NULL, /* submessage generator */ 111 1, /* timeout in seconds */ 112 200, 4, /* class busy retry / time delta */ 113 10, 100 /* comm fail retry / time delta */ 114 }, 115 116 { 117 /* MD_MN_MSG_TEST4 */ 118 MD_MSG_CLASS4, /* message class */ 119 mdmn_do_dummy, /* message handler */ 120 NULL, /* submessage generator */ 121 1, /* timeout in seconds */ 122 200, 4, /* class busy retry / time delta */ 123 10, 100 /* comm fail retry / time delta */ 124 }, 125 126 { 127 /* MD_MN_MSG_TEST5 */ 128 MD_MSG_CLASS5, /* message class */ 129 mdmn_do_dummy, /* message handler */ 130 NULL, /* submessage generator */ 131 4, /* timeout in seconds */ 132 200, 4, /* class busy retry / time delta */ 133 10, 100 /* comm fail retry / time delta */ 134 }, 135 136 { 137 /* MD_MN_MSG_TEST6 */ 138 MD_MSG_CLASS1, /* message class */ 139 NULL, /* message handler */ 140 mdmn_smgen_test6, /* submessage generator */ 141 1, /* timeout in seconds */ 142 200, 4, /* class busy retry / time delta */ 143 10, 100 /* comm fail retry / time delta */ 144 }, 145 146 { 147 /* 148 * MD_MN_MSG_CMD 149 * Send a command string to all nodes 150 */ 151 MD_MSG_CLASS1, /* message class */ 152 mdmn_do_cmd, /* message handler */ 153 NULL, /* submessage generator */ 154 90, /* times out in 90 secs */ 155 40, 20, /* class busy retry / time delta */ 156 10, 1000 /* comm fail retry / time delta */ 157 }, 158 159 { 160 /* 161 * MD_MN_MSG_CMD_RETRY 162 * Send a command string to all nodes and retry on busy 163 */ 164 MD_MSG_CLASS1, /* message class */ 165 mdmn_do_cmd, /* message handler */ 166 NULL, /* submessage generator */ 167 90, /* times out in 90 secs */ 168 100000, 20, /* class busy retry / time delta */ 169 10, 1000 /* comm fail retry / time delta */ 170 }, 171 172 { 173 /* MD_MN_MSG_CLU_CHECK */ 174 MD_MSG_CLASS2, /* message class */ 175 mdmn_do_clu, /* message handler */ 176 NULL, /* submessage generator */ 177 5, /* timeout in seconds */ 178 10000, 2, /* class busy retry / time delta */ 179 0, 0 /* comm fail retry / time delta */ 180 }, 181 182 { 183 /* MD_MN_MSG_CLU_LOCK */ 184 MD_MSG_CLASS2, /* message class */ 185 mdmn_do_clu, /* message handler */ 186 NULL, /* submessage generator */ 187 1, /* timeout in seconds */ 188 10000, 2, /* class busy retry / time delta */ 189 0, 0 /* comm fail retry / time delta */ 190 }, 191 192 { 193 /* MD_MN_MSG_CLU_UNLOCK */ 194 MD_MSG_CLASS2, /* message class */ 195 mdmn_do_clu, /* message handler */ 196 NULL, /* submessage generator */ 197 1, /* timeout in seconds */ 198 10000, 2, /* class busy retry / time delta */ 199 0, 0 /* comm fail retry / time delta */ 200 }, 201 202 { 203 /* MD_MN_MSG_REQUIRE_OWNER */ 204 MD_MSG_CLASS5, /* message class */ 205 mdmn_do_req_owner, /* message handler */ 206 NULL, /* submessage generator */ 207 12, /* timeout in seconds */ 208 UINT_MAX, 10, /* class busy retry / time delta */ 209 UINT_MAX, 100 /* comm fail retry / time delta */ 210 }, 211 212 { 213 /* 214 * MD_MN_MSG_CHOOSE_OWNER 215 * Using the current resync count for the set, choose a resync 216 * owner and send a CHANGE_OWNER message to request that node 217 * to make itself the owner 218 */ 219 MD_MSG_CLASS3, /* message class */ 220 mdmn_do_choose_owner, /* message handler */ 221 NULL, /* submessage generator */ 222 12, /* timeout in seconds */ 223 UINT_MAX, 10, /* class busy retry / time delta */ 224 UINT_MAX, 100 /* comm fail retry / time delta */ 225 }, 226 227 { 228 /* 229 * MD_MN_MSG_CHANGE_OWNER 230 * Request a change of ownership to the specified node 231 */ 232 MD_MSG_CLASS4, /* message class */ 233 mdmn_do_change_owner, /* message handler */ 234 NULL, /* submessage generator */ 235 12, /* timeout in seconds */ 236 UINT_MAX, 10, /* class busy retry / time delta */ 237 UINT_MAX, 100 /* comm fail retry / time delta */ 238 }, 239 240 { 241 /* 242 * MD_MN_MSG_SUSPEND_WRITES 243 * Suspend all writes to the specified mirror 244 */ 245 MD_MSG_CLASS6, /* message class */ 246 mdmn_do_susp_write, /* message handler */ 247 NULL, /* submessage generator */ 248 8, /* timeout in seconds */ 249 UINT_MAX, 10, /* class busy retry / time delta */ 250 200, 100 /* comm fail retry / time delta */ 251 }, 252 253 { 254 /* 255 * MD_MN_MSG_STATE_UPDATE_RESWR 256 * Update the state of a mirror component 257 */ 258 MD_MSG_CLASS1, /* message class */ 259 mdmn_do_state_upd_reswr, /* message handler */ 260 NULL, /* submessage generator */ 261 8, /* timeout in seconds */ 262 UINT_MAX, 10, /* class busy retry / time delta */ 263 UINT_MAX, 100 /* comm fail retry / time delta */ 264 }, 265 266 { 267 /* 268 * MD_MN_MSG_STATE_UPDATE 269 * Suspend writes to a mirror and then update the state of a 270 * mirror component 271 */ 272 MD_MSG_CLASS1, /* message class */ 273 NULL, /* message handler */ 274 mdmn_smgen_state_upd, /* submessage generator */ 275 16, /* SUSPEND_WRITES + STATE_UPDATE_RESWR */ 276 UINT_MAX, 10, /* class busy retry / time delta */ 277 UINT_MAX, 100 /* comm fail retry / time delta */ 278 }, 279 280 { 281 /* 282 * MD_MN_MSG_ALLOCATE_HOTSPARE 283 * Allocate a hotspare for a mirror component 284 */ 285 MD_MSG_CLASS1, /* message class */ 286 mdmn_do_allocate_hotspare, /* message handler */ 287 NULL, /* submessage generator */ 288 8, /* timeout in seconds */ 289 UINT_MAX, 10, /* class busy retry / time delta */ 290 UINT_MAX, 100 /* comm fail retry / time delta */ 291 }, 292 293 { 294 /* 295 * MD_MN_MSG_RESYNC_STARTING 296 * Start a resync thread for the specified mirror 297 */ 298 MD_MSG_CLASS2, /* message class */ 299 mdmn_do_resync, /* message handler */ 300 NULL, /* submessage generator */ 301 8, /* timeout in seconds */ 302 UINT_MAX, 10, /* class busy retry / time delta */ 303 UINT_MAX, 100 /* comm fail retry / time delta */ 304 }, 305 306 { 307 /* 308 * MD_MN_MSG_RESYNC_NEXT 309 * Send the next region to be resyned to all nodes. For ABR 310 * mirrors, the nodes must suspend all writes to this region until 311 * the next message of this type or a RESYNC_FINISH 312 */ 313 MD_MSG_CLASS2, /* message class */ 314 mdmn_do_resync, /* message handler */ 315 NULL, /* submessage generator */ 316 8, /* timeout in seconds */ 317 UINT_MAX, 10, /* class busy retry / time delta */ 318 UINT_MAX, 100 /* comm fail retry / time delta */ 319 }, 320 321 { 322 /* 323 * MD_MN_MSG_RESYNC_FINISH 324 * All resyncs for a mirror are complete, terminate resync thread 325 */ 326 MD_MSG_CLASS1, /* message class */ 327 mdmn_do_resync, /* message handler */ 328 NULL, /* submessage generator */ 329 8, /* timeout in seconds */ 330 UINT_MAX, 10, /* class busy retry / time delta */ 331 UINT_MAX, 100 /* comm fail retry / time delta */ 332 }, 333 334 { 335 /* 336 * MD_MN_MSG_RESYNC_PHASE_DONE 337 * A resync phase, optimized, submirror or component is complete 338 */ 339 MD_MSG_CLASS2, /* message class */ 340 mdmn_do_resync, /* message handler */ 341 NULL, /* submessage generator */ 342 8, /* timeout in seconds */ 343 UINT_MAX, 10, /* class busy retry / time delta */ 344 UINT_MAX, 100 /* comm fail retry / time delta */ 345 }, 346 347 { 348 /* 349 * MD_MN_MSG_SET_CAP 350 * Set the specified metadevice capability on all nodes 351 * This is used to propagate the ABR capability 352 */ 353 MD_MSG_CLASS1, /* message class */ 354 mdmn_do_set_cap, /* message handler */ 355 NULL, /* submessage generator */ 356 8, /* timeout in seconds */ 357 100000, 10, /* class busy retry/ time delta */ 358 200, 100 /* comm fail retry / time delta */ 359 }, 360 361 { 362 /* MD_MN_MSG_VERBOSITY */ 363 MD_MSG_CLASS0, /* special message class */ 364 mdmn_do_dummy, /* dummy handler */ 365 NULL, /* submessage generator */ 366 1, /* timeout in seconds */ 367 0, 0, /* No retries for class busy */ 368 0, 0 /* No retries for comm fail */ 369 }, 370 371 { 372 /* 373 * MD_MN_MSG_MDDB_PARSE 374 * Message cannot fail unless node failure causes node panic 375 */ 376 MD_MSG_CLASS7, /* message class */ 377 mdmn_do_mddb_parse, /* reparse mddb */ 378 NULL, /* submessage generator */ 379 10, /* timeout in seconds */ 380 UINT_MAX, 2, /* class busy retry / time delta */ 381 UINT_MAX, 100 /* comm fail retry / time delta */ 382 }, 383 384 { 385 /* 386 * MD_MN_MSG_MDDB_BLOCK 387 * Message cannot fail unless node failure causes node panic 388 */ 389 MD_MSG_CLASS3, /* message class */ 390 mdmn_do_mddb_block, /* block/unblock reparse */ 391 NULL, /* submessage generator */ 392 5, /* timeout in seconds */ 393 UINT_MAX, 2, /* class busy retry / time delta */ 394 UINT_MAX, 100 /* comm fail retry / time delta */ 395 }, 396 397 { 398 /* 399 * MD_MN_MSG_META_DB_ATTACH 400 */ 401 MD_MSG_CLASS3, /* message class */ 402 NULL, /* message handler */ 403 mdmn_smgen_mddb_attach, /* submessage generator */ 404 30, /* timeout in seconds */ 405 UINT_MAX, 2, /* class busy retry / time delta */ 406 10, 100 /* comm fail retry / time delta */ 407 }, 408 409 { 410 /* 411 * MD_MN_MSG_SM_MDDB_ATTACH 412 */ 413 MD_MSG_CLASS3, /* message class */ 414 mdmn_do_sm_mddb_attach, /* message handler */ 415 NULL, /* submessage generator */ 416 20, /* timeout in seconds */ 417 /* creates mddbs */ 418 UINT_MAX, 2, /* class busy retry / time delta */ 419 10, 100 /* comm fail retry / time delta */ 420 }, 421 422 { 423 /* 424 * MD_MN_MSG_META_DB_DETACH 425 */ 426 MD_MSG_CLASS3, /* message class */ 427 NULL, /* detach mddb */ 428 mdmn_smgen_mddb_detach, /* submessage generator */ 429 10, /* timeout in seconds */ 430 UINT_MAX, 2, /* class busy retry / time delta */ 431 10, 100 /* comm fail retry / time delta */ 432 }, 433 { 434 435 /* 436 * MD_MN_MSG_SM_MDDB_DETACH 437 */ 438 MD_MSG_CLASS3, /* message class */ 439 mdmn_do_sm_mddb_detach, /* detach mddb */ 440 NULL, /* submessage generator */ 441 5, /* timeout in seconds */ 442 UINT_MAX, 2, /* class busy retry / time delta */ 443 10, 100 /* comm fail retry / time delta */ 444 }, 445 446 { 447 /* 448 * MD_MN_MSG_META_DB_NEWSIDE 449 */ 450 MD_MSG_CLASS3, /* message class */ 451 mdmn_do_meta_db_newside, /* add new mddb side info */ 452 NULL, /* submessage generator */ 453 10, /* timeout in seconds */ 454 UINT_MAX, 2, /* class busy retry / time delta */ 455 10, 100 /* comm fail retry / time delta */ 456 }, 457 458 { 459 /* 460 * MD_MN_MSG_META_DB_DELSIDE 461 */ 462 MD_MSG_CLASS3, /* message class */ 463 mdmn_do_meta_db_delside, /* delete mddb side info */ 464 NULL, /* submessage generator */ 465 10, /* timeout in seconds */ 466 UINT_MAX, 2, /* class busy retry / time delta */ 467 10, 100 /* comm fail retry / time delta */ 468 }, 469 470 { 471 /* 472 * MD_MN_MSG_META_MD_ADDSIDE 473 */ 474 MD_MSG_CLASS3, /* message class */ 475 mdmn_do_meta_md_addside, /* add new md side info */ 476 NULL, /* submessage generator */ 477 10, /* timeout in seconds */ 478 UINT_MAX, 2, /* class busy retry / time delta */ 479 10, 100 /* comm fail retry / time delta */ 480 }, 481 482 { 483 /* 484 * MD_MN_MSG_META_MD_DELSIDE 485 */ 486 MD_MSG_CLASS3, /* message class */ 487 mdmn_do_meta_md_delside, /* delete md side info */ 488 NULL, /* submessage generator */ 489 10, /* timeout in seconds */ 490 UINT_MAX, 2, /* class busy retry / time delta */ 491 10, 100 /* comm fail retry / time delta */ 492 }, 493 494 { 495 /* 496 * MD_MN_MSG_MDDB_OPTRECERR 497 * Message cannot fail unless node failure causes node panic 498 */ 499 MD_MSG_CLASS3, /* message class */ 500 mdmn_do_mddb_optrecerr, /* fix opt rec mddb */ 501 NULL, /* submessage generator */ 502 3, /* timeout in seconds */ 503 UINT_MAX, 2, /* class busy retry / time delta */ 504 10, 100 /* comm fail retry / time delta */ 505 }, 506 507 { 508 /* 509 * MD_MN_MSG_ABORT 510 */ 511 MD_MSG_CLASS0, /* special message class */ 512 mdmn_do_dummy, /* dummy handler */ 513 NULL, /* submessage generator */ 514 1, /* timeout in seconds */ 515 0, 0, /* No retries for class busy */ 516 0, 0 /* No retries for comm fail */ 517 }, 518 519 { 520 /* 521 * MD_MN_MSG_STATE_UPDATE_RESWR2 522 * Update the state of a mirror component, called if during the updates 523 * of the watermarks for a softpartition, an IO error on a submirror 524 * occurs. Need to have a class different from CLASS1, otherwise we 525 * deadlock with the command that is currently being processed 526 * (metainit/metaclear/metattach/metarecover) 527 * 528 * And we may actually use a class different than CLASS1 because this 529 * can only happen when a metainit or similar is called, and in that 530 * case all potential metadb or metaset commands are blocked anyway. 531 * Besides the different class it does exactly what 532 * MD_MN_MSG_STATE_UPDATE_RESWR would do 533 */ 534 MD_MSG_CLASS3, /* message class */ 535 mdmn_do_state_upd_reswr, /* message handler */ 536 NULL, /* submessage generator */ 537 8, /* timeout in seconds */ 538 UINT_MAX, 10, /* class busy retry / time delta */ 539 UINT_MAX, 100 /* comm fail retry / time delta */ 540 }, 541 542 { 543 /* 544 * MD_MN_MSG_STATE_UPDATE2 545 * Like MD_MN_MSG_STATE_UPDATE only using a different class. 546 * See comment for MD_MN_MSG_STATE_UPDATE_RESWR2 547 */ 548 MD_MSG_CLASS3, /* message class */ 549 NULL, /* message handler */ 550 mdmn_smgen_state_upd, /* submessage generator */ 551 16, /* SUSPEND_WRITES + STATE_UPDATE_RESWR */ 552 UINT_MAX, 10, /* class busy retry / time delta */ 553 UINT_MAX, 100 /* comm fail retry / time delta */ 554 }, 555 556 { 557 /* 558 * MD_MN_MSG_ALLOCATE_HOTSPARE2 559 * Like MD_MN_MSG_ALLOCATE_HOTSPARE only using a different class. 560 * See comment for MD_MN_MSG_STATE_UPDATE_RESWR2 561 */ 562 MD_MSG_CLASS3, /* message class */ 563 mdmn_do_allocate_hotspare, /* message handler */ 564 NULL, /* submessage generator */ 565 8, /* timeout in seconds */ 566 UINT_MAX, 10, /* class busy retry / time delta */ 567 UINT_MAX, 100 /* comm fail retry / time delta */ 568 }, 569 570 { 571 /* 572 * MD_MN_MSG_IOCSET 573 * Send IOCSET ioctl to create a soft part 574 */ 575 MD_MSG_CLASS1, /* message class */ 576 mdmn_do_iocset, /* create softpart */ 577 NULL, /* submessage generator */ 578 90, /* times out in 90 secs */ 579 10000, 2, /* class busy retry / time delta */ 580 10, 1000 /* comm fail retry / time delta */ 581 }, 582 583 { 584 /* 585 * MD_MN_MSG_SP_SETSTAT 586 * Update the status of a softpart 587 */ 588 MD_MSG_CLASS1, /* message class */ 589 mdmn_do_sp_setstat, /* create softpart */ 590 NULL, /* submessage generator */ 591 90, /* times out in 90 secs */ 592 10000, 2, /* class busy retry / time delta */ 593 10, 1000 /* comm fail retry / time delta */ 594 }, 595 596 { 597 /* 598 * MD_MN_MSG_ADDKEYNAME 599 * Add a key to the namespace 600 */ 601 MD_MSG_CLASS1, /* message class */ 602 mdmn_do_addkeyname, /* add key */ 603 NULL, /* submessage generator */ 604 90, /* times out in 90 secs */ 605 10000, 2, /* class busy retry / time delta */ 606 10, 1000 /* comm fail retry / time delta */ 607 }, 608 609 { 610 /* 611 * MD_MN_MSG_SP_DELKEYNAME 612 * Remove a key from the namespace 613 */ 614 MD_MSG_CLASS1, /* message class */ 615 mdmn_do_delkeyname, /* delete key */ 616 NULL, /* submessage generator */ 617 90, /* times out in 90 secs */ 618 10000, 2, /* class busy retry / time delta */ 619 10, 1000 /* comm fail retry / time delta */ 620 }, 621 622 { 623 /* 624 * MD_MN_MSG_GET_TSTATE 625 * Get ui_tstate for a metadevice from the master. Used to get ABR 626 * state from the master node. 627 */ 628 MD_MSG_CLASS2, /* message class */ 629 mdmn_do_get_tstate, /* get tstate */ 630 NULL, /* submessage generator */ 631 5, /* times out in 5 secs */ 632 UINT_MAX, 10, /* class busy retry / time delta */ 633 UINT_MAX, 100 /* comm fail retry / time delta */ 634 }, 635 636 { 637 /* 638 * MD_MN_MSG_GET_MIRROR_STATE 639 * Get submirror state for specified submirror from master node. 640 * Used to synchronise initial resync state across a cluster. 641 */ 642 MD_MSG_CLASS1, /* message class */ 643 mdmn_do_get_mirstate, /* get smstate */ 644 NULL, /* submessage generator */ 645 5, /* times out in 5 secs */ 646 UINT_MAX, 10, /* class busy retry / time delta */ 647 UINT_MAX, 100 /* comm fail retry / time delta */ 648 }, 649 650 { 651 /* 652 * MD_MN_MSG_SP_SETSTAT2 653 * Update the status of a softpart. Used for propagating an error from 654 * the soft-part sp_error() routine 655 */ 656 MD_MSG_CLASS4, /* message class */ 657 mdmn_do_sp_setstat, /* update softpart state */ 658 NULL, /* submessage generator */ 659 90, /* times out in 90 secs */ 660 10000, 2, /* class busy retry / time delta */ 661 10, 1000 /* comm fail retry / time delta */ 662 }, 663 664 { 665 /* 666 * MD_MN_MSG_SETSYNC 667 * Start a resync thread for the specified mirror 668 */ 669 MD_MSG_CLASS1, /* message class */ 670 mdmn_do_setsync, /* message handler */ 671 NULL, /* submessage generator */ 672 90, /* timeout in seconds */ 673 10000, 2, /* class busy retry / time delta */ 674 10, 1000 /* comm fail retry / time delta */ 675 }, 676 677 { 678 /* 679 * MD_MN_MSG_POKE_HOTSPARES 680 * Call poke_hotspares() 681 */ 682 MD_MSG_CLASS1, /* message class */ 683 mdmn_do_poke_hotspares, /* message handler */ 684 NULL, /* submessage generator */ 685 8, /* timeout in seconds */ 686 UINT_MAX, 10, /* class busy retry / time delta */ 687 UINT_MAX, 100 /* comm fail retry / time delta */ 688 }, 689 690 { 691 /* 692 * MD_MN_MSG_ADDMDNAME 693 * Add metadevice name into replica 694 */ 695 MD_MSG_CLASS1, /* message class */ 696 mdmn_do_addmdname, /* add ,etadevice name */ 697 NULL, /* submessage generator */ 698 90, /* times out in 90 secs */ 699 10000, 2, /* class busy retry / time delta */ 700 10, 1000 /* comm fail retry / time delta */ 701 }, 702 }; 703