Resolves: RHEL-140243
This commit is contained in:
parent
1aed6aeba8
commit
1241b5e77f
@ -0,0 +1,75 @@
|
||||
From b6f52406411d2421d0614244080cf7bc668c336b Mon Sep 17 00:00:00 2001
|
||||
From: David Teigland <teigland@redhat.com>
|
||||
Date: Tue, 13 Jan 2026 16:59:25 -0600
|
||||
Subject: [PATCH dlm/tool] dlm_controld: send plock operations without resource
|
||||
lookup
|
||||
|
||||
When plock_ownership mode is disabled, a plock operation read from
|
||||
the kernel can be sent to all nodes immediately, without looking up
|
||||
the local resource struct. This is faster, and it avoids a bug in
|
||||
cases where multiple threads in a process submit concurrent fcntl
|
||||
lock ops on a file.
|
||||
|
||||
This bug occurs because create/free of the resource struct should
|
||||
only be done in the context of ordered receive_plock cpg messages.
|
||||
plock unlock results were being incorrectly returned based on the
|
||||
non-existence of a struct resource checked in process_plocks (outside
|
||||
of the ordered message context.) In this case, the existence of the
|
||||
resource struct was used to imply a lock state ("no locks"), which is
|
||||
invalid to conclude outside of the message context. The bug would
|
||||
only appear in the unusual scenario where multiple threads in a
|
||||
process are running concurrent fcntl lock operations on a file.
|
||||
|
||||
This fix does not address the problem when plock_ownership is enabled,
|
||||
so warnings are added for the plock_ownership setting.
|
||||
---
|
||||
dlm_controld/dlm_controld.8 | 2 ++
|
||||
dlm_controld/main.c | 2 +-
|
||||
dlm_controld/plock.c | 5 +++++
|
||||
3 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlm_controld/dlm_controld.8 b/dlm_controld/dlm_controld.8
|
||||
index 3aab3885..3858be87 100644
|
||||
--- a/dlm_controld/dlm_controld.8
|
||||
+++ b/dlm_controld/dlm_controld.8
|
||||
@@ -50,6 +50,8 @@ For default settings, see dlm_controld -h.
|
||||
.B --plock_ownership | -o
|
||||
0|1
|
||||
enable/disable plock ownership
|
||||
+.br
|
||||
+ (WARNING: do not enable if threads perform fcntl locking.)
|
||||
|
||||
.B --drop_resources_time | -t
|
||||
.I int
|
||||
diff --git a/dlm_controld/main.c b/dlm_controld/main.c
|
||||
index 2dc6b91b..728b7464 100644
|
||||
--- a/dlm_controld/main.c
|
||||
+++ b/dlm_controld/main.c
|
||||
@@ -1841,7 +1841,7 @@ static void set_opt_defaults(void)
|
||||
set_opt_default(plock_ownership_ind,
|
||||
"plock_ownership", 'o', req_arg_bool,
|
||||
0, NULL, 0,
|
||||
- "enable/disable plock ownership");
|
||||
+ "enable/disable plock ownership (do not enable if threads do fcntl locking)");
|
||||
|
||||
set_opt_default(drop_resources_time_ind,
|
||||
"drop_resources_time", 't', req_arg_int,
|
||||
diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c
|
||||
index 992fb16f..56ea9765 100644
|
||||
--- a/dlm_controld/plock.c
|
||||
+++ b/dlm_controld/plock.c
|
||||
@@ -1569,6 +1569,11 @@ void process_plocks(int ci)
|
||||
plock_rate_delays = 0;
|
||||
}
|
||||
|
||||
+ if (!opt(plock_ownership_ind)) {
|
||||
+ send_plock(ls, NULL, &info);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
create = (info.optype == DLM_PLOCK_OP_UNLOCK) ? 0 : 1;
|
||||
|
||||
rv = find_resource(ls, info.number, create, &r);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
8
dlm.spec
8
dlm.spec
@ -1,6 +1,6 @@
|
||||
Name: dlm
|
||||
Version: 4.1.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2 and GPLv2+ and LGPLv2+
|
||||
# For a breakdown of the licensing, see README.license
|
||||
Group: System Environment/Kernel
|
||||
@ -18,6 +18,7 @@ Source0: https://releases.pagure.org/dlm/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-dlm_controld-better-uevent-filtering.patch
|
||||
Patch1: 0002-dlm_controld-terminate-uevent-buffer.patch
|
||||
Patch2: 0003-dlm_controld-handle-RELEASE_RECOVER-event-env.patch
|
||||
Patch3: 0001-dlm_controld-send-plock-operations-without-resource-.patch
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
ExclusiveArch: i686 x86_64
|
||||
@ -40,6 +41,7 @@ The kernel dlm requires a user daemon to control membership.
|
||||
%patch0 -p1 -b .backup0
|
||||
%patch1 -p1 -b .backup1
|
||||
%patch2 -p1 -b .backup2
|
||||
%patch3 -p1 -b .backup3
|
||||
|
||||
%build
|
||||
# upstream does not require configure
|
||||
@ -111,6 +113,10 @@ developing applications that use %{name}.
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%changelog
|
||||
* Tue Jan 20 2026 Alexander Aring <aahringo@redhat.com> - 4.1.0-3
|
||||
- Rebuild for posix lock issue fix
|
||||
Related: RHEL-140243
|
||||
|
||||
* Tue Dec 16 2025 Alexander Aring <aahringo@redhat.com> - 4.1.0-2
|
||||
- Rebuild for recover flag functionality
|
||||
Related: RHEL-136235
|
||||
|
||||
Loading…
Reference in New Issue
Block a user