diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2010-07-19 11:41:04 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-14 12:38:31 -0400 |
commit | 1090c056c5eb6d5335cceb381683e77ac24c71ab (patch) | |
tree | 66c38894d55a57797a27569ec77dd5090a9b08f3 /drivers | |
parent | ee15b038164fcf19b798021762dee3cf5cbc6433 (diff) |
drbd: drbd_md_sync before calling user space helpers
Just in case we have some pending meta data changes to sync, do it
before we call our userland helper, as that may take some time,
or even cause a hard reboot.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index e0061a906ba8..5b30f90cab3e 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -172,6 +172,10 @@ int drbd_khelper(struct drbd_conf *mdev, char *cmd) | |||
172 | put_net_conf(mdev); | 172 | put_net_conf(mdev); |
173 | } | 173 | } |
174 | 174 | ||
175 | /* The helper may take some time. | ||
176 | * write out any unsynced meta data changes now */ | ||
177 | drbd_md_sync(mdev); | ||
178 | |||
175 | dev_info(DEV, "helper command: %s %s %s\n", usermode_helper, cmd, mb); | 179 | dev_info(DEV, "helper command: %s %s %s\n", usermode_helper, cmd, mb); |
176 | 180 | ||
177 | drbd_bcast_ev_helper(mdev, cmd); | 181 | drbd_bcast_ev_helper(mdev, cmd); |