|
From: Miklos S. <mi...@sz...> - 2022-09-06 12:29:56
|
On Sat, 3 Sept 2022 at 01:00, Jakob Blomer <jb...@ce...> wrote: > > Dear all, > > For the development of cvmfs [1], we are wondering if it is possible to > let a fuse module expire a certain dentry, so that the next access > triggers a LOOKUP callback. > > The background is this: cvmfs is a read-only network file system. It is > not immutable -- every now and then a new file system snapshot becomes > available remotely and is then served by clients. > > We recently started looking into symlink kernel caching. When a symlink > is updated to a longer one, the client can temporarily serve a truncated > version of the new, long symlink. This is due to the kernel cache still > using the old entry size. > > We know that the following options prevent this behavior: > > - wait for the kernel cache timeout; this is not ideal because it > prevents clients from swiftly following remote changes (or, with short > timeouts, makes inefficient use of the kernel cache) > > - Invalidate the dentry with fuse_lowlevel_notify_inval_entry() > before applying the update. > > Invalidating the dentry, however, has at least one undesirable > side-effect: a mountpoint on the symlink gets irrecoverably destroyed. > > We would ideally like to be able to immediately "expire" the dentry, so > that it remains valid but the next access should trigger a LOOKUP callback. Makes sense. Attaching untested patches. Thanks, Miklos |