|
From: Jakob B. <jb...@ce...> - 2022-09-02 22:59:48
|
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. We may be wrong but it seems that the fuse kernel module's fuse_change_entry_timeout() would provide that functionality if it was exposed through libfuse..? Cheers, Jakob [1] https://github.com/cvmfs/cvmfs |