Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] [PATCH] drbd: Fix expression to check new replication state
@ 2017-05-24 10:02 Nick Wang
  2017-05-24 10:45 ` Roland Kammerer
  2017-05-24 10:47 ` Roland Kammerer
  0 siblings, 2 replies; 3+ messages in thread
From: Nick Wang @ 2017-05-24 10:02 UTC (permalink / raw)
  To: drbd-dev; +Cc: Lars Ellenberg

Only tell peers when replication link is established.

Signed-off-by: Nick Wang <nwang@suse.com>

CC: Lars Ellenberg <lars.ellenberg@linbit.com>
CC: drbd-dev@lists.linbit.com

---
 drbd/drbd-kernel-compat | 2 +-
 drbd/drbd_state.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drbd/drbd-kernel-compat b/drbd/drbd-kernel-compat
index bd3fb0d9..bca18431 160000
--- a/drbd/drbd-kernel-compat
+++ b/drbd/drbd-kernel-compat
@@ -1 +1 @@
-Subproject commit bd3fb0d970e496c9d374101888b15ecf3618fc8a
+Subproject commit bca18431a58fc53485d969f8745d886dd9537755
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c
index 9829d94f..816b8ffe 100644
--- a/drbd/drbd_state.c
+++ b/drbd/drbd_state.c
@@ -3040,7 +3040,7 @@ static int w_after_state_change(struct drbd_work *w, int unused)
 
 			/* Outdated myself, or became D_UP_TO_DATE tell peers */
 			if (disk_state[NEW] >= D_INCONSISTENT && disk_state[NEW] != disk_state[OLD] &&
-			    repl_state[OLD] >= L_ESTABLISHED && repl_state[OLD] >= L_ESTABLISHED)
+			    repl_state[OLD] >= L_ESTABLISHED && repl_state[NEW] >= L_ESTABLISHED)
 				send_state = true;
 
 			/* Skipped resync with peer_device, tell others... */
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-24 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 10:02 [Drbd-dev] [PATCH] drbd: Fix expression to check new replication state Nick Wang
2017-05-24 10:45 ` Roland Kammerer
2017-05-24 10:47 ` Roland Kammerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox