From 82ed521242789352a4bdea258272d0b43abf1d3e Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Thu, 21 Jan 2021 06:10:58 +0000 Subject: [PATCH] import sanlock-3.8.3-1.el8 --- .gitignore | 2 +- .sanlock.metadata | 2 +- .../0001-config-Add-max_worker_threads.patch | 69 ------------------- ...ock-Report-actual-max_worker_threads.patch | 37 ---------- SPECS/sanlock.spec | 17 ++--- 5 files changed, 6 insertions(+), 121 deletions(-) delete mode 100644 SOURCES/0001-config-Add-max_worker_threads.patch delete mode 100644 SOURCES/0002-sanlock-Report-actual-max_worker_threads.patch diff --git a/.gitignore b/.gitignore index 36691d7..2ac3120 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/sanlock-3.8.2.tar.gz +SOURCES/sanlock-3.8.3.tar.gz diff --git a/.sanlock.metadata b/.sanlock.metadata index 39dbde2..4b5fe8c 100644 --- a/.sanlock.metadata +++ b/.sanlock.metadata @@ -1 +1 @@ -e75e6dcf8da0bae4cb4a739046bffa706ffcab9a SOURCES/sanlock-3.8.2.tar.gz +b860d082a129a6d80e6e79353fd9da1d60269bfa SOURCES/sanlock-3.8.3.tar.gz diff --git a/SOURCES/0001-config-Add-max_worker_threads.patch b/SOURCES/0001-config-Add-max_worker_threads.patch deleted file mode 100644 index cdbaf01..0000000 --- a/SOURCES/0001-config-Add-max_worker_threads.patch +++ /dev/null @@ -1,69 +0,0 @@ -From e722c69cef883af1f7d60cbb2708f0092dbf2ab0 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Mon, 30 Nov 2020 15:02:33 -0600 -Subject: [PATCH] config: Add max_worker_threads - -Concurrent async add_lockspace calls are limited by the number of worker -threads. Using larger number of worker threads shorten the time to add -many locksapces in large setups. - -Previously this value could be modified only via the command line. Now -it can be modified via the sanlock configuration file for easier -deployment. - -Buglink: https://bugzilla.redhat.com/1902468 -Signed-off-by: Nir Soffer ---- - src/main.c | 7 +++++++ - src/sanlock.8 | 5 +++++ - src/sanlock.conf | 3 +++ - 3 files changed, 15 insertions(+) - -diff --git a/src/main.c b/src/main.c -index e2901f3667a9..63d8cffd036c 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -2877,6 +2877,13 @@ static void read_config_file(void) - } else { - log_error("ignore unknown max_sectors_kb %s", str); - } -+ -+ } else if (!strcmp(str, "max_worker_threads")) { -+ get_val_int(line, &val); -+ if (val < DEFAULT_MIN_WORKER_THREADS) -+ val = DEFAULT_MIN_WORKER_THREADS; -+ com.max_worker_threads = val; -+ - } - } - -diff --git a/src/sanlock.8 b/src/sanlock.8 -index a9126a484cf4..2021b4ac2f5a 100644 ---- a/src/sanlock.8 -+++ b/src/sanlock.8 -@@ -1372,6 +1372,11 @@ The io timeout to use when initializing ondisk lease structures - for a lockspace or resource. This timeout is not used as a part - of either lease algorithm (as the standard io_timeout is.) - -+.IP \[bu] 2 -+max_worker_threads = -+.br -+See -t -+ - .SH SEE ALSO - .BR wdmd (8) - -diff --git a/src/sanlock.conf b/src/sanlock.conf -index 9b78e5cff236..2909a9cbc9d6 100644 ---- a/src/sanlock.conf -+++ b/src/sanlock.conf -@@ -66,3 +66,6 @@ - # - # write_init_io_timeout = - # command line: n/a -+# -+# max_worker_threads = 8 -+# command line: -t 8 --- -2.7.5 - diff --git a/SOURCES/0002-sanlock-Report-actual-max_worker_threads.patch b/SOURCES/0002-sanlock-Report-actual-max_worker_threads.patch deleted file mode 100644 index 361ac35..0000000 --- a/SOURCES/0002-sanlock-Report-actual-max_worker_threads.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 32a73a539432dbbca7187ddafd4a2b2ae91ea1f8 Mon Sep 17 00:00:00 2001 -From: Nir Soffer -Date: Sun, 6 Dec 2020 20:14:11 +0200 -Subject: [PATCH] sanlock: Report actual max_worker_threads - -Report actual max_worker_threads in "sanlock client status -D". This -allows detecting the issue when sanlock configuration was updated, but -sanlock daemon needs a restart to pick up the new configuration. - -Signed-off-by: Nir Soffer ---- - src/cmd.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/cmd.c b/src/cmd.c -index a5fa30f0680f..3137df08cd84 100644 ---- a/src/cmd.c -+++ b/src/cmd.c -@@ -2265,6 +2265,7 @@ static int print_state_daemon(char *str) - "max_sectors_kb_ignore=%d " - "max_sectors_kb_align=%d " - "max_sectors_kb_num=%d " -+ "max_worker_threads=%d " - "write_init_io_timeout=%u " - "use_aio=%d " - "kill_grace_seconds=%d " -@@ -2292,6 +2293,7 @@ static int print_state_daemon(char *str) - com.max_sectors_kb_ignore, - com.max_sectors_kb_align, - com.max_sectors_kb_num, -+ com.max_worker_threads, - com.write_init_io_timeout, - main_task.use_aio, - kill_grace_seconds, --- -2.7.5 - diff --git a/SPECS/sanlock.spec b/SPECS/sanlock.spec index 6ba19cc..da02a4f 100644 --- a/SPECS/sanlock.spec +++ b/SPECS/sanlock.spec @@ -1,6 +1,6 @@ Name: sanlock -Version: 3.8.2 -Release: 3%{?dist} +Version: 3.8.3 +Release: 1%{?dist} Summary: A shared storage lock manager Group: System Environment/Base @@ -23,9 +23,6 @@ Requires(preun): systemd-units Requires(postun): systemd-units Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz -Patch0: 0001-config-Add-max_worker_threads.patch -Patch1: 0002-sanlock-Report-actual-max_worker_threads.patch - %global python_package python3-%{name} %description @@ -34,9 +31,6 @@ The sanlock daemon manages leases for applications on hosts using shared storage %prep %setup -q -%patch0 -p1 -b .0001-config-Add-max_worker_threads.patch -%patch1 -p1 -b .0002-sanlock-Report-actual-max_worker_threads.patch - %build # upstream does not require configure # upstream does not support _smp_mflags @@ -189,11 +183,8 @@ common sanlock lockspace. %changelog -* Tue Jan 12 2021 David Teigland 3.8.2-3 -- rebuild with new version number - -* Wed Jan 06 2021 David Teigland 3.8.2-2 -- allow max_worker_threads to be set in config file +* Tue Jan 19 2021 David Teigland 3.8.3-1 +- Update to sanlock-3.8.3 * Mon Aug 10 2020 David Teigland 3.8.2-1 - Update to sanlock-3.8.2