// SPDX-License-Identifier: GPL-2.0-only /****************************************************************************** ******************************************************************************* ** ** Copyright (C) 2005-2007 Red Hat, Inc. All rights reserved. ** ** *******************************************************************************
******************************************************************************/
/* * 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, conststruct dlm_message *ms)
{ struct rq_entry *e; int length = le16_to_cpu(ms->m_header.h_length) - sizeof(struct dlm_message);
e = kmalloc(sizeof(struct rq_entry) + length, GFP_ATOMIC); if (!e) {
log_print("dlm_add_requestqueue: out of memory len %d", length); return;
}
/* * Called by dlm_recoverd to process normal messages saved while recovery was * happening. Normal locking has been enabled before this is called. dlm_recv * upon receiving a message, will wait for all saved messages to be drained * here before processing the message it got. If a new dlm_ls_stop() arrives * while we're processing these saved messages, it may block trying to suspend * dlm_recv if dlm_recv is waiting for us in dlm_wait_requestqueue. In that * case, we don't abort since locking_stopped is still 0. If dlm_recv is not * waiting for us, then this processing may be aborted due to locking_stopped.
*/
int dlm_process_requestqueue(struct dlm_ls *ls)
{ struct rq_entry *e; struct dlm_message *ms; int error = 0;
write_lock_bh(&ls->ls_requestqueue_lock); for (;;) { if (list_empty(&ls->ls_requestqueue)) {
clear_bit(LSFL_RECV_MSG_BLOCKED, &ls->ls_flags);
error = 0; break;
}
e = list_first_entry(&ls->ls_requestqueue, struct rq_entry, list);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.