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
197197 *
198198 * 7.37
199199 * - add FUSE_TMPFILE
200+ *
201+ * 7.38
202+ * - add FUSE_EXPIRE_ONLY flag to fuse_notify_inval_entry
200203 */
201204
202205 #ifndef _LINUX_FUSE_H
@@ -232,7 +235,7 @@ · 29 unmodified lines
232235 #define FUSE_KERNEL_VERSION 7
233236
234237 /** Minor version number of this interface */
235−#define FUSE_KERNEL_MINOR_VERSION 37
238+#define FUSE_KERNEL_MINOR_VERSION 38
236239
237240 /** The node ID of the root inode */
238241 #define FUSE_ROOT_ID 1
@@ -491,6 +494,12 @@ struct fuse_file_lock { · 252 unmodified lines
491494 */
492495 #define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0)
493496
497+/**
498+ * notify_inval_entry flags
499+ * FUSE_EXPIRE_ONLY
500+ */
501+#define FUSE_EXPIRE_ONLY (1 << 0)
502+
494503 enum fuse_opcode {
495504 FUSE_LOOKUP = 1,
496505 FUSE_FORGET = 2, /* no reply */
@@ -919,7 +928,7 @@ struct fuse_notify_inval_inode_out { · 422 unmodified lines
919928 struct fuse_notify_inval_entry_out {
920929 uint64_t parent;
921930 uint32_t namelen;
922− uint32_t padding;
931+ uint32_t flags;
923932 };
924933
925934 struct 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