File fix-resync-finished-with-syncs-have-bits-set.patch of Package drbd.5899

diff -Naur drbd-9.0.6+git.08cda19.orig/drbd/drbd_receiver.c drbd-9.0.6+git.08cda19/drbd/drbd_receiver.c
--- drbd-9.0.6+git.08cda19.orig/drbd/drbd_receiver.c	2017-06-27 16:27:58.070700535 +0800
+++ drbd-9.0.6+git.08cda19/drbd/drbd_receiver.c	2017-06-27 16:28:48.570767775 +0800
@@ -6178,7 +6178,8 @@
 		/* if peer_state changes to connected at the same time,
 		 * it explicitly notifies us that it finished resync.
 		 * Maybe we should finish it up, too? */
-		else if (peer_state.conn == L_ESTABLISHED) {
+		else if (peer_state.conn == L_ESTABLISHED &&
+				peer_disk_state > D_NEGOTIATING) {
 			bool finish_now = false;
 
 			if (old_peer_state.conn == L_WF_BITMAP_S) {
openSUSE Build Service is sponsored by