Compare commits

..

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
36ea0574e8
!19 [sync] PR-18: Synchronize Version
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-11-07 02:29:10 +00:00
zhanchengbin
bea9dc5f80 synchronize version
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
(cherry picked from commit 689b74917559a5ea0af72e98d7c9ee7da3e0e386)
2022-11-07 10:16:13 +08:00
openeuler-ci-bot
02efdd4dc4 !17 [sync] PR-11: 修复cachefilesd组件反复重启概率coredump问题
From: @openeuler-sync-bot
Reviewed-by: @liuzhiqiang26
Signed-off-by: @liuzhiqiang26
2021-11-30 02:09:33 +00:00
volcanodragon
d8eaa9e9a4 fix to support 64 bit sec
(cherry picked from commit aeaef89dfdec40db86a1218483e1dfd23425aea5)
2021-11-30 09:29:17 +08:00
volcanodragon
9041e67f24 fix to support 64 bit
(cherry picked from commit 018d790f16f1933c5235d17e34d5668b96abf652)
2021-11-30 09:29:17 +08:00
openeuler-ci-bot
b0eeb21f32 !5 cachefilesd delete -S git from %autosetup, and delete BuildRequires git
From: @chenyanpanHW
Reviewed-by: @liuzhiqiang26
Signed-off-by: @liuzhiqiang26
2021-07-31 02:46:20 +00:00
chenyanpanHW
15c4d73def
delete -S git from %autosetup, and delete BuildRequires git 2021-07-30 22:25:30 +08:00
openeuler-ci-bot
1f91d9736c !3 update source0 url in spec file
Merge pull request !3 from lihaotian/new
2020-09-08 21:17:25 +08:00
lihaotian9
81767c38da Update the source0 url in spec file 2020-09-08 17:43:05 +08:00
openeuler-ci-bot
b8fa7f21e4 !2 【轻量级 PR】:update cachefilesd.yaml.
Merge pull request !2 from licihua/N/A
2020-07-10 15:54:10 +08:00
licihua
b55359e1b7 update cachefilesd.yaml. 2020-07-10 15:44:39 +08:00
3 changed files with 66 additions and 5 deletions

View File

@ -0,0 +1,44 @@
From 3349ade9c1f40c0999c722dda4cd84b9869bebe2 Mon Sep 17 00:00:00 2001
From: lixiaokeng <lixiaokeng@huawei.com>
Date: Mon, 29 Nov 2021 21:15:56 +0800
Subject: [PATCH] cachefilesd: fix abort() in decant_cull_table
decant_cull_table only deals data with 32 bit, we should fix it
to support 64 bit, or it will coredump.
Signed-off-by: lixiaokeng <lixiaokeng@huawei.com>
Signed-off-by: volcanodragon <linfeilong@huawei.com>
---
cachefilesd.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/cachefilesd.c b/cachefilesd.c
index d4d236f..e9de4e4 100644
--- a/cachefilesd.c
+++ b/cachefilesd.c
@@ -1512,6 +1512,13 @@ static void decant_cull_table(void)
{
unsigned loop, avail, copy, leave, space, n;
+ long mask = 15;
+ long illegal = 6;
+
+ /* 8 is bit of byte, 4 is valid bit of mask and illegal */
+ mask = mask << (sizeof(void *) * 8 - 4);
+ illegal = illegal << (sizeof(void *) * 8 - 4);
+
if (scan_cursor)
error("Can't decant cull table whilst scanning");
@@ -1567,7 +1574,7 @@ static void decant_cull_table(void)
check:
for (loop = 0; loop < nr_in_ready_table; loop++)
- if (((long)cullready[loop] & 0xf0000000) == 0x60000000)
+ if (((long)cullready[loop] & mask) == illegal)
abort();
}
--
1.8.3.1

View File

@ -1,13 +1,15 @@
Name: cachefilesd
Version: 0.10.10
Release: 6
Release: 10
Summary: CacheFiles user-space management daemon
Group: System Environment/Daemons
License: GPLv2+
URL: http://people.redhat.com/~dhowells/fscache/
Source0: http://people.redhat.com/dhowells/fscache/cachefilesd-%{version}.tar.bz2
Source0: https://people.redhat.com/dhowells/cachefs/cachefilesd-%{version}.tar.bz2
BuildRequires: gcc systemd-units git
Patch1: 0001-cachefilesd-fix-abort-in-decant_cull_table.patch
BuildRequires: gcc systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
@ -25,7 +27,7 @@ Summary:Files for cachefilesd help
Files for cachefilesd help
%prep
%autosetup -n %{name}-%{version} -S git -p1
%autosetup -n %{name}-%{version} -p1
%build
make all CFLAGS="-Wall -Werror $RPM_OPT_FLAGS $RPM_LD_FLAGS $ARCH_OPT_FLAGS"
@ -62,6 +64,21 @@ install -D -m 644 cachefilesd.service %{buildroot}%{_unitdir}/cachefilesd.servic
%{_mandir}/*/*
%changelog
* Fri Nov 4 2022 zhanchengbin <zhanchengbin1@huawei.com> - 0.10.10-10
- DESC: synchronize version
* Mon Nov 29 2021 volcanodragon <linfeilong@huawei.com> - 0.10.10-9
- DESC: fix decant_cull_table to support 64 bit.
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.10.10-8
- DESC: delete -S git from %autosetup, and delete BuildRequires git
* Tue Sep 8 2020 lihaotian<lihaotian9@huawei.com> - 0.10.10-7
- Type:bugfix
- ID:NA
- SUG:restart
- DESC:Update the source0 url
* Fri Sep 6 2019 sunshihao<sunshihao@huawei.com> - 0.10.10-6
- Type:enhancemnet
- ID:NA

View File

@ -1,4 +1,4 @@
version_control: git
src_repo: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/cachefilesd.git
src_repo: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/cachefilesd.git
tag_prefix: "^v"
seperator: "."