Commit 5ba3dac5 authored by Philipp Reisner's avatar Philipp Reisner

drbd: Derive sync-UUIDs only from the bitmap-uuid if it is non-zero

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 7b4e4d31
...@@ -2138,7 +2138,11 @@ int drbd_gen_and_send_sync_uuid(struct drbd_conf *mdev) ...@@ -2138,7 +2138,11 @@ int drbd_gen_and_send_sync_uuid(struct drbd_conf *mdev)
D_ASSERT(mdev->state.disk == D_UP_TO_DATE); D_ASSERT(mdev->state.disk == D_UP_TO_DATE);
uuid = mdev->ldev->md.uuid[UI_BITMAP] + UUID_NEW_BM_OFFSET; uuid = mdev->ldev->md.uuid[UI_BITMAP];
if (uuid && uuid != UUID_JUST_CREATED)
uuid = uuid + UUID_NEW_BM_OFFSET;
else
get_random_bytes(&uuid, sizeof(u64));
drbd_uuid_set(mdev, UI_BITMAP, uuid); drbd_uuid_set(mdev, UI_BITMAP, uuid);
drbd_print_uuids(mdev, "updated sync UUID"); drbd_print_uuids(mdev, "updated sync UUID");
drbd_md_sync(mdev); drbd_md_sync(mdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment