drbd: fix "stalled" empty resync
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 26 Sep 2011 13:24:56 +0000 (15:24 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 9 May 2012 13:15:47 +0000 (15:15 +0200)
commit40424e4a24bc500639cb4bf1bf846362b0e692a5
tree3747089f12567b97417121f01a7a0da19852da39
parent1e86ac48af137a3cfd48cba727e7abe132dfc8de
drbd: fix "stalled" empty resync

With sync-after dependencies, given "lucky" timing of pause/unpause
events, and the end of an empty (0 bits set) resync was sometimes not
detected on the SyncTarget, leading to a "stalled" SyncSource state.

Fixed this by expecting not only "Inconsistent -> UpToDate" but also
"Consistent -> UpToDate" transitions for the peer disk state
to end a resync.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_receiver.c