Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346066
b: refs/heads/master
c: dcb20d1
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent b62bd24 commit 371e643
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c5482bbd9607bf38cbc952eacaa429e6ba3160a0
refs/heads/master: dcb20d1a8e7d9602e52a9b673ae4d7f746d2cbb2
22 changes: 18 additions & 4 deletions trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1722,10 +1722,24 @@ _check_net_options(struct drbd_tconn *tconn, struct net_conf *old_conf, struct n
struct drbd_conf *mdev;
int i;

if (old_conf && tconn->agreed_pro_version < 100 &&
tconn->cstate == C_WF_REPORT_PARAMS &&
new_conf->wire_protocol != old_conf->wire_protocol)
return ERR_NEED_APV_100;
if (old_conf && tconn->cstate == C_WF_REPORT_PARAMS && tconn->agreed_pro_version < 100) {
if (new_conf->wire_protocol != old_conf->wire_protocol)
return ERR_NEED_APV_100;

if (new_conf->two_primaries != old_conf->two_primaries)
return ERR_NEED_APV_100;

if (!new_conf->integrity_alg != !old_conf->integrity_alg)
return ERR_NEED_APV_100;

if (strcmp(new_conf->integrity_alg, old_conf->integrity_alg))
return ERR_NEED_APV_100;
}

if (!new_conf->two_primaries &&
conn_highest_role(tconn) == R_PRIMARY &&
conn_highest_peer(tconn) == R_PRIMARY)
return ERR_NEED_ALLOW_TWO_PRI;

if (new_conf->two_primaries &&
(new_conf->wire_protocol != DRBD_PROT_C))
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/drbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ enum drbd_ret_code {
ERR_MINOR_EXISTS = 161,
ERR_INVALID_REQUEST = 162,
ERR_NEED_APV_100 = 163,
ERR_NEED_ALLOW_TWO_PRI = 164,

/* insert new ones above this line */
AFTER_LAST_ERR_CODE
Expand Down

0 comments on commit 371e643

Please sign in to comment.