diff --git a/0004-add-dcache-parameter-support.patch b/0004-add-dcache-parameter-support.patch index bd8102b6025d4bb777d62556048a51bb741076b4..2814d156a3e3a03434ce6dcc89e54b299bd0b483 100644 --- a/0004-add-dcache-parameter-support.patch +++ b/0004-add-dcache-parameter-support.patch @@ -2,26 +2,6 @@ diff --git a/super.c b/super.c index 18f222c..aee7d47 100644 --- a/super.c +++ b/super.c -@@ -21,6 +21,9 @@ enum { - OPT_NO_OFFLINE_STASH, - OPT_NO_DENTRY_CACHE, - OPT_USER_ID, -+ OPT_DCACHE_THRESHOLD, -+ OPT_DCACHE_PRECISION, -+ OPT_DCACHE_TIMEOUT, - OPT_ERR, - }; - -@@ -33,6 +36,9 @@ static match_table_t hmdfs_tokens = { - { OPT_NO_OFFLINE_STASH, "no_offline_stash" }, - { OPT_NO_DENTRY_CACHE, "no_dentry_cache" }, - { OPT_USER_ID, "user_id=%s"}, -+ {OPT_DCACHE_THRESHOLD, "dcache_threshold=%d"}, -+ {OPT_DCACHE_PRECISION, "dcache_precision=%d"}, -+ {OPT_DCACHE_TIMEOUT, "dcache_timeout=%d"}, - { OPT_ERR, NULL }, - }; - @@ -150,6 +156,24 @@ int hmdfs_parse_options(struct hmdfs_sb_info *sbi, const char *data) sbi->user_id = user_id; } @@ -46,4 +26,4 @@ index 18f222c..aee7d47 100644 + break; default: err = -EINVAL; - goto out; \ No newline at end of file + goto out; diff --git a/hmdfs.spec b/hmdfs.spec index ddde46fba98238e8706c191d81966415d2c6f5e9..b8f3607b6083257fb867d3f407e0dc13338ad9c7 100644 --- a/hmdfs.spec +++ b/hmdfs.spec @@ -2,7 +2,7 @@ Name: hmdfs Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: HMDFS is an overlay file system. License: Apache License 2.0 @@ -10,6 +10,9 @@ URL: https://gitee.com/openharmony/kernel_linux_5.10/tree/OpenHarmony Source0: https://gitee.com/src-openeuler/hmdfs/%{name}-%{version}.tar.gz Patch0: 0001-add-makefile-used-on-openeuler.patch Patch1: 0002-bugfix-null-pointer-in-memcpy.patch +Patch2: 0003-file-system-improvement.patch +Patch3: 0004-add-dcache-parameter-support.patch + BuildRequires: gcc, make, kernel-devel @@ -18,9 +21,7 @@ HMDFS is an overlay file system. Relying on the underlying file system, under th # Decompress source code package, make patches to the source code. %prep -%setup -c -%patch0 -p1 -%patch1 -p1 +%autosetup -c -p1 # make. %build @@ -37,5 +38,8 @@ install -v %{name}.ko $RPM_BUILD_ROOT/%{hmdfs_dest_path}/ %changelog +* Tue Dec 10 2024 shenzhongwei - 1.0.0-2 +- Enable patch0003 and patch0004 + * Thu Apr 27 2023 hepeng - 1.0.0-1 - Package init