diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-06-11 13:26:34 +0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-14 16:59:21 +0400 |
commit | 43a5182cccae5850f7590f78dd9651bd407be440 (patch) | |
tree | b3bed34cdd96b8272134f3b00441f109193292af /drivers/block/drbd/drbd_nl.c | |
parent | 87f7be4cf88e93069f4cc63baf2ce70fdfc59c63 (diff) | |
download | linux-43a5182cccae5850f7590f78dd9651bd407be440.tar.xz |
drbd: Delayed creation of current-UUID
When a fencing policy of "resource-and-stonith" is configured,
and DRBD looses connection to it's peer, we can delay the
creation of a new current-UUID until IO gets thawed.
That allows one to deploy fence-peer handlers that actually
commit suicide on the machine they get started.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 32d00720470b..d764f3cd5866 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -1810,6 +1810,11 @@ static int drbd_nl_suspend_io(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nl static int drbd_nl_resume_io(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp, struct drbd_nl_cfg_reply *reply) { + if (test_bit(NEW_CUR_UUID, &mdev->flags)) { + drbd_uuid_new_current(mdev); + clear_bit(NEW_CUR_UUID, &mdev->flags); + drbd_md_sync(mdev); + } drbd_suspend_io(mdev); reply->ret_code = drbd_request_state(mdev, NS(susp, 0)); if (reply->ret_code == SS_SUCCESS) { |