Lines Matching refs:state

149 	io_allowed = (device->state.disk >= mins);
328 * was set the conn state to "StandAlone",
329 * if now a re-connect request comes in, conn state goes C_UNCONNECTED,
379 /* is used from state engine doing drbd_thread_stop_nowait,
445 /* may be called from state engine, holding the req lock irqsave */
891 D_ASSERT(device, device->state.disk == D_UP_TO_DATE);
988 * drbd_send_current_state() - Sends the drbd state to the peer
1000 p->state = cpu_to_be32(peer_device->device->state.i); /* Within the send mutex */
1005 * drbd_send_state() - After a state change, sends the new state to the peer
1007 * @state: the state to send, not necessarily the current state.
1009 * Each state change queues an "after_state_ch" work, which will eventually
1010 * send the resulting new state to the peer. If more state changes happen
1012 * want to send each intermediary state in the order it occurred.
1014 int drbd_send_state(struct drbd_peer_device *peer_device, union drbd_state state)
1023 p->state = cpu_to_be32(state.i); /* Within the send mutex */
1344 if (peer_device->device->state.conn < C_CONNECTED)
1491 return drop_it; /* && (device->state == R_PRIMARY) */;
1686 if (device->state.conn >= C_SYNC_SOURCE &&
1687 device->state.conn <= C_PAUSED_SYNC_T)
1897 /* to have a stable device->state.role
1900 if (device->state.role != R_PRIMARY) {
1927 if (device->state.pdsk >= D_INCONSISTENT && device->state.conn >= C_CONNECTED) {
1928 D_ASSERT(device, device->state.role == R_PRIMARY);
1941 device->state = (union drbd_dev_state) {
2206 * device (re-)configuration or state changes */
2790 /* inherit the connection state */
2791 device->state.conn = first_connection(resource)->cstate;
2792 if (device->state.conn == C_WF_REPORT_PARAMS) {
3211 if (device->state.disk != D_DISKLESS)
3292 if (device->state.conn < C_CONNECTED) {
3331 if (device->state.role == R_PRIMARY)
3701 if (!timeout || device->state.conn < C_CONNECTED)
3733 unsigned long state;
3752 rsp->state += refresh;
3755 rsp->state = rsp->state * FAULT_RANDOM_MULT + FAULT_RANDOM_ADD;
3756 return swahw32(rsp->state);