Advertise support of FUSE_PARALLEL_DIROPS to kernel
Resolves: RHEL-24721 Signed-off-by: Pavel Reichl <preichl@redhat.com>
This commit is contained in:
parent
c619b1c175
commit
e98a1a13e7
@ -0,0 +1,42 @@
|
|||||||
|
From 2c736f516f28dfb5c58aff345c668a5ea6386295 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Miklos Szeredi <mszeredi@redhat.com>
|
||||||
|
Date: Wed, 10 Jan 2024 10:15:43 +0100
|
||||||
|
Subject: [PATCH] Don't set FUSE_CAP_PARALLEL_DIROPS by default
|
||||||
|
|
||||||
|
Allowing parallel dir operations could result in a crash in a filesystem
|
||||||
|
implementation that is not prepared for this.
|
||||||
|
|
||||||
|
To be safe keep this flag off by default (this is not a regression, since
|
||||||
|
there was no public release where this flag wasn't ignored).
|
||||||
|
|
||||||
|
If the filesystem wants better performance, then it should set this flag
|
||||||
|
explicitly.
|
||||||
|
|
||||||
|
Fixes: c9905341ea34 ("Pass FUSE_PARALLEL_DIROPS to kernel (#861)")
|
||||||
|
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
|
||||||
|
---
|
||||||
|
include/fuse_common.h | 2 --
|
||||||
|
lib/fuse_lowlevel.c | 1 -
|
||||||
|
2 files changed, 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/include/fuse_common.h
|
||||||
|
+++ b/include/fuse_common.h
|
||||||
|
@@ -313,8 +313,6 @@ struct fuse_loop_config {
|
||||||
|
* is unset, the FUSE kernel module will ensure that lookup() and
|
||||||
|
* readdir() requests are never issued concurrently for the same
|
||||||
|
* directory.
|
||||||
|
- *
|
||||||
|
- * This feature is enabled by default when supported by the kernel.
|
||||||
|
*/
|
||||||
|
#define FUSE_CAP_PARALLEL_DIROPS (1 << 18)
|
||||||
|
|
||||||
|
--- a/lib/fuse_lowlevel.c
|
||||||
|
+++ b/lib/fuse_lowlevel.c
|
||||||
|
@@ -2009,7 +2009,6 @@ void do_init(fuse_req_t req, fuse_ino_t
|
||||||
|
if ((cond) && (se->conn.capable & (cap))) \
|
||||||
|
se->conn.want |= (cap)
|
||||||
|
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_READ);
|
||||||
|
- LL_SET_DEFAULT(1, FUSE_CAP_PARALLEL_DIROPS);
|
||||||
|
LL_SET_DEFAULT(1, FUSE_CAP_AUTO_INVAL_DATA);
|
||||||
|
LL_SET_DEFAULT(1, FUSE_CAP_HANDLE_KILLPRIV);
|
||||||
|
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_DIO);
|
23
fuse-3.17.0-Pass-FUSE_PARALLEL_DIROPS-to-kernel-861.patch
Normal file
23
fuse-3.17.0-Pass-FUSE_PARALLEL_DIROPS-to-kernel-861.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From c9905341ea34ff9acbc11b3c53ba8bcea35eeed8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: fdinoff <fdinoff@google.com>
|
||||||
|
Date: Thu, 16 Nov 2023 06:23:20 -0500
|
||||||
|
Subject: [PATCH] Pass FUSE_PARALLEL_DIROPS to kernel (#861)
|
||||||
|
|
||||||
|
This tells the kernel that parallel lookup/readdir operations are
|
||||||
|
supported. This is enabled by default but was not passed to the kernel
|
||||||
|
so you always get the synchronized version.
|
||||||
|
---
|
||||||
|
lib/fuse_lowlevel.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
--- a/lib/fuse_lowlevel.c
|
||||||
|
+++ b/lib/fuse_lowlevel.c
|
||||||
|
@@ -2093,6 +2093,8 @@ void do_init(fuse_req_t req, fuse_ino_t
|
||||||
|
outargflags |= FUSE_ASYNC_DIO;
|
||||||
|
if (se->conn.want & FUSE_CAP_WRITEBACK_CACHE)
|
||||||
|
outargflags |= FUSE_WRITEBACK_CACHE;
|
||||||
|
+ if (se->conn.want & FUSE_CAP_PARALLEL_DIROPS)
|
||||||
|
+ outargflags |= FUSE_PARALLEL_DIROPS;
|
||||||
|
if (se->conn.want & FUSE_CAP_POSIX_ACL)
|
||||||
|
outargflags |= FUSE_POSIX_ACL;
|
||||||
|
if (se->conn.want & FUSE_CAP_CACHE_SYMLINKS)
|
10
fuse3.spec
10
fuse3.spec
@ -1,6 +1,6 @@
|
|||||||
Name: fuse3
|
Name: fuse3
|
||||||
Version: 3.10.2
|
Version: 3.10.2
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
Summary: File System in Userspace (FUSE) v3 utilities
|
Summary: File System in Userspace (FUSE) v3 utilities
|
||||||
License: GPL+
|
License: GPL+
|
||||||
URL: http://fuse.sf.net
|
URL: http://fuse.sf.net
|
||||||
@ -13,6 +13,8 @@ Patch3: fuse-3.13.0-Initial-patch-provided-by-Miklos-Szeredi-mszeredi-re.patch
|
|||||||
Patch4: fuse-3.13.0-adding-comments-and-capability-discovery-enum-for-fl.patch
|
Patch4: fuse-3.13.0-adding-comments-and-capability-discovery-enum-for-fl.patch
|
||||||
Patch5: rhel-only-bz2188182-libfuse-add-feature-flag-for-expire-only.patch
|
Patch5: rhel-only-bz2188182-libfuse-add-feature-flag-for-expire-only.patch
|
||||||
Patch6: fuse-3.16.1-Make-expire-only-function-fail-if-no-kernel-support-.patch
|
Patch6: fuse-3.16.1-Make-expire-only-function-fail-if-no-kernel-support-.patch
|
||||||
|
Patch7: fuse-3.17.0-Pass-FUSE_PARALLEL_DIROPS-to-kernel-861.patch
|
||||||
|
Patch8: fuse-3.17.0-Don-t-set-FUSE_CAP_PARALLEL_DIROPS-by-default.patch
|
||||||
|
|
||||||
BuildRequires: which
|
BuildRequires: which
|
||||||
%if ! 0%{?el6}
|
%if ! 0%{?el6}
|
||||||
@ -81,6 +83,8 @@ Common files for FUSE v2 and FUSE v3.
|
|||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
@ -170,6 +174,10 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 07 2024 Pavel Reichl <preichl@redhat.com> - 3.10.2-8
|
||||||
|
- Advertise support of FUSE_PARALLEL_DIROPS to kernel
|
||||||
|
- Related: RHEL-24721
|
||||||
|
|
||||||
* Tue Jan 30 2024 Pavel Reichl <preichl@redhat.com> - 3.10.2-7
|
* Tue Jan 30 2024 Pavel Reichl <preichl@redhat.com> - 3.10.2-7
|
||||||
- Synchronize expire-only API with upstream.
|
- Synchronize expire-only API with upstream.
|
||||||
- Related: RHEL-23414
|
- Related: RHEL-23414
|
||||||
|
Loading…
Reference in New Issue
Block a user