Lines Matching refs:hg

3098 	int hg, rv = -100;  in drbd_asb_recover_1p()  local
3116 hg = drbd_asb_recover_0p(peer_device); in drbd_asb_recover_1p()
3117 if (hg == -1 && device->state.role == R_SECONDARY) in drbd_asb_recover_1p()
3118 rv = hg; in drbd_asb_recover_1p()
3119 if (hg == 1 && device->state.role == R_PRIMARY) in drbd_asb_recover_1p()
3120 rv = hg; in drbd_asb_recover_1p()
3128 hg = drbd_asb_recover_0p(peer_device); in drbd_asb_recover_1p()
3129 if (hg == -1 && device->state.role == R_PRIMARY) { in drbd_asb_recover_1p()
3140 rv = hg; in drbd_asb_recover_1p()
3143 rv = hg; in drbd_asb_recover_1p()
3155 int hg, rv = -100; in drbd_asb_recover_2p() local
3178 hg = drbd_asb_recover_0p(peer_device); in drbd_asb_recover_2p()
3179 if (hg == -1) { in drbd_asb_recover_2p()
3190 rv = hg; in drbd_asb_recover_2p()
3193 rv = hg; in drbd_asb_recover_2p()
3455 int hg, rule_nr, rr_conflict, tentative, always_asbp; in drbd_sync_handshake() local
3468 hg = drbd_uuid_compare(device, peer_role, &rule_nr); in drbd_sync_handshake()
3471 drbd_info(device, "uuid_compare()=%d by rule %d\n", hg, rule_nr); in drbd_sync_handshake()
3473 if (hg == -1000) { in drbd_sync_handshake()
3477 if (hg < -0x10000) { in drbd_sync_handshake()
3479 hg = -hg; in drbd_sync_handshake()
3480 proto = hg & 0xff; in drbd_sync_handshake()
3481 fflags = (hg >> 8) & 0xff; in drbd_sync_handshake()
3486 if (hg < -1000) { in drbd_sync_handshake()
3487 …drbd_alert(device, "To resolve this both sides have to support at least protocol %d\n", -hg - 1000… in drbd_sync_handshake()
3493 int f = (hg == -100) || abs(hg) == 2; in drbd_sync_handshake()
3494 hg = mydisk > D_INCONSISTENT ? 1 : -1; in drbd_sync_handshake()
3496 hg = hg*2; in drbd_sync_handshake()
3498 hg > 0 ? "source" : "target"); in drbd_sync_handshake()
3501 if (abs(hg) == 100) in drbd_sync_handshake()
3511 if (hg == 100 || (hg == -100 && always_asbp)) { in drbd_sync_handshake()
3514 int forced = (hg == -100); in drbd_sync_handshake()
3518 hg = drbd_asb_recover_0p(peer_device); in drbd_sync_handshake()
3521 hg = drbd_asb_recover_1p(peer_device); in drbd_sync_handshake()
3524 hg = drbd_asb_recover_2p(peer_device); in drbd_sync_handshake()
3527 if (abs(hg) < 100) { in drbd_sync_handshake()
3530 pcount, (hg < 0) ? "peer" : "this"); in drbd_sync_handshake()
3534 hg = hg*2; in drbd_sync_handshake()
3539 if (hg == -100) { in drbd_sync_handshake()
3541 hg = -1; in drbd_sync_handshake()
3543 hg = 1; in drbd_sync_handshake()
3545 if (abs(hg) < 100) in drbd_sync_handshake()
3548 (hg < 0) ? "peer" : "this"); in drbd_sync_handshake()
3551 if (hg == -100) { in drbd_sync_handshake()
3561 if (hg > 0 && mydisk <= D_INCONSISTENT) { in drbd_sync_handshake()
3566 if (hg < 0 && /* by intention we do not use mydisk here. */ in drbd_sync_handshake()
3582 if (hg == 0) in drbd_sync_handshake()
3586 drbd_conn_str(hg > 0 ? C_SYNC_SOURCE : C_SYNC_TARGET), in drbd_sync_handshake()
3587 abs(hg) >= 2 ? "full" : "bit-map based"); in drbd_sync_handshake()
3591 if (abs(hg) >= 2) { in drbd_sync_handshake()
3598 if (hg > 0) { /* become sync source. */ in drbd_sync_handshake()
3600 } else if (hg < 0) { /* become sync target */ in drbd_sync_handshake()