/** * DOC: DRBD State macros * * These macros are used to express state changes in easily readable form. * * The NS macros expand to a mask and a value, that can be bit ored onto the * current state as soon as the spinlock (req_lock) was taken. * * The _NS macros are used for state functions that get called with the * spinlock. These macros expand directly to the new state value. * * Besides the basic forms NS() and _NS() additional _?NS[23] are defined * to express state changes that affect more than one aspect of the state. * * E.g. NS2(conn, C_CONNECTED, peer, R_SECONDARY) * Means that the network connection was established and that the peer * is in secondary role.
*/ #define role_MASK R_MASK #define peer_MASK R_MASK #define disk_MASK D_MASK #define pdsk_MASK D_MASK #define conn_MASK C_MASK #define susp_MASK 1 #define user_isp_MASK 1 #define aftr_isp_MASK 1 #define susp_nod_MASK 1 #define susp_fen_MASK 1
/** * drbd_request_state() - Request a state change * @device: DRBD device. * @mask: mask of state bits to change. * @val: value of new state bits. * * This is the most graceful way of requesting a state change. It is verbose * quite verbose in case the state change is not possible, and all those * state changes are globally serialized.
*/ staticinlineint drbd_request_state(struct drbd_device *device, union drbd_state mask, union drbd_state val)
{ return _drbd_request_state(device, mask, val, CS_VERBOSE + CS_ORDERED);
}
/* for use in adm_detach() (drbd_adm_detach(), drbd_adm_down()) */ int drbd_request_detach_interruptible(struct drbd_device *device);
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.