Lines Matching defs:mh

289 	struct dlm_mhandle *mh = container_of(rcu, struct dlm_mhandle, rcu);
291 dlm_lowcomms_put_msg(mh->msg);
292 dlm_free_mhandle(mh);
296 struct dlm_mhandle *mh)
298 list_del_rcu(&mh->list);
300 call_rcu(&mh->rcu, dlm_mhandle_release);
305 struct dlm_mhandle *mh;
311 list_for_each_entry_rcu(mh, &node->send_queue, list) {
312 dlm_mhandle_delete(node, mh);
429 struct dlm_mhandle *mh;
432 mh = dlm_midcomms_get_mhandle(node->nodeid, mb_len, GFP_ATOMIC, &ppc);
433 if (!mh)
437 mh->ack_rcv = ack_rcv;
447 dlm_midcomms_commit_mhandle(mh, NULL, 0);
454 struct dlm_mhandle *mh;
457 list_for_each_entry_rcu(mh, &node->send_queue, list) {
458 if (before(mh->seq, seq)) {
459 if (mh->ack_rcv)
460 mh->ack_rcv(node);
468 list_for_each_entry_rcu(mh, &node->send_queue, list) {
469 if (before(mh->seq, seq)) {
470 dlm_mhandle_delete(node, mh);
923 struct dlm_mhandle *mh;
943 list_for_each_entry_rcu(mh, &node->send_queue, list) {
944 if (!mh->committed)
947 ret = dlm_lowcomms_resend_msg(mh->msg);
950 mh->seq, node->nodeid);
968 struct dlm_mhandle *mh = data;
970 atomic_inc(&mh->node->send_queue_cnt);
972 spin_lock_bh(&mh->node->send_queue_lock);
973 list_add_tail_rcu(&mh->list, &mh->node->send_queue);
974 spin_unlock_bh(&mh->node->send_queue_lock);
976 mh->seq = atomic_fetch_inc(&mh->node->seq_send);
979 static struct dlm_msg *dlm_midcomms_get_msg_3_2(struct dlm_mhandle *mh, int nodeid,
986 allocation, ppc, midcomms_new_msg_cb, mh);
991 mh->opts = opts;
994 dlm_fill_opts_header(opts, len, mh->seq);
997 mh->inner_p = (const union dlm_packet *)*ppc;
1009 struct dlm_mhandle *mh;
1021 mh = dlm_allocate_mhandle(allocation);
1022 if (!mh)
1025 mh->committed = false;
1026 mh->ack_rcv = NULL;
1027 mh->idx = idx;
1028 mh->node = node;
1035 dlm_free_mhandle(mh);
1044 msg = dlm_midcomms_get_msg_3_2(mh, nodeid, len, allocation,
1047 dlm_free_mhandle(mh);
1052 dlm_free_mhandle(mh);
1057 mh->msg = msg;
1061 * nodes_srcu using mh->idx which is assumed
1064 return mh;
1072 static void dlm_midcomms_commit_msg_3_2_trace(const struct dlm_mhandle *mh,
1075 switch (mh->inner_p->header.h_cmd) {
1077 trace_dlm_send_message(mh->node->nodeid, mh->seq,
1078 &mh->inner_p->message,
1082 trace_dlm_send_rcom(mh->node->nodeid, mh->seq,
1083 &mh->inner_p->rcom);
1091 static void dlm_midcomms_commit_msg_3_2(struct dlm_mhandle *mh,
1095 mh->opts->o_nextcmd = mh->inner_p->header.h_cmd;
1096 mh->committed = true;
1097 dlm_midcomms_commit_msg_3_2_trace(mh, name, namelen);
1098 dlm_lowcomms_commit_msg(mh->msg);
1105 void dlm_midcomms_commit_mhandle(struct dlm_mhandle *mh,
1109 switch (mh->node->version) {
1111 srcu_read_unlock(&nodes_srcu, mh->idx);
1113 dlm_lowcomms_commit_msg(mh->msg);
1114 dlm_lowcomms_put_msg(mh->msg);
1115 /* mh is not part of rcu list in this case */
1116 dlm_free_mhandle(mh);
1125 dlm_midcomms_commit_msg_3_2(mh, name, namelen);
1126 srcu_read_unlock(&nodes_srcu, mh->idx);
1130 srcu_read_unlock(&nodes_srcu, mh->idx);