Lines Matching refs:state
163 io_allowed = (device->state.disk >= mins);
337 * was set the conn state to "StandAlone",
338 * if now a re-connect request comes in, conn state goes C_UNCONNECTED,
388 /* is used from state engine doing drbd_thread_stop_nowait,
454 /* may be called from state engine, holding the req lock irqsave */
900 D_ASSERT(device, device->state.disk == D_UP_TO_DATE);
1002 * drbd_send_current_state() - Sends the drbd state to the peer
1014 p->state = cpu_to_be32(peer_device->device->state.i); /* Within the send mutex */
1019 * drbd_send_state() - After a state change, sends the new state to the peer
1021 * @state: the state to send, not necessarily the current state.
1023 * Each state change queues an "after_state_ch" work, which will eventually
1024 * send the resulting new state to the peer. If more state changes happen
1026 * want to send each intermediary state in the order it occurred.
1028 int drbd_send_state(struct drbd_peer_device *peer_device, union drbd_state state)
1037 p->state = cpu_to_be32(state.i); /* Within the send mutex */
1355 if (peer_device->device->state.conn < C_CONNECTED)
1502 return drop_it; /* && (device->state == R_PRIMARY) */;
1701 if (device->state.conn >= C_SYNC_SOURCE &&
1702 device->state.conn <= C_PAUSED_SYNC_T)
1927 /* to have a stable device->state.role
1930 if (device->state.role != R_PRIMARY) {
1956 if (device->state.pdsk >= D_INCONSISTENT && device->state.conn >= C_CONNECTED) {
1957 D_ASSERT(device, device->state.role == R_PRIMARY);
1970 device->state = (union drbd_dev_state) {
2240 * device (re-)configuration or state changes */
2827 /* inherit the connection state */
2828 device->state.conn = first_connection(resource)->cstate;
2829 if (device->state.conn == C_WF_REPORT_PARAMS) {
3248 if (device->state.disk != D_DISKLESS)
3329 if (device->state.conn < C_CONNECTED) {
3368 if (device->state.role == R_PRIMARY)
3729 if (!timeout || device->state.conn < C_CONNECTED)
3761 unsigned long state;
3780 rsp->state += refresh;
3783 rsp->state = rsp->state * FAULT_RANDOM_MULT + FAULT_RANDOM_ADD;
3784 return swahw32(rsp->state);