Lines Matching refs:rv
481 int rv; in drbd_recv_short() local
485 rv = sock_recvmsg(sock, &msg, size, msg.msg_flags); in drbd_recv_short()
488 return rv; in drbd_recv_short()
493 int rv; in drbd_recv() local
495 rv = drbd_recv_short(tconn->data.socket, buf, size, 0); in drbd_recv()
497 if (rv < 0) { in drbd_recv()
498 if (rv == -ECONNRESET) in drbd_recv()
500 else if (rv != -ERESTARTSYS) in drbd_recv()
501 conn_err(tconn, "sock_recvmsg returned %d\n", rv); in drbd_recv()
502 } else if (rv == 0) { in drbd_recv()
517 if (rv != size) in drbd_recv()
521 return rv; in drbd_recv()
873 enum drbd_state_rv rv; in conn_connect() local
1065 rv = conn_request_state(tconn, NS(conn, C_WF_REPORT_PARAMS), CS_VERBOSE); in conn_connect()
1066 if (rv < SS_SUCCESS || tconn->cstate != C_WF_REPORT_PARAMS) { in conn_connect()
1146 int rv; in drbd_flush() local
1158 rv = blkdev_issue_flush(mdev->ldev->backing_bdev, in drbd_flush()
1160 if (rv) { in drbd_flush()
1161 dev_info(DEV, "local disk flush failed with status %d\n", rv); in drbd_flush()
1171 if (rv) in drbd_flush()
1190 enum finish_epoch rv = FE_STILL_LIVE; in drbd_may_finish_epoch() local
1232 if (rv == FE_STILL_LIVE) in drbd_may_finish_epoch()
1233 rv = FE_DESTROYED; in drbd_may_finish_epoch()
1238 if (rv == FE_STILL_LIVE) in drbd_may_finish_epoch()
1239 rv = FE_RECYCLED; in drbd_may_finish_epoch()
1251 return rv; in drbd_may_finish_epoch()
1419 int rv; in receive_Barrier() local
1428 rv = drbd_may_finish_epoch(tconn, tconn->current_epoch, EV_GOT_BARRIER_NR); in receive_Barrier()
1437 if (rv == FE_RECYCLED) in receive_Barrier()
1935 bool rv = 0; in overlapping_resync_write() local
1941 rv = 1; in overlapping_resync_write()
1947 return rv; in overlapping_resync_write()
2555 int self, peer, rv = -100; in drbd_asb_recover_0p() local
2579 rv = -1; in drbd_asb_recover_0p()
2583 rv = 1; in drbd_asb_recover_0p()
2589 rv = 1; in drbd_asb_recover_0p()
2593 rv = -1; in drbd_asb_recover_0p()
2601 rv = test_bit(RESOLVE_CONFLICTS, &mdev->tconn->flags) in drbd_asb_recover_0p()
2605 if (ch_peer == 0) { rv = 1; break; } in drbd_asb_recover_0p()
2606 if (ch_self == 0) { rv = -1; break; } in drbd_asb_recover_0p()
2612 rv = -1; in drbd_asb_recover_0p()
2614 rv = 1; in drbd_asb_recover_0p()
2617 rv = test_bit(RESOLVE_CONFLICTS, &mdev->tconn->flags) in drbd_asb_recover_0p()
2621 rv = -1; in drbd_asb_recover_0p()
2624 rv = 1; in drbd_asb_recover_0p()
2627 return rv; in drbd_asb_recover_0p()
2632 int hg, rv = -100; in drbd_asb_recover_1p() local
2652 rv = hg; in drbd_asb_recover_1p()
2654 rv = hg; in drbd_asb_recover_1p()
2657 rv = drbd_asb_recover_0p(mdev); in drbd_asb_recover_1p()
2674 rv = hg; in drbd_asb_recover_1p()
2677 rv = hg; in drbd_asb_recover_1p()
2680 return rv; in drbd_asb_recover_1p()
2685 int hg, rv = -100; in drbd_asb_recover_2p() local
2703 rv = drbd_asb_recover_0p(mdev); in drbd_asb_recover_2p()
2720 rv = hg; in drbd_asb_recover_2p()
2723 rv = hg; in drbd_asb_recover_2p()
2726 return rv; in drbd_asb_recover_2p()
2946 enum drbd_conns rv = C_MASK; in drbd_sync_handshake() local
3083 rv = C_WF_BITMAP_S; in drbd_sync_handshake()
3085 rv = C_WF_BITMAP_T; in drbd_sync_handshake()
3087 rv = C_CONNECTED; in drbd_sync_handshake()
3094 return rv; in drbd_sync_handshake()
3775 enum drbd_state_rv rv; in receive_req_state() local
3793 rv = drbd_change_state(mdev, CS_VERBOSE, mask, val); in receive_req_state()
3794 drbd_send_sr_reply(mdev, rv); in receive_req_state()
3805 enum drbd_state_rv rv; in receive_req_conn_state() local
3819 rv = conn_request_state(tconn, mask, val, CS_VERBOSE | CS_LOCAL_ONLY | CS_IGN_OUTD_FAIL); in receive_req_conn_state()
3820 conn_send_sr_reply(tconn, rv); in receive_req_conn_state()
3832 int rv; in receive_state() local
3974 rv = _drbd_set_state(mdev, ns, cs_flags, NULL); in receive_state()
3978 if (rv < SS_SUCCESS) { in receive_state()
4282 enum drbd_state_rv rv; in receive_bitmap() local
4288 rv = _drbd_request_state(mdev, NS(conn, C_WF_SYNC_UUID), CS_VERBOSE); in receive_bitmap()
4289 D_ASSERT(rv == SS_SUCCESS); in receive_bitmap()
4690 int err, rv; in drbd_do_auth() local
4703 rv = crypto_hash_setkey(tconn->cram_hmac_tfm, (u8 *)secret, key_len); in drbd_do_auth()
4704 if (rv) { in drbd_do_auth()
4705 conn_err(tconn, "crypto_hash_setkey() failed with %d\n", rv); in drbd_do_auth()
4706 rv = -1; in drbd_do_auth()
4714 rv = 0; in drbd_do_auth()
4717 rv = !conn_send_command(tconn, sock, P_AUTH_CHALLENGE, 0, in drbd_do_auth()
4719 if (!rv) in drbd_do_auth()
4724 rv = 0; in drbd_do_auth()
4731 rv = 0; in drbd_do_auth()
4737 rv = -1; in drbd_do_auth()
4744 rv = -1; in drbd_do_auth()
4750 rv = 0; in drbd_do_auth()
4758 rv = -1; in drbd_do_auth()
4765 rv = crypto_hash_digest(&desc, &sg, sg.length, response); in drbd_do_auth()
4766 if (rv) { in drbd_do_auth()
4767 conn_err(tconn, "crypto_hash_digest() failed with %d\n", rv); in drbd_do_auth()
4768 rv = -1; in drbd_do_auth()
4773 rv = 0; in drbd_do_auth()
4776 rv = !conn_send_command(tconn, sock, P_AUTH_RESPONSE, 0, in drbd_do_auth()
4778 if (!rv) in drbd_do_auth()
4783 rv = 0; in drbd_do_auth()
4790 rv = 0; in drbd_do_auth()
4796 rv = 0; in drbd_do_auth()
4802 rv = 0; in drbd_do_auth()
4809 rv = -1; in drbd_do_auth()
4815 rv = crypto_hash_digest(&desc, &sg, sg.length, right_response); in drbd_do_auth()
4816 if (rv) { in drbd_do_auth()
4817 conn_err(tconn, "crypto_hash_digest() failed with %d\n", rv); in drbd_do_auth()
4818 rv = -1; in drbd_do_auth()
4822 rv = !memcmp(response, right_response, resp_size); in drbd_do_auth()
4824 if (rv) in drbd_do_auth()
4828 rv = -1; in drbd_do_auth()
4835 return rv; in drbd_do_auth()
5253 int rv; in drbd_asender() local
5263 rv = sched_setscheduler(current, SCHED_RR, ¶m); in drbd_asender()
5264 if (rv < 0) in drbd_asender()
5265 conn_err(tconn, "drbd_asender: ERROR set priority, ret=%d\n", rv); in drbd_asender()
5302 rv = drbd_recv_short(tconn->meta.socket, buf, expect-received, 0); in drbd_asender()
5317 if (likely(rv > 0)) { in drbd_asender()
5318 received += rv; in drbd_asender()
5319 buf += rv; in drbd_asender()
5320 } else if (rv == 0) { in drbd_asender()
5335 } else if (rv == -EAGAIN) { in drbd_asender()
5347 } else if (rv == -EINTR) { in drbd_asender()
5350 conn_err(tconn, "sock_recvmsg returned %d\n", rv); in drbd_asender()