File fix-stuck-resync-when-cancelled.patch of Package drbd.24680
commit eceb2bc40a31f06acdd8d3d12dd36156934ede04
Author: Philipp Reisner <philipp.reisner@linbit.com>
Date: Tue Sep 22 11:42:08 2020 +0200
drbd: Fix handing of P_NEG_RS_DREPLY packet
This code path needs to call rs_sectors_came_in() as in the cases
for P_RS_CANCEL_AHEAD and P_RS_CANCEL.
One of the consequences of not doing so is usually that the resync
is stuck.
diff --git a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
index 18d9fb1d..a9c0a610 100644
--- a/drbd/drbd_receiver.c
+++ b/drbd/drbd_receiver.c
@@ -8898,12 +8898,12 @@ static int got_NegRSDReply(struct drbd_connection *connection, struct packet_inf
mutex_unlock(&peer_device->resync_next_bit_mutex);
}
- rs_sectors_came_in(peer_device, size);
- mod_timer(&peer_device->resync_timer, jiffies + RS_MAKE_REQS_INTV);
break;
default:
BUG();
}
+ rs_sectors_came_in(peer_device, size);
+ mod_timer(&peer_device->resync_timer, jiffies + RS_MAKE_REQS_INTV);
put_ldev(device);
}