drbd: Allow online change of replication protocol only with agreed_pv >= 100
authorPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Apr 2011 01:16:10 +0000 (18:16 -0700)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:45:18 +0000 (16:45 +0100)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_nl.c
include/linux/drbd.h

index 40de384aade6963e821333341bb9f293bf0a41c8..d4b29fd603f4d0a57e8ebdfcf5642a1bfe0cb906 100644 (file)
@@ -1671,6 +1671,11 @@ check_net_options(struct drbd_tconn *tconn, struct net_conf *new_conf)
        struct drbd_conf *mdev;
        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 &&
            (new_conf->wire_protocol != DRBD_PROT_C))
                return ERR_NOT_PROTO_C;
index fe8d6ba31bcbd3f47cfd06b4ac6c4780e19ce12b..6c7c85d8fc41e64faa04db8a7bb04b7088bd7751 100644 (file)
@@ -160,6 +160,7 @@ enum drbd_ret_code {
        ERR_MINOR_CONFIGURED    = 160,
        ERR_MINOR_EXISTS        = 161,
        ERR_INVALID_REQUEST     = 162,
+       ERR_NEED_APV_100        = 163,
 
        /* insert new ones above this line */
        AFTER_LAST_ERR_CODE
This page took 0.029281 seconds and 5 git commands to generate.