drbd: Fix expression to check new replication state
PATCH 1/1 drbd: Fix expression to check new replication state
Only tell peers when replication link is established.
Signed-off-by Nick Wang <[email protected]>
CC Lars Ellenberg <[email protected]>
--- drbd/drbd-kernel-compat | 2 +- drbd/drbd_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drbd/drbd-kernel-compat +1 -1
@@ -1 +1 @@ -Subproject commit bd3fb0d970e496c9d374101888b15ecf3618fc8a +Subproject commit bca18431a58fc53485d969f8745d886dd9537755
drbd/drbd_state.c +1 -1
@@ -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... */
Signature · 1 line
2.12.0
Quoted 35 lines · Nick Wang
Only tell peers when replication link is established.
Signed-off-by Nick Wang <[email protected]>CC Lars Ellenberg <[email protected]>--- drbd/drbd-kernel-compat | 2 +- drbd/drbd_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drbd/drbd-kernel-compat +1
-1@@ -1 +1 @@ -Subproject commit bd3fb0d970e496c9d374101888b15ecf3618fc8a +Subproject commit bca18431a58fc53485d969f8745d886dd9537755drbd/drbd_state.c +1
-1@@ -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... */ Signature · 1 line
2.12.0
Correct. In that case Phil was faster, I pushed the current state to public.
http://git.linbit.com/drbd-9.0.git/commit/c654bbe36bcba33ab40a43f730d86bad97804879
Thanks, rck
Signature · 6 lines
Roland Kammerer +43 1 817 82 92 - 70 [email protected] LINBIT | Keeping the Digital World Running DRBD – Corosync – Pacemaker
Quoted 39 lines · Nick Wang
Only tell peers when replication link is established.
Signed-off-by Nick Wang <[email protected]>CC Lars Ellenberg <[email protected]>--- drbd/drbd-kernel-compat | 2 +- drbd/drbd_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drbd/drbd-kernel-compat +1
-1@@ -1 +1 @@ -Subproject commit bd3fb0d970e496c9d374101888b15ecf3618fc8a +Subproject commit bca18431a58fc53485d969f8745d886dd9537755drbd/drbd_state.c +1
-1@@ -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... */ Signature · 6 lines
2.12.0 _______________________________________________ drbd-dev mailing list [email protected] http://lists.linbit.com/mailman/listinfo/drbd-dev
Sorry, refernced the wrong commit, that was it:
http://git.linbit.com/drbd-9.0.git/commit/11660a06ccf98128d305d11668d10d38987b5bba
Regards, rck
Signature · 6 lines
Roland Kammerer +43 1 817 82 92 - 70 [email protected] LINBIT | Keeping the Digital World Running DRBD – Corosync – Pacemaker