Lines Matching refs:state
1086 * Grab and release the state mutex, so we know that any current
1285 * really does not help to improve the state of the world, either.
1352 * drbd_may_finish_epoch() - Applies an epoch_event to the epoch's state, eventually finishes it.
2246 pcmd = (device->state.conn >= C_SYNC_SOURCE &&
2247 device->state.conn <= C_PAUSED_SYNC_T &&
2722 if (device->state.conn == C_SYNC_TARGET)
2725 if (device->state.pdsk < D_INCONSISTENT) {
2819 if (device->state.conn == C_VERIFY_S || device->state.conn == C_VERIFY_T)
3018 if (device->state.peer != R_PRIMARY
3157 if (hg == -1 && device->state.role == R_SECONDARY)
3159 if (hg == 1 && device->state.role == R_PRIMARY)
3166 return device->state.role == R_PRIMARY ? 1 : -1;
3169 if (hg == -1 && device->state.role == R_PRIMARY) {
3174 * we do not need to wait for the after state change work either. */
3224 * we do not need to wait for the after state change work either. */
3309 device->state.disk >= D_NEGOTIATING ? drbd_bm_total_weight(device) : 0, 0);
3359 if (device->state.role == R_PRIMARY || peer_role == R_PRIMARY) {
3365 if (device->state.role == R_PRIMARY && peer_role == R_PRIMARY) {
3372 if (device->state.role == R_PRIMARY)
3450 device->state.disk >= D_NEGOTIATING ? drbd_bm_total_weight(device) : 0, 0);
3484 /* drbd_sync_handshake() returns the new conn state on success, or
3497 mydisk = device->state.disk;
3552 int pcount = (device->state.role == R_PRIMARY)
3607 device->state.role == R_PRIMARY && device->state.disk >= D_CONSISTENT) {
3977 if (device->state.conn == C_WF_REPORT_PARAMS) {
3991 if (device->state.conn == C_WF_REPORT_PARAMS) {
4142 if (device->state.conn == C_WF_REPORT_PARAMS)
4150 device->state.disk >= D_OUTDATED &&
4151 (device->state.conn < C_CONNECTED || device->state.pdsk == D_DISKLESS)) {
4226 } else if (new_size < cur_size && device->state.role == R_PRIMARY) {
4254 if (device->state.conn > C_WF_REPORT_PARAMS) {
4262 (dd == DS_GREW && device->state.conn == C_CONNECTED)) {
4263 if (device->state.pdsk >= D_INCONSISTENT &&
4264 device->state.disk >= D_INCONSISTENT) {
4302 if ((device->state.conn < C_CONNECTED || device->state.pdsk == D_DISKLESS) &&
4303 device->state.disk < D_INCONSISTENT &&
4304 device->state.role == R_PRIMARY &&
4314 device->state.conn == C_CONNECTED &&
4331 } else if (device->state.disk < D_INCONSISTENT &&
4332 device->state.role == R_PRIMARY) {
4338 /* Before we test for the disk state, we should wait until an eventually
4339 ongoing cluster wide state change is finished. That is important if
4341 new disk state... */
4344 if (device->state.conn >= C_CONNECTED && device->state.disk < D_INCONSISTENT)
4354 * convert_state() - Converts the peer's view of the cluster state to our point of view
4355 * @ps: The state as seen by the peer.
4456 peer_state.i = be32_to_cpu(p->state);
4461 drbd_info(device, "real peer disk state = %s\n", drbd_disk_str(real_peer_disk));
4536 * we first send the uuids, then the current state.
4573 if (device->state.disk == D_NEGOTIATING) {
4650 device->state.conn == C_WF_SYNC_UUID ||
4651 device->state.conn == C_BEHIND ||
4652 device->state.conn < C_CONNECTED ||
4653 device->state.disk < D_NEGOTIATING);
4655 /* D_ASSERT(device, device->state.conn == C_WF_SYNC_UUID ); */
4926 if (device->state.conn == C_WF_BITMAP_T) {
4932 /* Omit CS_ORDERED with this state transition to avoid deadlocks. */
4935 } else if (device->state.conn != C_WF_BITMAP_S) {
4939 drbd_conn_str(device->state.conn));
4945 if (!err && device->state.conn == C_WF_BITMAP_S)
4977 switch (device->state.conn) {
4984 drbd_conn_str(device->state.conn));
5164 * Usually we should be in some network failure state already,
5632 drbd_err(connection, "Requested state change failed by peer: %s (%d)\n",
5661 drbd_err(device, "Requested state change failed by peer: %s (%d)\n",
5889 if (device->state.conn == C_AHEAD &&