mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
drbd: Derive sync-UUIDs only from the bitmap-uuid if it is non-zero
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
7b4e4d3126
commit
5ba3dac521
1 changed files with 5 additions and 1 deletions
|
|
@ -2138,7 +2138,11 @@ int drbd_gen_and_send_sync_uuid(struct drbd_conf *mdev)
|
|||
|
||||
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_print_uuids(mdev, "updated sync UUID");
|
||||
drbd_md_sync(mdev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue