struct admin_state_code { constchar *name; /* Normal operation, data_vios may be active */ bool normal; /* I/O is draining, new requests should not start */ bool draining; /* This is a startup time operation */ bool loading; /* The next state will be quiescent */ bool quiescing; /* The VDO is quiescent, there should be no I/O */ bool quiescent; /* Whether an operation is in progress and so no other operation may be started */ bool operating;
};
struct admin_state { conststruct admin_state_code *current_state; /* The next administrative state (when the current operation finishes) */ conststruct admin_state_code *next_state; /* A completion waiting on a state change */ struct vdo_completion *waiter; /* Whether an operation is being initiated */ bool starting; /* Whether an operation has completed in the initiator */ bool complete;
};
/** * typedef vdo_admin_initiator_fn - A method to be called once an admin operation may be initiated.
*/ typedefvoid (*vdo_admin_initiator_fn)(struct admin_state *state);
/** * vdo_set_admin_state_code() - Set the current admin state code. * * This function should be used primarily for initialization and by adminState internals. Most uses * should go through the operation interfaces.
*/ staticinlinevoid vdo_set_admin_state_code(struct admin_state *state, conststruct admin_state_code *code)
{
WRITE_ONCE(state->current_state, code);
}
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.