aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 41ccb580d5ac..91a4853d9eeb 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1514,6 +1514,13 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
1514 1514
1515 /* Do not change the order of the if above and the two below... */ 1515 /* Do not change the order of the if above and the two below... */
1516 if (os.pdsk == D_DISKLESS && ns.pdsk > D_DISKLESS) { /* attach on the peer */ 1516 if (os.pdsk == D_DISKLESS && ns.pdsk > D_DISKLESS) { /* attach on the peer */
1517 /* we probably will start a resync soon.
1518 * make sure those things are properly reset. */
1519 mdev->rs_total = 0;
1520 mdev->rs_failed = 0;
1521 atomic_set(&mdev->rs_pending_cnt, 0);
1522 drbd_rs_cancel_all(mdev);
1523
1517 drbd_send_uuids(mdev); 1524 drbd_send_uuids(mdev);
1518 drbd_send_state(mdev, ns); 1525 drbd_send_state(mdev, ns);
1519 } 1526 }
@@ -1681,10 +1688,6 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
1681 "ASSERT FAILED: disk is %s while going diskless\n", 1688 "ASSERT FAILED: disk is %s while going diskless\n",
1682 drbd_disk_str(mdev->state.disk)); 1689 drbd_disk_str(mdev->state.disk));
1683 1690
1684 mdev->rs_total = 0;
1685 mdev->rs_failed = 0;
1686 atomic_set(&mdev->rs_pending_cnt, 0);
1687
1688 if (ns.conn >= C_CONNECTED) 1691 if (ns.conn >= C_CONNECTED)
1689 drbd_send_state(mdev, ns); 1692 drbd_send_state(mdev, ns);
1690 1693