Files
drbd/0005-drbd-Proper-locking-around-new_current_uuid-on-a-dis.patch
heming zhao e6b9fc6e91 Accepting request 1286295 from home:gsu:branches:network:ha-clustering:Factory
- drbd: fix build error against kernel v6.15 (boo#1244669)
  * add upstream patch
    + 0001-compat-follow-Linux-6.14-debugfs_change_name.patch
  * add suse special patch
    + boo1244669-fix_build_error_against_kernel_v6.15.patch
  * remove patch which is replaced by the upstream patch
    - boo1240916-fix_build_error_against_kernel_v6.14.patch

OBS-URL: https://build.opensuse.org/request/show/1286295
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=159
2025-06-17 11:56:00 +00:00

40 lines
1.2 KiB
Diff

From c7384276634be7c5b49ef0b8d7fa064927a207f8 Mon Sep 17 00:00:00 2001
From: Philipp Reisner <philipp.reisner@linbit.com>
Date: Wed, 14 Aug 2024 19:42:40 +0200
Subject: [PATCH 05/32] drbd: Proper locking around new_current_uuid on a
diskless
Like the current UUID of a diskful node, changing the exposed_uuid of
a diskless node needs to be serialized with the UUID exchange when
establishing new connections.
---
drbd/drbd_main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drbd/drbd_main.c b/drbd/drbd_main.c
index bc3283b045c9..2792b9896271 100644
--- a/drbd/drbd_main.c
+++ b/drbd/drbd_main.c
@@ -4827,7 +4827,10 @@ void drbd_uuid_new_current(struct drbd_device *device, bool forced)
current_uuid |= UUID_PRIMARY;
else
current_uuid &= ~UUID_PRIMARY;
+
+ down_write(&device->uuid_sem);
drbd_uuid_set_exposed(device, current_uuid, false);
+ downgrade_write(&device->uuid_sem);
drbd_info(device, "sending new current UUID: %016llX\n", current_uuid);
weak_nodes = drbd_weak_nodes_device(device);
@@ -4837,6 +4840,7 @@ void drbd_uuid_new_current(struct drbd_device *device, bool forced)
peer_device->current_uuid = current_uuid;
}
}
+ up_read(&device->uuid_sem);
}
}
--
2.35.3