From: Philipp Reisner Date: Tue, 17 May 2011 12:48:55 +0000 (+0200) Subject: drbd: Disallow the peer_disk_state to be D_OUTDATED while connected X-Git-Tag: firefly_0821_release~7613^2~1152^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fa7d939663b61f5c2bd3436d3aa126d4c0f47aa8;p=firefly-linux-kernel-4.4.55.git drbd: Disallow the peer_disk_state to be D_OUTDATED while connected Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index fd308864833f..ce6a764e905b 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -745,6 +745,9 @@ is_valid_state(struct drbd_conf *mdev, union drbd_state ns) mdev->agreed_pro_version < 88) rv = SS_NOT_SUPPORTED; + else if (ns.conn >= C_CONNECTED && ns.pdsk == D_UNKNOWN) + rv = SS_CONNECTED_OUTDATES; + return rv; }