From: Philipp Reisner Date: Fri, 18 Jun 2010 14:03:20 +0000 (+0200) Subject: drbd: Disabled the crashed_primary detection for re-attach of last data while IO... X-Git-Tag: firefly_0821_release~7613^2~3690^2~67 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=894c6a946199cf91e52bc1864c3dc6529cceb3db;p=firefly-linux-kernel-4.4.55.git drbd: Disabled the crashed_primary detection for re-attach of last data while IO is frozen Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 5288bd72cd27..cda7cb3202b9 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -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; }