Lines Matching defs:class

308  * timeout_initiator(set, class)
322 timeout_initiator(set_t setno, md_mn_msgclass_t class)
332 "timeout_initiator set = %d, class = %d\n", setno, class);
334 transp = mdmn_get_initiator_table_transp(setno, class);
335 mdmn_get_initiator_table_id(setno, class, &mid);
350 mdmn_unregister_initiator_table(setno, class);
365 * It'll keep checking all class/set combinations for outstanding messages.
380 md_mn_msgclass_t class;
388 for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES;
389 class++) {
390 mx = mdmn_get_initiator_table_mx(setno, class);
395 mdmn_get_initiator_table_time(setno, class);
397 timeout_initiator(setno, class);
526 md_mn_msgclass_t class;
570 for (class = 0; class < MD_MN_NCLASSES; class++) {
571 mdmn_unregister_initiator_table(set, class);
754 int class;
772 for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES; class++) {
774 class), USYNC_THREAD, NULL);
775 (void) cond_init(mdmn_get_master_table_cv(setno, class),
778 class), USYNC_THREAD, NULL);
872 for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES; class++) {
873 (void) mutex_init(&(mct_mutex[setno][class]),
1015 md_mn_msgclass_t class;
1021 class = mdmn_get_message_class(msg->msg_type);
1029 mx = mdmn_get_initiator_table_mx(setno, class);
1033 * Here we check, if the initiator table slot for this set/class
1038 success = mdmn_check_initiator_table(setno, class);
1042 mdmn_get_initiator_table_id(setno, class, &active_mid);
1046 "(%d, 0x%llx-%d), set=%d, class=%d, type=%d, "
1048 MSGID_ELEMS(msg->msg_msgid), setno, class,
1053 "set=%d, class=%d, type=%d\n",
1054 MSGID_ELEMS(msg->msg_msgid), setno, class, msg->msg_type);
1109 mdmn_register_initiator_table(setno, class, msg, transp);
1172 md_mn_msgclass_t class;
1184 class = mdmn_get_message_class(msg->msg_type);
1191 (void) mutex_lock(&mct_mutex[setno][class]);
1204 (void) mutex_unlock(&mct_mutex[setno][class]);
1214 (void) mutex_lock(&mct_mutex[setno][class]);
1226 (void) mutex_unlock(&mct_mutex[setno][class]);
1234 (void) mutex_unlock(&mct_mutex[setno][class]);
1265 md_mn_msgclass_t class;
1270 class = mdmn_get_message_class(msgtype);
1271 mx = mdmn_get_master_table_mx(setno, class);
1272 cv = mdmn_get_master_table_cv(setno, class);
1360 * If the class is locked on the other node, keep trying.
1426 "timeout occured, set=%d, class=%d, "
1428 setno, class, MSGID_ELEMS(msg->msg_msgid), timeout_retries);
1442 "commd signalled, set=%d, class=%d, "
1444 setno, class, MSGID_ELEMS(msg->msg_msgid));
1448 "class=%d, msgid=(%d, 0x%llx-%d)\n",
1449 err, setno, class,
1482 md_mn_msgclass_t orig_class; /* class of the original message */
1483 md_mn_msgclass_t class; /* class of the current message */
1499 "proc_mas: received (%d, 0x%llx-%d) set=%d, class=%d, type=%d\n",
1548 * to the initiator and do not unbusy the set/class,
1550 * which has the same set/class combination
1592 * The logged message has to have the same class but
1632 /* need the original class set in msgID (for MCT) */
1659 class = mdmn_get_message_class(msgtype);
1661 mx = mdmn_get_master_table_mx(setno, class);
1668 commd_debug(MD_MMV_PROC_M, "class=%d, orig_class=%d\n",
1669 class, orig_class);
1671 * If the current class is different from the original class,
1673 * The original class is already marked busy.
1675 * class is busy right now, so we wait until the class becomes
1679 * Granularity could be finer (setno/class)
1681 if (class != orig_class) {
1683 while (mdmn_mark_class_busy(setno, class) == FALSE) {
1697 * if appropriate, unbusy the class and
1700 if (class != orig_class) {
1703 mdmn_mark_class_unbusy(setno, class);
1716 /* if appropriate, unbusy the class */
1717 if (class != orig_class) {
1719 mdmn_mark_class_unbusy(setno, class);
1731 * Access is protected by the class lock: mdmn_mark_class_busy()
1733 mdmn_set_master_table_id(setno, class, &(cmsg->msg_msgid));
1764 mdmn_set_master_table_addr(setno, class, nid);
1781 mdmn_get_master_table_res(setno, class);
1880 /* release the current class again */
1881 if (class != orig_class) {
1883 mdmn_mark_class_unbusy(setno, class);
1914 * messages are sent for the same class, the registeration is
2014 md_mn_msgclass_t class;
2033 class = mdmn_get_message_class(msgtype);
2036 "proc_sla: received (%d, 0x%llx-%d) set=%d, class=%d, type=%d\n",
2037 MSGID_ELEMS(msg->msg_msgid), setno, class, msgtype);
2051 (void) mutex_lock(&mct_mutex[setno][class]);
2067 (void) mutex_unlock(&mct_mutex[setno][class]);
2074 (void) mutex_lock(&mct_mutex[setno][class]);
2090 (void) mutex_unlock(&mct_mutex[setno][class]);
2105 (void) mutex_unlock(&mct_mutex[setno][class]);
2199 md_mn_msgclass_t class;
2206 class = mdmn_get_message_class(msg->msg_type);
2224 "send: received (%d, 0x%llx-%d), set=%d, class=%d, type=%d\n",
2225 MSGID_ELEMS(msg->msg_msgid), setno, class, msg->msg_type);
2278 "send: type locked (%d, 0x%llx-%d), set=%d, class=%d, "
2279 "type=%d\n", MSGID_ELEMS(msg->msg_msgid), setno, class,
2312 if ((mdmn_is_class_suspended(setno, class) == TRUE) &&
2321 "send: class suspended (%d, 0x%llx-%d), set=%d, "
2322 "class=%d, type=%d\n", MSGID_ELEMS(msg->msg_msgid),
2323 setno, class, msg->msg_type);
2333 "class=%d, type=%d\n", MSGID_ELEMS(msg->msg_msgid),
2334 setno, class, msg->msg_type);
2379 md_mn_msgclass_t class;
2408 class = mdmn_get_message_class(msg->msg_type);
2438 "work: received (%d, 0x%llx-%d), set=%d, class=%d, type=%d, "
2440 MSGID_ELEMS(msg->msg_msgid), setno, class, msg->msg_type,
2448 /* for now we ignore set / class in md_mn_verbose_t */
2456 /* check if class is locked via a call to mdmn_comm_lock_svc_2 */
2457 if (mdmn_is_class_locked(setno, class) == TRUE) {
2465 /* Check if the class is busy right now. Do it only on the master */
2470 * If the class is currently suspended, don't accept new
2474 if ((mdmn_is_class_suspended(setno, class) == TRUE) &&
2483 if (mdmn_mark_class_busy(setno, class) == FALSE) {
2515 "work: done (%d, 0x%llx-%d), set=%d, class=%d, type=%d\n",
2516 MSGID_ELEMS(msg->msg_msgid), setno, class, msg->msg_type);
2533 md_mn_msgclass_t class;
2572 class = mdmn_get_message_class(res->mmr_msgtype);
2573 mx = mdmn_get_initiator_table_mx(setno, class);
2576 "wake_ini: received (%d, 0x%llx-%d) set=%d, class=%d, type=%d\n",
2577 MSGID_ELEMS(res->mmr_msgid), setno, class, res->mmr_msgtype);
2587 mdmn_get_initiator_table_id(setno, class, &initiator_table_id);
2590 transp = mdmn_get_initiator_table_transp(setno, class);
2593 mdmn_unregister_initiator_table(setno, class);
2638 md_mn_msgclass_t class;
2651 class = mdmn_get_message_class(res->mmr_msgtype);
2683 "wake_mas: received (%d, 0x%llx-%d) set=%d, class=%d, type=%d "
2685 MSGID_ELEMS(res->mmr_msgid), setno, class, res->mmr_msgtype,
2691 mx = mdmn_get_master_table_mx(setno, class);
2692 cv = mdmn_get_master_table_cv(setno, class);
2702 mdmn_get_master_table_id(setno, class, &master_table_id);
2703 sender = mdmn_get_master_table_addr(setno, class);
2707 mdmn_set_master_table_res(setno, class, res);
2736 * Lock a set/class combination.
2738 * This set/class combination immediately is blocked,
2741 * set/class combination.
2743 * Special messages of class MD_MSG_CLASS0 can never be locked.
2750 * class can be:
2752 * or one specific class (< MD_MN_NCLASSES)
2755 * MDMNE_ACK on sucess (locking a locked class is Ok)
2765 md_mn_msgclass_t class = msc->msc_class;
2783 (class < MD_MSG_CLASS0) || (class >= MD_MN_NCLASSES)) {
2788 commd_debug(MD_MMV_MISC, "lock: set=%d, class=%d\n", setno, class);
2790 if (class != MD_MSG_CLASS0) {
2791 mdmn_mark_class_locked(setno, class);
2794 for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES; class++) {
2795 mdmn_mark_class_locked(setno, class);
2805 * Unlock a set/class combination.
2807 * class can be:
2809 * or one specific class (< MD_MN_NCLASSES)
2812 * MDMNE_ACK on sucess (unlocking an unlocked class is Ok)
2821 md_mn_msgclass_t class = msc->msc_class;
2839 (class < MD_MSG_CLASS0) || (class >= MD_MN_NCLASSES)) {
2843 commd_debug(MD_MMV_MISC, "unlock: set=%d, class=%d\n", setno, class);
2846 if (class != MD_MSG_CLASS0) {
2847 mdmn_mark_class_unlocked(setno, class);
2850 for (class = MD_MSG_CLASS1; class < MD_MN_NCLASSES; class++) {
2851 mdmn_mark_class_unlocked(setno, class);
2861 * mdmn_comm_suspend_svc_2(setno, class)
2863 * Drain all outstanding messages for a given set/class combination
2866 * Special messages of class MD_MSG_CLASS0 can never be locked.
2870 * 1 <= class < MD_MN_NCLASSES or class == MD_COMM_ALL_CLASSES
2872 * If class _is_not_ MD_COMM_ALL_CLASSES, then we simply mark this
2873 * one class as being suspended.
2874 * If messages for this class are currently on their way,
2877 * If class _is_ MD_COMM_ALL_CLASSES we drain all classes of this set.
2879 * This means, a message cannot create submessages with the same or lower class.
2882 * We mark class 1 as being suspended.
2883 * if the class is not busy, we proceed with class 2
2885 * if a class *is* busy, we cannot continue here, but return
2888 * When that message, that held the class busy is done in
2890 * There it is checked if the class is about to drain.
2917 md_mn_msgclass_t class;
2933 commd_debug(MD_MMV_MISC, "suspend: called for set=%d class=%d\n",
2961 for (class = 1; class < MD_MN_NCLASSES; class ++) {
2963 "suspend: suspending set %d, class %d\n",
2964 setno, class);
2966 class, MDMN_SUSPEND_ALL);
2972 /* only drain one specific class */
2974 "suspend: suspending set=%d class=%d\n",
2997 * mdmn_comm_resume_svc_2(setno, class)
3003 * 1 <= class < MD_MN_NCLASSES or class == MD_COMM_ALL_CLASSES
3005 * If class _is_not_ MD_COMM_ALL_CLASSES, then we simply mark this
3006 * one class as being resumed.
3008 * If class _is_ MD_COMM_ALL_CLASSES we resume all classes of this set.
3012 * If both setno is MD_COMM_ALL_SETS and class is MD_COMM_ALL_CLASSES we also
3029 md_mn_msgclass_t class;
3045 commd_debug(MD_MMV_MISC, "resume: called for set=%d class=%d\n",
3094 for (class = MD_MN_NCLASSES - 1; class >= end_class;
3095 class --) {
3097 "resume: resuming set=%d class=%d\n",
3098 setno, class);
3099 mdmn_mark_class_resumed(setno, class,
3104 * In this case only one class is marked as not
3106 * this set, this class will still be suspended.
3111 "resume: resuming set=%d class=%d\n",