drbd: fix "stalled" empty resync
authorPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 29 Sep 2011 11:00:14 +0000 (13:00 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:58:04 +0000 (16:58 +0100)
commit9bcd2521827bb7c418a83a77474c449d6496d55c
treeaae5995f4d1d6b72d0a7ccd30d31fab01be29a45
parent22d81140aea85f9ac388fa12768dc502ef00eaae
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_nl.c
drivers/block/drbd/drbd_receiver.c