Advertise support of FUSE_PARALLEL_DIROPS to kernel
Resolves: RHEL-19149 Signed-off-by: Pavel Reichl <preichl@redhat.com>
This commit is contained in:
parent
e828426ddf
commit
70060deba3
@ -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
fuse.spec
10
fuse.spec
@ -4,7 +4,7 @@
|
||||
|
||||
Name: fuse
|
||||
Version: %{fuse2ver}
|
||||
Release: 17%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Summary: File System in Userspace (FUSE) v2 utilities
|
||||
License: GPL+
|
||||
URL: http://fuse.sf.net
|
||||
@ -30,6 +30,8 @@ Patch12: 0005-BZ_217095_Modify-structures-in-libfuse-to-handle-flags-beyond-rhel
|
||||
Patch13: 0006-BZ_2171095.patch
|
||||
Patch14: 0007-BZ_2171095-cap.patch
|
||||
Patch15: 0008-BZ_217095-libfuse-add-feature-flag-for-expire-only.patch
|
||||
Patch16: fuse-3.17.0-Pass-FUSE_PARALLEL_DIROPS-to-kernel-861.patch
|
||||
Patch17: fuse-3.17.0-Don-t-set-FUSE_CAP_PARALLEL_DIROPS-by-default.patch
|
||||
|
||||
Requires: which
|
||||
Conflicts: filesystem < 3
|
||||
@ -128,6 +130,8 @@ pushd lib%{name}-%{name}-%{fuse3ver}
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
|
||||
popd
|
||||
|
||||
@ -259,6 +263,10 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
|
||||
%{_includedir}/fuse3/
|
||||
|
||||
%changelog
|
||||
* Fri Feb 02 2024 Pavel Reichl <preichl@redhat.com> - 2.9.7-18
|
||||
- Advertise support of FUSE_PARALLEL_DIROPS to kernel
|
||||
- Fixes RHEL-19149
|
||||
|
||||
* Thu Mar 23 2023 Pavel Reichl <preichl@redhat.com> - 2.9.7-17
|
||||
- Add feature_notify_inode_expire_only
|
||||
- Fixes rhbz#2171095
|
||||
|
Loading…
Reference in New Issue
Block a user