diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2012-08-17 09:09:13 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-09 08:08:19 -0500 |
commit | 08332d73250eec349b055843a503d45a9b5c13b6 (patch) | |
tree | ec23064ccd2e5f0e21ee883793d0682c5e9a784a /drivers/block/drbd | |
parent | 155522df5b8ac24ee66a903e51d5b3023b2a76f9 (diff) |
drbd: properly call drbd_rs_cancel_all() in drbd_disconnected()
drbd_disconnected() is supposed to clear the resync lru cache,
by calling drbd_rs_cancel_all().
We must do so before we call drbd_flush_workqueue(), as at least the
callback w_restart_disk_io() may wait for resync progres, and would
otherwise deadlock.
drbd_finish_peer_reqs() may again populate that cache, which will
then potentially be stale after the next resync handshake and bitmap
exchange, we have to do it again after that.
A stale resync lru cache causes no harm but ugly messages like this:
BAD! sector=196608s enr=6 rs_left=-256 rs_failed=0 count=256 cstate=SyncTarget
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 4ba530cf810f..d5afa0a81fd0 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -4526,6 +4526,10 @@ static int drbd_disconnected(struct drbd_conf *mdev) | |||
4526 | necessary to reclain net_ee in drbd_finish_peer_reqs(). */ | 4526 | necessary to reclain net_ee in drbd_finish_peer_reqs(). */ |
4527 | drbd_flush_workqueue(mdev); | 4527 | drbd_flush_workqueue(mdev); |
4528 | 4528 | ||
4529 | /* need to do it again, drbd_finish_peer_reqs() may have populated it | ||
4530 | * again via drbd_try_clear_on_disk_bm(). */ | ||
4531 | drbd_rs_cancel_all(mdev); | ||
4532 | |||
4529 | kfree(mdev->p_uuid); | 4533 | kfree(mdev->p_uuid); |
4530 | mdev->p_uuid = NULL; | 4534 | mdev->p_uuid = NULL; |
4531 | 4535 | ||