summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_state.c
diff options
context:
space:
mode:
authorPhilipp Reisner2012-02-14 12:12:35 +0100
committerPhilipp Reisner2012-11-08 16:58:15 +0100
commit25b0d6c8c16b2bf6a0430ec9cf137297db4e85e5 (patch)
treeffb5c0e7cd3e72732898f0eb77e94b57c84e582b /drivers/block/drbd/drbd_state.c
parentdrbd: explicitly clear unused dp_flags in drbd_send_block (diff)
downloadkernel-qcow2-linux-25b0d6c8c16b2bf6a0430ec9cf137297db4e85e5.tar.gz
kernel-qcow2-linux-25b0d6c8c16b2bf6a0430ec9cf137297db4e85e5.tar.xz
kernel-qcow2-linux-25b0d6c8c16b2bf6a0430ec9cf137297db4e85e5.zip
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 <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_state.c')
-rw-r--r--drivers/block/drbd/drbd_state.c5
1 files changed, 5 insertions, 0 deletions
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;