]> git.ipfire.org Git - thirdparty/linux.git/commit
fuse: new work queue to periodically invalidate expired dentries
authorLuis Henriques <luis@igalia.com>
Tue, 16 Sep 2025 13:53:08 +0000 (14:53 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 12 Nov 2025 10:45:03 +0000 (11:45 +0100)
commitab84ad5973869a660ca3ad0c54a2b84d975d47c4
treec8fefac5ca6e86a60a0926d44bdc922bd7b2b8e9
parent395b95530343e7f4bdd2870190d985a222997fb6
fuse: new work queue to periodically invalidate expired dentries

This patch adds the necessary infrastructure to keep track of all dentries
created for FUSE file systems.  A set of rbtrees, protected by hashed
locks, will be used to keep all these dentries sorted by expiry time.

A new module parameter 'inval_wq' is also added.  When set, it will start
a work queue which will periodically invalidate expired dentries.  The
value of this new parameter is the period, in seconds, for this work
queue.  Once this parameter is set, every new dentry will be added to one
of the rbtrees.

When the work queue is executed, it will check all the rbtrees and will
invalidate those dentries that have timed-out.

The work queue period can not be smaller than 5 seconds, but can be
disabled by setting 'inval_wq' to zero (which is the default).

Signed-off-by: Luis Henriques <luis@igalia.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/inode.c