diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2010-10-14 07:37:40 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-14 13:08:58 -0400 |
commit | 856c50c7b616d50e1a3ccd4ce35f7814650fa594 (patch) | |
tree | 4ffcbe5f1ce700813516c6d73d188748366fe42a /drivers/block | |
parent | 9d282875d85ebc2b49362310677fc0dcd91b9db9 (diff) |
drbd: add some more explicit drbd_md_sync
It sometimes may take a while for the after state change work to be
scheduled, which does drbd_md_sync. At convenient places, we should do
explicit drbd_md_sync to have the new state information on disk as soon
as possible.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 5a4b6dcd48f2..6ec922c623a1 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -3804,6 +3804,9 @@ static void drbdd(struct drbd_conf *mdev) | |||
3804 | err_out: | 3804 | err_out: |
3805 | drbd_force_state(mdev, NS(conn, C_PROTOCOL_ERROR)); | 3805 | drbd_force_state(mdev, NS(conn, C_PROTOCOL_ERROR)); |
3806 | } | 3806 | } |
3807 | /* If we leave here, we probably want to update at least the | ||
3808 | * "Connected" indicator on stable storage. Do so explicitly here. */ | ||
3809 | drbd_md_sync(mdev); | ||
3807 | } | 3810 | } |
3808 | 3811 | ||
3809 | void drbd_flush_workqueue(struct drbd_conf *mdev) | 3812 | void drbd_flush_workqueue(struct drbd_conf *mdev) |
@@ -4685,10 +4688,12 @@ int drbd_asender(struct drbd_thread *thi) | |||
4685 | if (0) { | 4688 | if (0) { |
4686 | reconnect: | 4689 | reconnect: |
4687 | drbd_force_state(mdev, NS(conn, C_NETWORK_FAILURE)); | 4690 | drbd_force_state(mdev, NS(conn, C_NETWORK_FAILURE)); |
4691 | drbd_md_sync(mdev); | ||
4688 | } | 4692 | } |
4689 | if (0) { | 4693 | if (0) { |
4690 | disconnect: | 4694 | disconnect: |
4691 | drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); | 4695 | drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); |
4696 | drbd_md_sync(mdev); | ||
4692 | } | 4697 | } |
4693 | clear_bit(SIGNAL_ASENDER, &mdev->flags); | 4698 | clear_bit(SIGNAL_ASENDER, &mdev->flags); |
4694 | 4699 | ||