From 25b0d6c8c16b2bf6a0430ec9cf137297db4e85e5 Mon Sep 17 00:00:00 2001 From: Philipp Reisner Date: Tue, 14 Feb 2012 12:12:35 +0100 Subject: drbd: Reinstate disabling AL updates with invalidate-remote Commit d0ef827e (drbd: switch configuration interface from connector to genetlink) introduced a regression by removing the ability to set all bits in the out of sync bitmap and to suspend updates to the activity log of a disconnected device via the invalidate-remote management call. Credits for reporting the issue are going to Arne Redlich. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_state.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/block/drbd/drbd_state.c') diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index 05ed131a5a87..c0563a1aac4d 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c @@ -628,6 +628,11 @@ is_valid_conn_transition(enum drbd_conns oc, enum drbd_conns nc) if (oc == C_STANDALONE && nc != C_UNCONNECTED) return SS_NEED_CONNECTION; + /* When establishing a connection we need to go through WF_REPORT_PARAMS! + Necessary to do the right thing upon invalidate-remote on a disconnected resource */ + if (oc < C_WF_REPORT_PARAMS && nc >= C_CONNECTED) + return SS_NEED_CONNECTION; + /* After a network error only C_UNCONNECTED or C_DISCONNECTING may follow. */ if (oc >= C_TIMEOUT && oc <= C_TEAR_DOWN && nc != C_UNCONNECTED && nc != C_DISCONNECTING) return SS_IN_TRANSIENT_STATE; -- cgit v1.2.1