aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_main.c12
-rw-r--r--drivers/block/drbd/drbd_receiver.c1
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 1caced08a73e..e0be4077d564 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1593,8 +1593,18 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
1593 if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED) 1593 if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED)
1594 drbd_send_state(mdev); 1594 drbd_send_state(mdev);
1595 1595
1596 if (os.conn > C_CONNECTED && ns.conn <= C_CONNECTED) 1596 /* This triggers bitmap writeout of potentially still unwritten pages
1597 * if the resync finished cleanly, or aborted because of peer disk
1598 * failure. Resync aborted because of connection failure does bitmap
1599 * writeout from drbd_disconnect.
1600 * For resync aborted because of local disk failure, we cannot do
1601 * any bitmap writeout anymore.
1602 */
1603 if (os.conn > C_CONNECTED && ns.conn == C_CONNECTED &&
1604 mdev->state.conn == C_CONNECTED && get_ldev(mdev)) {
1597 drbd_queue_bitmap_io(mdev, &drbd_bm_write, NULL, "write from resync_finished"); 1605 drbd_queue_bitmap_io(mdev, &drbd_bm_write, NULL, "write from resync_finished");
1606 put_ldev(mdev);
1607 }
1598 1608
1599 /* free tl_hash if we Got thawed and are C_STANDALONE */ 1609 /* free tl_hash if we Got thawed and are C_STANDALONE */
1600 if (ns.conn == C_STANDALONE && !is_susp(ns) && mdev->tl_hash) 1610 if (ns.conn == C_STANDALONE && !is_susp(ns) && mdev->tl_hash)
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 3ccc6c33a330..432fe8f6b5d2 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -3811,6 +3811,7 @@ static void drbd_disconnect(struct drbd_conf *mdev)
3811 3811
3812 fp = FP_DONT_CARE; 3812 fp = FP_DONT_CARE;
3813 if (get_ldev(mdev)) { 3813 if (get_ldev(mdev)) {
3814 drbd_bitmap_io(mdev, &drbd_bm_write, "write from disconnect");
3814 fp = mdev->ldev->dc.fencing; 3815 fp = mdev->ldev->dc.fencing;
3815 put_ldev(mdev); 3816 put_ldev(mdev);
3816 } 3817 }