Lines Matching refs:disk
127 device_state_change->disk_state[OLD] = device->state.disk; in remember_old_state()
178 device_state_change->disk_state[NEW] = device->state.disk; in remember_new_state()
303 if (device->state.disk != D_DISKLESS || in conn_all_vols_unconf()
376 disk_state = max_t(enum drbd_disk_state, disk_state, device->state.disk); in conn_highest_disk()
392 disk_state = min_t(enum drbd_disk_state, disk_state, device->state.disk); in conn_lowest_disk()
474 (os.disk != D_FAILED && ns.disk == D_FAILED))) || in cl_wide_st_chg()
675 return drbd_req_state(device, NS(disk, D_FAILED), in request_detach()
689 device->state.disk != D_FAILED); in drbd_request_detach_interruptible()
722 drbd_disk_str(ns.disk), in print_st()
762 if (ns.disk != os.disk && flags & CS_DC_DISK) in print_state_change()
764 drbd_disk_str(os.disk), in print_state_change()
765 drbd_disk_str(ns.disk)); in print_state_change()
853 else if (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.disk < D_UP_TO_DATE) in is_valid_state()
860 else if (ns.role == R_PRIMARY && ns.disk <= D_INCONSISTENT && ns.pdsk <= D_INCONSISTENT) in is_valid_state()
863 else if (ns.conn > C_CONNECTED && ns.disk < D_INCONSISTENT) in is_valid_state()
869 else if (ns.conn > C_CONNECTED && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) in is_valid_state()
876 ns.disk == D_OUTDATED) in is_valid_state()
887 else if (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) in is_valid_state()
923 if (ns.disk > D_ATTACHING && os.disk == D_DISKLESS) in is_valid_soft_transition()
929 if (ns.disk == D_OUTDATED && os.disk < D_OUTDATED && os.disk != D_ATTACHING) in is_valid_soft_transition()
947 && ns.disk != D_UP_TO_DATE && ns.disk != D_DISKLESS in is_valid_soft_transition()
1021 if (ns.disk == D_FAILED && os.disk == D_DISKLESS) in is_valid_transition()
1078 if (ns.conn == C_STANDALONE && ns.disk == D_DISKLESS && ns.role == R_SECONDARY) in sanitize_state()
1083 if (ns.conn > C_CONNECTED && (ns.disk <= D_FAILED || ns.pdsk <= D_FAILED)) { in sanitize_state()
1091 if (ns.conn < C_CONNECTED && ns.disk == D_NEGOTIATING && in sanitize_state()
1094 ns.disk = device->new_state_tmp.disk; in sanitize_state()
1099 ns.disk = D_DISKLESS; in sanitize_state()
1107 if (ns.disk == D_CONSISTENT || ns.disk == D_OUTDATED) in sanitize_state()
1108 ns.disk = D_UP_TO_DATE; in sanitize_state()
1176 if (ns.disk > disk_max) in sanitize_state()
1177 ns.disk = disk_max; in sanitize_state()
1179 if (ns.disk < disk_min) { in sanitize_state()
1182 ns.disk = disk_min; in sanitize_state()
1199 (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) && in sanitize_state()
1200 !(os.role == R_PRIMARY && os.disk < D_UP_TO_DATE && os.pdsk < D_UP_TO_DATE)) in sanitize_state()
1320 if ((os.disk != D_FAILED && ns.disk == D_FAILED) || in _drbd_set_state()
1321 (os.disk != D_DISKLESS && ns.disk == D_DISKLESS)) in _drbd_set_state()
1347 if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING) in _drbd_set_state()
1425 if (device->state.disk > D_INCONSISTENT) in _drbd_set_state()
1427 if (device->state.disk > D_OUTDATED) in _drbd_set_state()
1435 if (os.disk < D_CONSISTENT && ns.disk >= D_CONSISTENT) in _drbd_set_state()
1441 if (os.disk == D_INCONSISTENT && os.pdsk == D_INCONSISTENT && in _drbd_set_state()
1467 if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) && in _drbd_set_state()
1468 ns.disk > D_NEGOTIATING) in _drbd_set_state()
1719 if ((os.disk != D_UP_TO_DATE || os.pdsk != D_UP_TO_DATE) in after_state_ch()
1720 && (ns.disk == D_UP_TO_DATE && ns.pdsk == D_UP_TO_DATE)) { in after_state_ch()
1729 if (!(os.role == R_PRIMARY && os.disk < D_UP_TO_DATE && os.pdsk < D_UP_TO_DATE) && in after_state_ch()
1730 (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE)) in after_state_ch()
1743 if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) && in after_state_ch()
1821 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { in after_state_ch()
1835 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { in after_state_ch()
1863 os.disk == D_ATTACHING && ns.disk == D_NEGOTIATING) { in after_state_ch()
1899 if (os.disk != D_FAILED && ns.disk == D_FAILED) { in after_state_ch()
1939 if (device->state.disk != D_FAILED) in after_state_ch()
1942 drbd_disk_str(device->state.disk)); in after_state_ch()
1960 if (os.disk != D_DISKLESS && ns.disk == D_DISKLESS) { in after_state_ch()
1963 if (device->state.disk != D_DISKLESS) in after_state_ch()
1966 drbd_disk_str(device->state.disk)); in after_state_ch()
1976 if (os.disk == D_UP_TO_DATE && ns.disk == D_INCONSISTENT && ns.conn >= C_CONNECTED) in after_state_ch()
1980 if (ns.disk > D_NEGOTIATING && ns.pdsk > D_NEGOTIATING && in after_state_ch()
1994 if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED) in after_state_ch()
2023 if (ns.disk == D_DISKLESS && in after_state_ch()
2118 .disk = D_DISKLESS, in conn_old_common_state()
2142 if (cs.disk != os.disk) in conn_old_common_state()
2170 if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED) in conn_is_valid_transition()
2171 ns.disk = os.disk; in conn_is_valid_transition()
2207 .disk = D_MASK, in conn_set_state()
2232 if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED) in conn_set_state()
2233 ns.disk = os.disk; in conn_set_state()
2241 ns_max.disk = max_t(enum drbd_disk_state, ns.disk, ns_max.disk); in conn_set_state()
2247 ns_min.disk = min_t(enum drbd_disk_state, ns.disk, ns_min.disk); in conn_set_state()
2257 .disk = D_DISKLESS, in conn_set_state()