Skip to content

Commit 5cadfbd

Browse files
author
Miklos Szeredi
committed
fuse: add feature flag for expire-only
Add an init flag idicating whether the FUSE_EXPIRE_ONLY flag of FUSE_NOTIFY_INVAL_ENTRY is effective. This is needed for backports of this feature, otherwise the server could just check the protocol version. Fixes: 4f8d370 ("fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY") Cc: <[email protected]> # v6.2 Signed-off-by: Miklos Szeredi <[email protected]>
1 parent ac9a786 commit 5cadfbd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

fs/fuse/inode.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,8 @@ void fuse_send_init(struct fuse_mount *fm)
12541254
FUSE_ABORT_ERROR | FUSE_MAX_PAGES | FUSE_CACHE_SYMLINKS |
12551255
FUSE_NO_OPENDIR_SUPPORT | FUSE_EXPLICIT_INVAL_DATA |
12561256
FUSE_HANDLE_KILLPRIV_V2 | FUSE_SETXATTR_EXT | FUSE_INIT_EXT |
1257-
FUSE_SECURITY_CTX | FUSE_CREATE_SUPP_GROUP;
1257+
FUSE_SECURITY_CTX | FUSE_CREATE_SUPP_GROUP |
1258+
FUSE_HAS_EXPIRE_ONLY;
12581259
#ifdef CONFIG_FUSE_DAX
12591260
if (fm->fc->dax)
12601261
flags |= FUSE_MAP_ALIGNMENT;

include/uapi/linux/fuse.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@
206206
* - add extension header
207207
* - add FUSE_EXT_GROUPS
208208
* - add FUSE_CREATE_SUPP_GROUP
209+
* - add FUSE_HAS_EXPIRE_ONLY
209210
*/
210211

211212
#ifndef _LINUX_FUSE_H
@@ -369,6 +370,7 @@ struct fuse_file_lock {
369370
* FUSE_HAS_INODE_DAX: use per inode DAX
370371
* FUSE_CREATE_SUPP_GROUP: add supplementary group info to create, mkdir,
371372
* symlink and mknod (single group that matches parent)
373+
* FUSE_HAS_EXPIRE_ONLY: kernel supports expiry-only entry invalidation
372374
*/
373375
#define FUSE_ASYNC_READ (1 << 0)
374376
#define FUSE_POSIX_LOCKS (1 << 1)
@@ -406,6 +408,7 @@ struct fuse_file_lock {
406408
#define FUSE_SECURITY_CTX (1ULL << 32)
407409
#define FUSE_HAS_INODE_DAX (1ULL << 33)
408410
#define FUSE_CREATE_SUPP_GROUP (1ULL << 34)
411+
#define FUSE_HAS_EXPIRE_ONLY (1ULL << 35)
409412

410413
/**
411414
* CUSE INIT request/reply flags

0 commit comments

Comments
 (0)