Missing fuse backport: "fuse: add feature flag for expire-only"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-hwe-6.2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hello,
I just noticed that the backport of this patch was not done for linux-6.2 and linux-6.3, I guess because there had been a merge conflict. I think in the mean time these versions are not maintained anymore, so sending a version that fixes the merge conflict is probably not going to help.
Issue is that libfuse currently uses a version check instead of testing for the corresponding feature, which is troublesome with any kind of feature back port. I.e., if the feature back port increases the version number, it would enable the "FUSE_EXPIRE_ONLY" although possibly not back ported. If the back port does not increase the version number, it might be used by libfuse...
commit 5cadfbd5a11e549
Author: Miklos Szeredi <email address hidden>
Date: Mon Mar 27 16:14:49 2023 +0200
fuse: add feature flag for expire-only
Add an init flag idicating whether the FUSE_EXPIRE_ONLY flag of
FUSE_
This is needed for backports of this feature, otherwise the server could
just check the protocol version.
Fixes: 4f8d37020e1f ("fuse: add "expire only" mode to FUSE_NOTIFY_
Cc: <email address hidden> # v6.2
Signed-off-by: Miklos Szeredi <email address hidden>
tags: | added: patch |
This is a back port of the patch to hwe-6.2-next, conflicts had been in the section below, as 6.2 does not have FUSE_CREATE_ SUPP_GROUP
Initial patch for 6.5 .660be31aaabc2 100644 init(struct fuse_mount *fm)
FUSE_ ABORT_ERROR | FUSE_MAX_PAGES | FUSE_CACHE_SYMLINKS |
FUSE_ NO_OPENDIR_ SUPPORT | FUSE_EXPLICIT_ INVAL_DATA |
FUSE_ HANDLE_ KILLPRIV_ V2 | FUSE_SETXATTR_EXT | FUSE_INIT_EXT | SUPP_GROUP; SUPP_GROUP | EXPIRE_ ONLY;
```
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index d66070af145d0.
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1254,7 +1254,8 @@ void fuse_send_
- FUSE_SECURITY_CTX | FUSE_CREATE_
+ FUSE_SECURITY_CTX | FUSE_CREATE_
+ FUSE_HAS_
```
Back ported version: .a86270fa2bf5f 100644 init(struct fuse_mount *fm)
FUSE_ ABORT_ERROR | FUSE_MAX_PAGES | FUSE_CACHE_SYMLINKS |
FUSE_ NO_OPENDIR_ SUPPORT | FUSE_EXPLICIT_ INVAL_DATA |
FUSE_ HANDLE_ KILLPRIV_ V2 | FUSE_SETXATTR_EXT | FUSE_INIT_EXT | EXPIRE_ ONLY;
flags |= FUSE_MAP_ALIGNMENT;
```
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 06876afe5ae46.
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -1255,7 +1255,7 @@ void fuse_send_
- FUSE_SECURITY_CTX;
+ FUSE_SECURITY_CTX | FUSE_HAS_
#ifdef CONFIG_FUSE_DAX
if (fm->fc->dax)
```
Right now I didn't try to compile it yet, but could do if needed.