From: Philipp Reisner Date: Mon, 22 Nov 2010 13:18:47 +0000 (+0100) Subject: drbd: Becoming sync target may not happen out of < C_WF_REPORT_PARAMS X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1fc80cf37810d6b00cac27a219b8ecab2010adac;p=linux-beck.git drbd: Becoming sync target may not happen out of < C_WF_REPORT_PARAMS This patch is acutally a necessary addendum to the patch "fix for spurious full sync (becoming sync target looked like invalidate)" 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 14afbd4e53a5..8b8a38dc6492 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -800,6 +800,10 @@ static int is_valid_state_transition(struct drbd_conf *mdev, os.conn < C_CONNECTED) rv = SS_NEED_CONNECTION; + if ((ns.conn == C_SYNC_TARGET || ns.conn == C_SYNC_SOURCE) + && os.conn < C_WF_REPORT_PARAMS) + rv = SS_NEED_CONNECTION; /* No NetworkFailure -> SyncTarget etc... */ + return rv; }