drbd: clear CRASHED_PRIMARY only after successful resync
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 27 Mar 2014 09:34:13 +0000 (10:34 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 10 Jul 2014 16:35:05 +0000 (18:35 +0200)
commit2f2abeae3cd139fb3581249388bf2018612a87e5
tree876f577c3153008b9833609d5e4c91b62a634048
parent506afb6248af577eb702c73f3da52a12f4c56a38
drbd: clear CRASHED_PRIMARY only after successful resync

If we lost a disk during the first resync after primary crash,
we could have prematurely cleared the CRASHED_PRIMARY flag.
Testing on C_CONNECTED is not what we meant there,
but testing for both peers to become D_UP_TO_DATE.

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