Lines Matching full: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()
661 * We grab drbd_md_get_buffer(), because we don't want to "fail" the disk while
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()
763 pbp += sprintf(pbp, "disk( %s -> %s ) ", 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()
1008 * imposed on DRBD by the environment. E.g. disk broke or network broke down.
1021 if (ns.disk == D_FAILED && os.disk == D_DISKLESS) in is_valid_transition()
1034 [IMPLICITLY_UPGRADED_DISK] = "Implicitly upgraded disk", in print_sanitize_warnings()
1049 * When we loose connection, we have to set the state of the peers disk (pdsk)
1078 if (ns.conn == C_STANDALONE && ns.disk == D_DISKLESS && ns.role == R_SECONDARY) in sanitize_state()
1081 /* An implication of the disk states onto the connection state */ in sanitize_state()
1082 /* Abort resync if a disk fails/detaches */ 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()
1113 /* Implications of the connection state on the disk states */ 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()
1318 if ((os.disk != D_FAILED && ns.disk == D_FAILED) || in _drbd_set_state()
1319 (os.disk != D_DISKLESS && ns.disk == D_DISKLESS)) in _drbd_set_state()
1345 if (os.disk == D_ATTACHING && ns.disk >= D_NEGOTIATING) in _drbd_set_state()
1423 if (device->state.disk > D_INCONSISTENT) in _drbd_set_state()
1425 if (device->state.disk > D_OUTDATED) in _drbd_set_state()
1433 if (os.disk < D_CONSISTENT && ns.disk >= D_CONSISTENT) in _drbd_set_state()
1439 if (os.disk == D_INCONSISTENT && os.pdsk == D_INCONSISTENT && in _drbd_set_state()
1465 if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) && in _drbd_set_state()
1466 ns.disk > D_NEGOTIATING) in _drbd_set_state()
1673 /* takes old and new peer disk state */
1715 if ((os.disk != D_UP_TO_DATE || os.pdsk != D_UP_TO_DATE) in after_state_ch()
1716 && (ns.disk == D_UP_TO_DATE && ns.pdsk == D_UP_TO_DATE)) { in after_state_ch()
1725 if (!(os.role == R_PRIMARY && os.disk < D_UP_TO_DATE && os.pdsk < D_UP_TO_DATE) && in after_state_ch()
1726 (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE)) in after_state_ch()
1739 if ((os.disk == D_ATTACHING || os.disk == D_NEGOTIATING) && in after_state_ch()
1817 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { in after_state_ch()
1831 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { in after_state_ch()
1859 os.disk == D_ATTACHING && ns.disk == D_NEGOTIATING) { in after_state_ch()
1894 if (os.disk != D_FAILED && ns.disk == D_FAILED) { in after_state_ch()
1916 * that waits for completion from the local disk, in after_state_ch()
1934 if (device->state.disk != D_FAILED) in after_state_ch()
1936 "ASSERT FAILED: disk is %s during detach\n", in after_state_ch()
1937 drbd_disk_str(device->state.disk)); in after_state_ch()
1955 if (os.disk != D_DISKLESS && ns.disk == D_DISKLESS) { in after_state_ch()
1958 if (device->state.disk != D_DISKLESS) in after_state_ch()
1960 "ASSERT FAILED: disk is %s while going diskless\n", in after_state_ch()
1961 drbd_disk_str(device->state.disk)); in after_state_ch()
1971 if (os.disk == D_UP_TO_DATE && ns.disk == D_INCONSISTENT && ns.conn >= C_CONNECTED) in after_state_ch()
1975 if (ns.disk > D_NEGOTIATING && ns.pdsk > D_NEGOTIATING && in after_state_ch()
1989 if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED) in after_state_ch()
2000 * if the resync finished cleanly, or aborted because of peer disk in after_state_ch()
2005 * For resync aborted because of local disk failure, we cannot do in after_state_ch()
2017 if (ns.disk == D_DISKLESS && in after_state_ch()
2113 .disk = D_DISKLESS, in conn_old_common_state()
2137 if (cs.disk != os.disk) in conn_old_common_state()
2165 if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED) in conn_is_valid_transition()
2166 ns.disk = os.disk; in conn_is_valid_transition()
2202 .disk = D_MASK, in conn_set_state()
2227 if (flags & CS_IGN_OUTD_FAIL && ns.disk == D_OUTDATED && os.disk < D_OUTDATED) in conn_set_state()
2228 ns.disk = os.disk; in conn_set_state()
2236 ns_max.disk = max_t(enum drbd_disk_state, ns.disk, ns_max.disk); in conn_set_state()
2242 ns_min.disk = min_t(enum drbd_disk_state, ns.disk, ns_min.disk); in conn_set_state()
2252 .disk = D_DISKLESS, in conn_set_state()