Lines Matching refs:state
97 * No state, no device IDR, no connections lists can change. */
127 device_state_change->disk_state[OLD] = device->state.disk;
137 device->state.pdsk;
140 C_WF_REPORT_PARAMS, device->state.conn);
142 device->state.user_isp;
144 device->state.peer_isp;
146 device->state.aftr_isp;
178 device_state_change->disk_state[NEW] = device->state.disk;
197 union drbd_dev_state state = device->state;
199 peer_device_state_change->disk_state[NEW] = state.pdsk;
201 max_t(enum drbd_conns, C_WF_REPORT_PARAMS, state.conn);
203 state.user_isp;
205 state.peer_isp;
207 state.aftr_isp;
303 if (device->state.disk != D_DISKLESS ||
304 device->state.conn != C_STANDALONE ||
305 device->state.role != R_SECONDARY) {
344 role = max_role(role, device->state.role);
360 peer = max_role(peer, device->state.peer);
376 disk_state = max_t(enum drbd_disk_state, disk_state, device->state.disk);
392 disk_state = min_t(enum drbd_disk_state, disk_state, device->state.disk);
408 disk_state = max_t(enum drbd_disk_state, disk_state, device->state.pdsk);
424 conn = min_t(enum drbd_conns, conn, device->state.conn);
439 if (peer_device->device->state.conn == C_WF_REPORT_PARAMS) {
462 * cl_wide_st_chg() - true if the state change is a cluster wide one
464 * @os: old (current) state.
465 * @ns: new (wanted) state.
505 * drbd_force_state() - Impose a change which happens outside our control on our state
507 * @mask: mask of state bits to change.
508 * @val: value of new state bits.
553 * drbd_req_state() - Perform an eventually cluster wide state change
555 * @mask: mask of state bits to change.
556 * @val: value of new state bits.
639 * _drbd_request_state() - Request a state change (with flags)
641 * @mask: mask of state bits to change.
642 * @val: value of new state bits.
646 * flag, or when logging of failed state change requests is not desired.
669 * drbd_md_get_buffer() while trying to get out of the "transient state", we
689 device->state.disk != D_FAILED);
739 print_st(device, " state", os);
904 * is_valid_soft_transition() - Returns an SS_ error code if the state transition is not possible
905 * This function limits state transitions that may be declined by DRBD. I.e.
908 * @ns: new state.
909 * @os: old state.
944 * cluster wide state change request. */
1006 * is_valid_transition() - Returns an SS_ error code if the state transition is not possible
1007 * This limits hard state transitions. Hard state transitions are facts there are
1009 * But those hard state transitions are still not allowed to do everything.
1010 * @ns: new state.
1011 * @os: old state.
1043 * sanitize_state() - Resolves implicitly necessary additional changes to a state transition
1045 * @os: old state.
1046 * @ns: new state.
1049 * When we loose connection, we have to set the state of the peers disk (pdsk)
1081 /* An implication of the disk states onto the connection state */
1113 /* Implications of the connection state on the disk states */
1252 * _drbd_set_state() - Set a new DRBD state
1254 * @ns: new state.
1283 /* pre-state-change checks ; only look at ns */
1288 /* If the old state was illegal as well, then let
1329 * changes to state, which again should be visible before anything else
1332 device->state.i = ns.i;
1418 if (device->state.role == R_PRIMARY ||
1419 (device->state.pdsk < D_INCONSISTENT && device->state.peer == R_PRIMARY))
1421 if (device->state.conn > C_WF_REPORT_PARAMS)
1423 if (device->state.disk > D_INCONSISTENT)
1425 if (device->state.disk > D_OUTDATED)
1427 if (device->state.pdsk <= D_OUTDATED && device->state.pdsk >= D_INCONSISTENT)
1510 switch (device->state.conn) {
1609 #define HAS_CHANGED(state) ((state)[OLD] != (state)[NEW])
1673 /* takes old and new peer disk state */
1694 * after_state_ch() - Perform after state change actions that may sleep
1696 * @os: old state.
1697 * @ns: new state.
1730 state change. This function might sleep */
1805 * anymore, so check also the _current_ state, not only the new state
1808 device->state.conn == C_WF_BITMAP_S)
1849 device->state.conn <= C_CONNECTED && get_ldev(device)) {
1876 /* Make sure the peer gets informed about eventual state
1931 /* current state still has to be D_FAILED,
1934 if (device->state.disk != D_FAILED)
1937 drbd_disk_str(device->state.disk));
1958 if (device->state.disk != D_DISKLESS)
1961 drbd_disk_str(device->state.disk));
1994 * verify to interrupt/stop early. Send the new state. */
2031 union drbd_state ns_max; /* new, max state, over all devices */
2120 os = device->state;
2232 ns.i = device->state.i;
2307 /* This will be a cluster-wide state change.
2309 * then send the state change request, ... */