Commit 4033e7f1 authored by Philipp Reisner's avatar Philipp Reisner

Send a ping if we have an empty (0 blocks) resync. [Bugz 251]

  That is necessary to detect the loss of connection before doing
  the after resync UUID modifications. The bug was usually triggered
  by failing before-resync-target handlers.
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent d1bef1c4
......@@ -1388,6 +1388,10 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side)
(unsigned long) mdev->rs_total);
if (mdev->rs_total == 0) {
/* Peer still reachable? Beware of failing before-resync-target handlers! */
request_ping(mdev);
__set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(mdev->net_conf->ping_timeo*HZ/9); /* 9 instead 10 */
drbd_resync_finished(mdev);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment