UNPLUG_QUEUED, /* only relevant with kernel 2.4 */
UNPLUG_REMOTE, /* sending a "UnplugRemote" could help */
MD_DIRTY, /* current uuids and flags not yet on disk */
- DISCARD_CONCURRENT, /* Set on one node, cleared on the peer! */
USE_DEGR_WFC_T, /* degr-wfc-timeout instead of wfc-timeout. */
CLUSTER_ST_CHANGE, /* Cluster wide state change going on... */
CL_ST_CHG_SUCCESS,
/* flag bits per tconn */
enum {
NET_CONGESTED, /* The data socket is congested */
+ DISCARD_CONCURRENT, /* Set on one node, cleared on the peer! */
};
struct drbd_tconn { /* is a resource from the config file */
if (drbd_request_state(mdev, NS(conn, C_WF_CONNECTION)) < SS_SUCCESS)
return -2;
- clear_bit(DISCARD_CONCURRENT, &mdev->flags);
+ clear_bit(DISCARD_CONCURRENT, &mdev->tconn->flags);
mdev->tconn->agreed_pro_version = 99;
/* agreed_pro_version must be smaller than 100 so we send the old
header (h80) in the first packet and in the handshake packet. */
sock_release(msock);
}
msock = s;
- set_bit(DISCARD_CONCURRENT, &mdev->flags);
+ set_bit(DISCARD_CONCURRENT, &mdev->tconn->flags);
break;
default:
dev_warn(DEV, "Error receiving initial packet\n");
/* don't get the req_lock yet,
* we may sleep in drbd_wait_peer_seq */
const int size = peer_req->i.size;
- const int discard = test_bit(DISCARD_CONCURRENT, &mdev->flags);
+ const int discard = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags);
DEFINE_WAIT(wait);
int first;
"Using discard-least-changes instead\n");
case ASB_DISCARD_ZERO_CHG:
if (ch_peer == 0 && ch_self == 0) {
- rv = test_bit(DISCARD_CONCURRENT, &mdev->flags)
+ rv = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags)
? -1 : 1;
break;
} else {
rv = 1;
else /* ( ch_self == ch_peer ) */
/* Well, then use something else. */
- rv = test_bit(DISCARD_CONCURRENT, &mdev->flags)
+ rv = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags)
? -1 : 1;
break;
case ASB_DISCARD_LOCAL:
case 1: /* self_pri && !peer_pri */ return 1;
case 2: /* !self_pri && peer_pri */ return -1;
case 3: /* self_pri && peer_pri */
- dc = test_bit(DISCARD_CONCURRENT, &mdev->flags);
+ dc = test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags);
return dc ? -1 : 1;
}
}
mask.i = be32_to_cpu(p->mask);
val.i = be32_to_cpu(p->val);
- if (test_bit(DISCARD_CONCURRENT, &mdev->flags) &&
+ if (test_bit(DISCARD_CONCURRENT, &mdev->tconn->flags) &&
test_bit(CLUSTER_ST_CHANGE, &mdev->flags)) {
drbd_send_sr_reply(mdev, SS_CONCURRENT_ST_CHG);
return true;