提交 b032b6fa 编写于 作者: P Philipp Reisner

drbd: Allow online change of replication protocol only with agreed_pv >= 100

Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 cd64397c
...@@ -1671,6 +1671,11 @@ check_net_options(struct drbd_tconn *tconn, struct net_conf *new_conf) ...@@ -1671,6 +1671,11 @@ check_net_options(struct drbd_tconn *tconn, struct net_conf *new_conf)
struct drbd_conf *mdev; struct drbd_conf *mdev;
int i; int i;
if (tconn->net_conf && tconn->agreed_pro_version < 100 &&
tconn->cstate == C_WF_REPORT_PARAMS &&
new_conf->wire_protocol != tconn->net_conf->wire_protocol)
return ERR_NEED_APV_100;
if (new_conf->two_primaries && if (new_conf->two_primaries &&
(new_conf->wire_protocol != DRBD_PROT_C)) (new_conf->wire_protocol != DRBD_PROT_C))
return ERR_NOT_PROTO_C; return ERR_NOT_PROTO_C;
......
...@@ -160,6 +160,7 @@ enum drbd_ret_code { ...@@ -160,6 +160,7 @@ enum drbd_ret_code {
ERR_MINOR_CONFIGURED = 160, ERR_MINOR_CONFIGURED = 160,
ERR_MINOR_EXISTS = 161, ERR_MINOR_EXISTS = 161,
ERR_INVALID_REQUEST = 162, ERR_INVALID_REQUEST = 162,
ERR_NEED_APV_100 = 163,
/* insert new ones above this line */ /* insert new ones above this line */
AFTER_LAST_ERR_CODE AFTER_LAST_ERR_CODE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册