Lines Matching refs:rv
69 bool rv = true; in conn_all_vols_unconf() local
77 rv = false; in conn_all_vols_unconf()
83 return rv; in conn_all_vols_unconf()
193 bool rv = true; in no_peer_wf_report_params() local
198 rv = false; in no_peer_wf_report_params()
203 return rv; in no_peer_wf_report_params()
240 enum drbd_state_rv rv; in drbd_change_state() local
244 rv = _drbd_set_state(mdev, ns, f, NULL); in drbd_change_state()
247 return rv; in drbd_change_state()
268 enum drbd_state_rv rv; in _req_st_cond() local
279 rv = is_valid_transition(os, ns); in _req_st_cond()
280 if (rv >= SS_SUCCESS) in _req_st_cond()
281 rv = SS_UNKNOWN_ERROR; /* cont waiting, otherwise fail. */ in _req_st_cond()
284 rv = SS_CW_NO_NEED; in _req_st_cond()
285 if (rv == SS_UNKNOWN_ERROR) { in _req_st_cond()
286 rv = is_valid_state(mdev, ns); in _req_st_cond()
287 if (rv >= SS_SUCCESS) { in _req_st_cond()
288 rv = is_valid_soft_transition(os, ns, mdev->tconn); in _req_st_cond()
289 if (rv >= SS_SUCCESS) in _req_st_cond()
290 rv = SS_UNKNOWN_ERROR; /* cont waiting, otherwise fail. */ in _req_st_cond()
295 return rv; in _req_st_cond()
315 enum drbd_state_rv rv; in drbd_req_state() local
325 rv = is_valid_transition(os, ns); in drbd_req_state()
326 if (rv < SS_SUCCESS) { in drbd_req_state()
332 rv = is_valid_state(mdev, ns); in drbd_req_state()
333 if (rv == SS_SUCCESS) in drbd_req_state()
334 rv = is_valid_soft_transition(os, ns, mdev->tconn); in drbd_req_state()
337 if (rv < SS_SUCCESS) { in drbd_req_state()
339 print_st_err(mdev, os, ns, rv); in drbd_req_state()
344 rv = SS_CW_FAILED_BY_PEER; in drbd_req_state()
346 print_st_err(mdev, os, ns, rv); in drbd_req_state()
351 (rv = _req_st_cond(mdev, mask, val))); in drbd_req_state()
353 if (rv < SS_SUCCESS) { in drbd_req_state()
355 print_st_err(mdev, os, ns, rv); in drbd_req_state()
360 rv = _drbd_set_state(mdev, ns, f, &done); in drbd_req_state()
362 rv = _drbd_set_state(mdev, ns, f, &done); in drbd_req_state()
367 if (f & CS_WAIT_COMPLETE && rv == SS_SUCCESS) { in drbd_req_state()
376 return rv; in drbd_req_state()
393 enum drbd_state_rv rv; in _drbd_request_state() local
396 (rv = drbd_req_state(mdev, mask, val, f)) != SS_IN_TRANSIENT_STATE); in _drbd_request_state()
398 return rv; in _drbd_request_state()
514 enum drbd_state_rv rv = SS_SUCCESS; in is_valid_state() local
528 rv = SS_TWO_PRIMARIES; in is_valid_state()
530 rv = SS_O_VOL_PEER_PRI; in is_valid_state()
534 if (rv <= 0) in is_valid_state()
537 rv = SS_DEVICE_IN_USE; in is_valid_state()
540 rv = SS_NO_UP_TO_DATE_DISK; in is_valid_state()
544 rv = SS_PRIMARY_NOP; in is_valid_state()
547 rv = SS_NO_UP_TO_DATE_DISK; in is_valid_state()
550 rv = SS_NO_LOCAL_DISK; in is_valid_state()
553 rv = SS_NO_REMOTE_DISK; in is_valid_state()
556 rv = SS_NO_UP_TO_DATE_DISK; in is_valid_state()
563 rv = SS_CONNECTED_OUTDATES; in is_valid_state()
567 rv = SS_NO_VERIFY_ALG; in is_valid_state()
571 rv = SS_NOT_SUPPORTED; in is_valid_state()
574 rv = SS_NO_UP_TO_DATE_DISK; in is_valid_state()
578 rv = SS_NEED_CONNECTION; in is_valid_state()
581 rv = SS_CONNECTED_OUTDATES; in is_valid_state()
585 return rv; in is_valid_state()
599 enum drbd_state_rv rv = SS_SUCCESS; in is_valid_soft_transition() local
603 rv = SS_RESYNC_RUNNING; in is_valid_soft_transition()
606 rv = SS_ALREADY_STANDALONE; in is_valid_soft_transition()
609 rv = SS_IS_DISKLESS; in is_valid_soft_transition()
612 rv = SS_NO_NET_CONFIG; in is_valid_soft_transition()
615 rv = SS_LOWER_THAN_OUTDATED; in is_valid_soft_transition()
618 rv = SS_IN_TRANSIENT_STATE; in is_valid_soft_transition()
628 rv = SS_IN_TRANSIENT_STATE; in is_valid_soft_transition()
631 rv = SS_NEED_CONNECTION; in is_valid_soft_transition()
635 rv = SS_RESYNC_RUNNING; in is_valid_soft_transition()
639 rv = SS_NEED_CONNECTION; in is_valid_soft_transition()
643 rv = SS_NEED_CONNECTION; /* No NetworkFailure -> SyncTarget etc... */ in is_valid_soft_transition()
647 rv = SS_OUTDATE_WO_CONN; in is_valid_soft_transition()
649 return rv; in is_valid_soft_transition()
695 enum drbd_state_rv rv; in is_valid_transition() local
697 rv = is_valid_conn_transition(os.conn, ns.conn); in is_valid_transition()
701 rv = SS_IS_DISKLESS; in is_valid_transition()
703 return rv; in is_valid_transition()
942 enum drbd_state_rv rv = SS_SUCCESS; in __drbd_set_state() local
953 rv = is_valid_transition(os, ns); in __drbd_set_state()
954 if (rv < SS_SUCCESS) in __drbd_set_state()
955 return rv; in __drbd_set_state()
961 rv = is_valid_state(mdev, ns); in __drbd_set_state()
962 if (rv < SS_SUCCESS) { in __drbd_set_state()
966 if (is_valid_state(mdev, os) == rv) in __drbd_set_state()
967 rv = is_valid_soft_transition(os, ns, mdev->tconn); in __drbd_set_state()
969 rv = is_valid_soft_transition(os, ns, mdev->tconn); in __drbd_set_state()
972 if (rv < SS_SUCCESS) { in __drbd_set_state()
974 print_st_err(mdev, os, ns, rv); in __drbd_set_state()
975 return rv; in __drbd_set_state()
1141 return rv; in __drbd_set_state()
1160 static void abw_start_sync(struct drbd_conf *mdev, int rv) in abw_start_sync() argument
1162 if (rv) { in abw_start_sync()
1182 int rv; in drbd_bitmap_io_from_worker() local
1190 rv = io_fn(mdev); in drbd_bitmap_io_from_worker()
1195 return rv; in drbd_bitmap_io_from_worker()
1632 enum drbd_state_rv rv = SS_SUCCESS; in conn_is_valid_transition() local
1648 rv = is_valid_transition(os, ns); in conn_is_valid_transition()
1649 if (rv < SS_SUCCESS) in conn_is_valid_transition()
1653 rv = is_valid_state(mdev, ns); in conn_is_valid_transition()
1654 if (rv < SS_SUCCESS) { in conn_is_valid_transition()
1655 if (is_valid_state(mdev, os) == rv) in conn_is_valid_transition()
1656 rv = is_valid_soft_transition(os, ns, tconn); in conn_is_valid_transition()
1658 rv = is_valid_soft_transition(os, ns, tconn); in conn_is_valid_transition()
1660 if (rv < SS_SUCCESS) in conn_is_valid_transition()
1665 if (rv < SS_SUCCESS && flags & CS_VERBOSE) in conn_is_valid_transition()
1666 print_st_err(mdev, os, ns, rv); in conn_is_valid_transition()
1668 return rv; in conn_is_valid_transition()
1684 enum drbd_state_rv rv; in conn_set_state() local
1707 rv = __drbd_set_state(mdev, ns, flags, NULL); in conn_set_state()
1708 if (rv < SS_SUCCESS) in conn_set_state()
1747 enum drbd_state_rv rv; in _conn_rq_cond() local
1755 rv = conn_is_valid_transition(tconn, mask, val, 0); in _conn_rq_cond()
1756 if (rv == SS_SUCCESS && tconn->cstate == C_WF_REPORT_PARAMS) in _conn_rq_cond()
1757 rv = SS_UNKNOWN_ERROR; /* continue waiting */ in _conn_rq_cond()
1759 return rv; in _conn_rq_cond()
1766 enum drbd_state_rv rv = SS_SUCCESS; in _conn_request_state() local
1773 rv = is_valid_conn_transition(oc, val.conn); in _conn_request_state()
1774 if (rv < SS_SUCCESS) in _conn_request_state()
1778 rv = conn_is_valid_transition(tconn, mask, val, flags); in _conn_request_state()
1779 if (rv < SS_SUCCESS) in _conn_request_state()
1796 rv = SS_CW_FAILED_BY_PEER; in _conn_request_state()
1809 (rv = _conn_rq_cond(tconn, mask, val)), in _conn_request_state()
1812 if (rv < SS_SUCCESS) in _conn_request_state()
1844 if (rv < SS_SUCCESS && flags & CS_VERBOSE) { in _conn_request_state()
1845 conn_err(tconn, "State change failed: %s\n", drbd_set_st_err_str(rv)); in _conn_request_state()
1849 return rv; in _conn_request_state()
1856 enum drbd_state_rv rv; in conn_request_state() local
1859 rv = _conn_request_state(tconn, mask, val, flags); in conn_request_state()
1862 return rv; in conn_request_state()