/* Requests received while the lockspace is in recovery get added to the request queue and processed when recovery is complete. This happens when the lockspace is suspended on some nodes before it is on others, or the lockspace is enabled on some while still suspended on others.  */
void dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_message *ms)
/* Requests received while the lockspace is in recovery get added to the request queue and processed when recovery is complete. This happens when the lockspace is suspended on some nodes before it is on others, or the lockspace is enabled on some while still suspended on others.  */
void dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_message *ms)
{
	struct rq_entry *e;
	int length = ms->m_header.h_length - sizeof(struct dlm_message);
	e = kmalloc(sizeof(struct rq_entry) + length, GFP_NOFS);
	if (!e) {
		log_print("dlm_add_requestqueue: out of memory len %d", length);
		return;
	}
	e->nodeid = nodeid;
	memcpy(&e->request, ms, ms->m_header.h_length);
	mutex_lock(&ls->ls_requestqueue_mutex);
	list_add_tail(&e->list, &ls->ls_requestqueue);
	mutex_unlock(&ls->ls_requestqueue_mutex);
}