Lines Matching refs:state

1090 	 * Grab and release the state mutex, so we know that any current
1291 * really does not help to improve the state of the world, either.
1354 * drbd_may_finish_epoch() - Applies an epoch_event to the epoch's state, eventually finishes it.
2216 pcmd = (device->state.conn >= C_SYNC_SOURCE &&
2217 device->state.conn <= C_PAUSED_SYNC_T &&
2688 if (device->state.conn == C_SYNC_TARGET)
2691 if (device->state.pdsk < D_INCONSISTENT) {
2785 if (device->state.conn == C_VERIFY_S || device->state.conn == C_VERIFY_T)
2980 if (device->state.peer != R_PRIMARY
3118 if (hg == -1 && device->state.role == R_SECONDARY)
3120 if (hg == 1 && device->state.role == R_PRIMARY)
3127 return device->state.role == R_PRIMARY ? 1 : -1;
3130 if (hg == -1 && device->state.role == R_PRIMARY) {
3135 * we do not need to wait for the after state change work either. */
3185 * we do not need to wait for the after state change work either. */
3271 device->state.disk >= D_NEGOTIATING ? drbd_bm_total_weight(device) : 0, 0);
3321 if (device->state.role == R_PRIMARY || peer_role == R_PRIMARY) {
3327 if (device->state.role == R_PRIMARY && peer_role == R_PRIMARY) {
3334 if (device->state.role == R_PRIMARY)
3412 device->state.disk >= D_NEGOTIATING ? drbd_bm_total_weight(device) : 0, 0);
3446 /* drbd_sync_handshake() returns the new conn state on success, or
3459 mydisk = device->state.disk;
3514 int pcount = (device->state.role == R_PRIMARY)
3569 device->state.role == R_PRIMARY && device->state.disk >= D_CONSISTENT) {
3936 if (device->state.conn == C_WF_REPORT_PARAMS) {
3950 if (device->state.conn == C_WF_REPORT_PARAMS) {
4099 if (device->state.conn == C_WF_REPORT_PARAMS)
4107 device->state.disk >= D_OUTDATED &&
4108 (device->state.conn < C_CONNECTED || device->state.pdsk == D_DISKLESS)) {
4181 } else if (new_size < cur_size && device->state.role == R_PRIMARY) {
4209 if (device->state.conn > C_WF_REPORT_PARAMS) {
4217 (dd == DS_GREW && device->state.conn == C_CONNECTED)) {
4218 if (device->state.pdsk >= D_INCONSISTENT &&
4219 device->state.disk >= D_INCONSISTENT) {
4255 if ((device->state.conn < C_CONNECTED || device->state.pdsk == D_DISKLESS) &&
4256 device->state.disk < D_INCONSISTENT &&
4257 device->state.role == R_PRIMARY &&
4267 device->state.conn == C_CONNECTED &&
4284 } else if (device->state.disk < D_INCONSISTENT &&
4285 device->state.role == R_PRIMARY) {
4291 /* Before we test for the disk state, we should wait until an eventually
4292 ongoing cluster wide state change is finished. That is important if
4294 new disk state... */
4297 if (device->state.conn >= C_CONNECTED && device->state.disk < D_INCONSISTENT)
4307 * convert_state() - Converts the peer's view of the cluster state to our point of view
4308 * @ps: The state as seen by the peer.
4409 peer_state.i = be32_to_cpu(p->state);
4414 drbd_info(device, "real peer disk state = %s\n", drbd_disk_str(real_peer_disk));
4489 * we first send the uuids, then the current state.
4526 if (device->state.disk == D_NEGOTIATING) {
4603 device->state.conn == C_WF_SYNC_UUID ||
4604 device->state.conn == C_BEHIND ||
4605 device->state.conn < C_CONNECTED ||
4606 device->state.disk < D_NEGOTIATING);
4608 /* D_ASSERT(device, device->state.conn == C_WF_SYNC_UUID ); */
4879 if (device->state.conn == C_WF_BITMAP_T) {
4885 /* Omit CS_ORDERED with this state transition to avoid deadlocks. */
4888 } else if (device->state.conn != C_WF_BITMAP_S) {
4892 drbd_conn_str(device->state.conn));
4898 if (!err && device->state.conn == C_WF_BITMAP_S)
4930 switch (device->state.conn) {
4937 drbd_conn_str(device->state.conn));
5116 * Usually we should be in some network failure state already,
5581 drbd_err(connection, "Requested state change failed by peer: %s (%d)\n",
5610 drbd_err(device, "Requested state change failed by peer: %s (%d)\n",
5840 if (device->state.conn == C_AHEAD &&