drbd: Disabled the crashed_primary detection for re-attach of last data while IO...
authorPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 18 Jun 2010 14:03:20 +0000 (16:03 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 12:55:11 +0000 (14:55 +0200)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_nl.c

index 5288bd72cd27e2f9830146985e5c856d35ee129f..cda7cb3202b9bc86791a8125558bc9d0a0687657 100644 (file)
@@ -1033,7 +1033,9 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
        else
                clear_bit(CRASHED_PRIMARY, &mdev->flags);
 
-       if (drbd_md_test_flag(mdev->ldev, MDF_PRIMARY_IND)) {
+       if (drbd_md_test_flag(mdev->ldev, MDF_PRIMARY_IND) &&
+           !(mdev->state.role == R_PRIMARY && mdev->state.susp &&
+             mdev->sync_conf.on_no_data == OND_SUSPEND_IO)) {
                set_bit(CRASHED_PRIMARY, &mdev->flags);
                cp_discovered = 1;
        }