On Mon, Aug 15, 2016 at 02:11:38PM -0600, Bob Beck wrote: > Note - NFS has similar behaviour ;) > > at least within a directory. - so this isn't tht "unusual" for non-local
NFS is much smarter than that. It verifies the results returned by cache_lookup() with some "clever" voodoo that checks the mtime of the directory (the vnode attributes are cached themselves, but with a timeout), before believing any cache result. To implement a cache correctly we would need domain knowledge of the filesystem, which we can't have because that's the whole point of fuse. It might be a simple "purge on create/mknod/etc." as in the case of local filesystems or "ask $deity for advice by sacrificing dead body parts" as in the case of nfs. > I'm wondering if this isn't a bit premature Have you looked for other side > effects of this removal? I can't find any side effect beside of it being slower. As far as I can tell the cache as used by fuse is strictly optional. > > > On Mon, Aug 15, 2016 at 1:52 PM, Ted Unangst <[email protected]> wrote: > > > Martin Natano wrote: > > > Watch this: > > > > > > $ doas sshfs natano@localhost:/tmp /mnt > > > $ cat /mnt/foo > > > cat: /mnt/foo: No such file or directory > > > $ echo bar > /tmp/foo > > > $ cat /mnt/foo > > > cat: /mnt/foo: No such file or directory > > > $ touch /mnt/foo > > > $ cat /mnt/foo > > > bar > > > $ > > > > > > There is no sense in doing caching in fusefs. In case of a non-local > > > filesystem the tree can change behind our back without us having a > > > chance to purge the cache. > > > > > > "The only winning move is not to play." Ok? > > > > ok > > > >
