History

fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY

Add a flag to entry expiration that lets the filesystem expire a dentry without kicking it out from the cache immediately. This makes a difference for overmounted dentries, where plain invalidation would detach all submounts before dropping the dentry from the cache. If only expiry is set on the dentry, then any overmounts are left alone and until ->d_revalidate() is called. Note: ->d_revalidate() is not called for the case of following a submount, so invalidation will only be triggered for the non-overmounted case. The dentry could also be mounted in a different mount instance, in which case any submounts will still be detached.

Miklos Szeredi committed 4 years ago

Commit 4f8d3701 parent a1db2f74 files · +18 −7Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/fuse.h+11−2
@@ -197,6 +197,9 @@ · 196 unmodified lines
197 *197 *
198 * 7.37198 * 7.37
199 * - add FUSE_TMPFILE199 * - add FUSE_TMPFILE
200 *
201 * 7.38
202 * - add FUSE_EXPIRE_ONLY flag to fuse_notify_inval_entry
200 */203 */
201 204
202#ifndef _LINUX_FUSE_H205#ifndef _LINUX_FUSE_H
@@ -232,7 +235,7 @@ · 29 unmodified lines
232#define FUSE_KERNEL_VERSION 7235#define FUSE_KERNEL_VERSION 7
233 236
234/** Minor version number of this interface */237/** Minor version number of this interface */
235#define FUSE_KERNEL_MINOR_VERSION 37238#define FUSE_KERNEL_MINOR_VERSION 38
236 239
237/** The node ID of the root inode */240/** The node ID of the root inode */
238#define FUSE_ROOT_ID 1241#define FUSE_ROOT_ID 1
@@ -491,6 +494,12 @@ struct fuse_file_lock { · 252 unmodified lines
491 */494 */
492#define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0)495#define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0)
493 496
497/**
498 * notify_inval_entry flags
499 * FUSE_EXPIRE_ONLY
500 */
501#define FUSE_EXPIRE_ONLY (1 << 0)
502
494enum fuse_opcode {503enum fuse_opcode {
495 FUSE_LOOKUP = 1,504 FUSE_LOOKUP = 1,
496 FUSE_FORGET = 2, /* no reply */505 FUSE_FORGET = 2, /* no reply */
@@ -919,7 +928,7 @@ struct fuse_notify_inval_inode_out { · 422 unmodified lines
919struct fuse_notify_inval_entry_out {928struct fuse_notify_inval_entry_out {
920 uint64_t parent;929 uint64_t parent;
921 uint32_t namelen;930 uint32_t namelen;
922 uint32_t padding;931 uint32_t flags;
923};932};
924 933
925struct fuse_notify_delete_out {934struct fuse_notify_delete_out {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t