Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
8fe0b45208
!18 [sync] PR-17: 修复sanlk-reset -t命令无法执行
From: @openeuler-sync-bot 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
2023-03-08 07:34:54 +00:00
cherry530
7f49179203 fix sanlk-reset -t command error.
Signed-off-by: cherry530 <xuping33@huawei.com>
(cherry picked from commit 5b5c5cab206a4e3b0776ba9012ef761a27f924bc)
2023-03-08 11:24:52 +08:00
openeuler-ci-bot
959ef68ac3
!15 修复sanlock内存泄露问题
From: @handsome_brother 
Reviewed-by: @liuzhiqiang26, @solarhu, @zhuchunyi 
Signed-off-by: @liuzhiqiang26, @solarhu, @zhuchunyi
2022-11-08 11:28:53 +00:00
lihaoxiang
0e9c1785d2 sanlock:fix memory leak of lockspace renewal history 2022-10-19 04:28:28 -04:00
openeuler-ci-bot
136068fdcf !11 [sync] PR-10: update to 3.8.4
From: @openeuler-sync-bot
Reviewed-by: @liuzhiqiang26,@miao_kaibo
Signed-off-by: @liuzhiqiang26,@miao_kaibo
2021-11-30 03:10:00 +00:00
markeryang
4b45e3076d update to 3.8.4
(cherry picked from commit 690faef5967f203ad4a9a55f358d1a9e6e6882e2)
2021-11-29 09:44:55 +08:00
openeuler-ci-bot
e5a47d2dfd !6 add buildrequire gcc
From: @zhouwenpei
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-06-29 13:16:14 +00:00
zhouwenpei
4b3f712a7a add buildrequire gcc 2021-06-29 17:10:08 +08:00
openeuler-ci-bot
b50b0cdf00 !5 update to 3.8.2
From: @markeryang
Reviewed-by: @liuzhiqiang26,@small_leek
Signed-off-by: @volcanodragon,@small_leek
2021-01-29 08:57:11 +08:00
markeryang
5306c6c2b3 update to 3.8.2 2021-01-28 15:56:35 +08:00
5 changed files with 64 additions and 3 deletions

View File

@ -0,0 +1,30 @@
From 1fa8d43007b31115342002ac675c905d9f18fbd9 Mon Sep 17 00:00:00 2001
From: David Teigland <teigland@redhat.com>
Date: Thu, 3 Mar 2022 09:39:52 -0600
Subject: [PATCH] sanlock: fix memory leak of lockspace renewal_history
Leak was in original commit for "sanlock: renewal history"
6313c709722b3ba63234a75d1651a160bf1728ee.
With the default renewal history size, each lockspace that
was created would leak about 4kb of memory.
---
src/lockspace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/lockspace.c b/src/lockspace.c
index 2ebc247..d23dccd 100644
--- a/src/lockspace.c
+++ b/src/lockspace.c
@@ -939,6 +939,8 @@ static void free_sp(struct space *sp)
{
if (sp->lease_status.renewal_read_buf)
free(sp->lease_status.renewal_read_buf);
+ if (sp->renewal_history)
+ free(sp->renewal_history);
free(sp);
}
--
1.8.3.1

View File

@ -0,0 +1,13 @@
diff --git a/reset/sanlk_reset.c b/reset/sanlk_reset.c
index 9e952ab..3453449 100644
--- a/reset/sanlk_reset.c
+++ b/reset/sanlk_reset.c
@@ -717,7 +717,7 @@ int main(int argc, char *argv[])
int c;
int option_index = 0;
- c = getopt_long(argc, argv, "hVi:g:w:b:R:D",
+ c = getopt_long(argc, argv, "hVi:g:w:b:R:t:D",
long_options, &option_index);
if (c == -1)
break;

Binary file not shown.

BIN
sanlock-3.8.4.tar.gz Normal file

Binary file not shown.

View File

@ -1,12 +1,15 @@
Name: sanlock
Version: 3.8.1
Release: 2
Version: 3.8.4
Release: 3
Summary: A shared storage lock manager
License: GPLv2 and GPLv2+ and LGPLv2+
URL: https://pagure.io/sanlock/
Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz
BuildRequires: libblkid-devel libaio-devel python3 python3-devel systemd-units
Patch1: 0001-sanlock-fix-memory-leak-of-lockspace-renewal_history.patch
Patch2: Add-sanlk-reset-command-t-options.patch
BuildRequires: libblkid-devel libaio-devel python3 python3-devel systemd-units gcc
Requires(pre): shadow
Requires(post): systemd-units systemd-sysv
Requires(preun): systemd-units
@ -150,6 +153,21 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
%changelog
* Wed Mar 08 2023 xu_ping <xu_ping33@h-pattners.com> - 3.8.4-3
- fix sanlk-reset -t command error.
* Wed Oct 19 2022 lihaoxiang <lihaoxiang9@huawei.com> - 3.8.4-2
- sanlock:fix memory leak of lockspace renewal history
* Tue Nov 23 2021 yanglongkang <yanglongkang@huawei.com> - 3.8.4-1
- update to 3.8.4
* Tue Jun 29 2021 zhouwenpei <zhouwenpei1@huawei.com> - 3.8.2-2
- add buildrequire gcc.
* Thu Jan 14 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.2-1
- update package to 3.8.2
* Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.1-2
- remove python2 dependency