Lines Matching refs:pdsk
169 ds = max_t(enum drbd_disk_state, ds, mdev->state.pdsk); in conn_highest_pdsk()
409 drbd_disk_str(ns.pdsk), in print_st()
452 if (ns.pdsk != os.pdsk && flags & CS_DC_PDSK) in print_state_change()
454 drbd_disk_str(os.pdsk), in print_state_change()
455 drbd_disk_str(ns.pdsk)); in print_state_change()
543 ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk >= D_UNKNOWN) in is_valid_state()
546 else if (ns.role == R_PRIMARY && ns.disk <= D_INCONSISTENT && ns.pdsk <= D_INCONSISTENT) in is_valid_state()
552 else if (ns.conn > C_CONNECTED && ns.pdsk < D_INCONSISTENT) in is_valid_state()
555 else if (ns.conn > C_CONNECTED && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) in is_valid_state()
573 else if (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE) in is_valid_state()
577 ns.pdsk == D_UNKNOWN) in is_valid_state()
580 else if (ns.conn >= C_CONNECTED && ns.pdsk == D_UNKNOWN) in is_valid_state()
645 if (ns.conn == C_DISCONNECTING && ns.pdsk == D_OUTDATED && in is_valid_soft_transition()
646 os.conn < C_CONNECTED && os.pdsk > D_OUTDATED) in is_valid_soft_transition()
752 if (ns.pdsk > D_UNKNOWN || ns.pdsk < D_INCONSISTENT) in sanitize_state()
753 ns.pdsk = D_UNKNOWN; in sanitize_state()
762 if (ns.conn > C_CONNECTED && (ns.disk <= D_FAILED || ns.pdsk <= D_FAILED)) { in sanitize_state()
774 ns.pdsk = mdev->new_state_tmp.pdsk; in sanitize_state()
779 ns.pdsk = D_UNKNOWN; in sanitize_state()
788 if (ns.pdsk == D_CONSISTENT || ns.pdsk == D_OUTDATED) in sanitize_state()
789 ns.pdsk = D_UP_TO_DATE; in sanitize_state()
863 if (ns.pdsk > pdsk_max) in sanitize_state()
864 ns.pdsk = pdsk_max; in sanitize_state()
866 if (ns.pdsk < pdsk_min) { in sanitize_state()
869 ns.pdsk = pdsk_min; in sanitize_state()
873 (ns.role == R_PRIMARY && ns.conn < C_CONNECTED && ns.pdsk > D_OUTDATED)) in sanitize_state()
877 (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE)) in sanitize_state()
1080 (mdev->state.pdsk < D_INCONSISTENT && mdev->state.peer == R_PRIMARY)) in __drbd_set_state()
1088 if (mdev->state.pdsk <= D_OUTDATED && mdev->state.pdsk >= D_INCONSISTENT) in __drbd_set_state()
1100 if (os.disk == D_INCONSISTENT && os.pdsk == D_INCONSISTENT && in __drbd_set_state()
1223 if (!(os.role == R_PRIMARY && os.disk < D_UP_TO_DATE && os.pdsk < D_UP_TO_DATE) && in after_state_ch()
1224 (ns.role == R_PRIMARY && ns.disk < D_UP_TO_DATE && ns.pdsk < D_UP_TO_DATE)) in after_state_ch()
1286 if (os.pdsk == D_DISKLESS && in after_state_ch()
1287 ns.pdsk > D_DISKLESS && ns.pdsk != D_UNKNOWN) { /* attach on the peer */ in after_state_ch()
1308 if ((os.pdsk >= D_INCONSISTENT && in after_state_ch()
1309 os.pdsk != D_UNKNOWN && in after_state_ch()
1310 os.pdsk != D_OUTDATED) in after_state_ch()
1311 && (ns.pdsk < D_INCONSISTENT || in after_state_ch()
1312 ns.pdsk == D_UNKNOWN || in after_state_ch()
1313 ns.pdsk == D_OUTDATED)) { in after_state_ch()
1328 if (ns.pdsk < D_INCONSISTENT && get_ldev(mdev)) { in after_state_ch()
1470 if (ns.disk > D_NEGOTIATING && ns.pdsk > D_NEGOTIATING && in after_state_ch()
1558 if (ns_max.pdsk <= D_OUTDATED) { in w_after_conn_state_ch()
1593 .pdsk = D_UNKNOWN, in conn_old_common_state()
1618 if (cs.pdsk != os.pdsk) in conn_old_common_state()
1681 .pdsk = D_MASK in conn_set_state()
1716 ns_max.pdsk = max_t(enum drbd_disk_state, ns.pdsk, ns_max.pdsk); in conn_set_state()
1722 ns_min.pdsk = min_t(enum drbd_disk_state, ns.pdsk, ns_min.pdsk); in conn_set_state()
1732 .pdsk = D_UNKNOWN in conn_set_state()