fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 28 Oct 2022 12:25:21 +0000 (14:25 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 23 Nov 2022 08:10:49 +0000 (09:10 +0100)
commit4f8d37020e1fd0bf6ee9381ba918135ef3712efd
treea6c3cf5367f2973ebf939dff329fb23a698ead77
parenta1db2f7edef095a385d477ab81e780694d63eebd
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.

Suggested-by: Jakob Blomer <jblomer@cern.ch>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c
fs/fuse/dir.c
fs/fuse/fuse_i.h
include/uapi/linux/fuse.h