]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
FUSE: Refresh cached file size when it changes (lookup)
authorConrad Meyer <cem@FreeBSD.org>
Fri, 15 Feb 2019 22:55:13 +0000 (22:55 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Fri, 15 Feb 2019 22:55:13 +0000 (22:55 +0000)
commit3c324b9465710947abef23044cdcd8bfce8d982d
tree600c918d5c28904ea7596204c4ead3b20f586e0a
parentc4af8b173ae69e60ca698b754e71d4bb89687dfc
FUSE: Refresh cached file size when it changes (lookup)

The cached fvdat->filesize is indepedent of the (mostly unused)
cached_attrs, and we failed to update it when a cached (but perhaps
inactive) vnode was found during VOP_LOOKUP to have a different size than
cached.

As noted in the code comment, this can occur in distributed filesystems or
with other kinds of irregular file behavior (anything is possible in FUSE).

We do something similar in fuse_vnop_getattr already.

PR: 230258 (as reported in description; other issues explored in
comments are not all resolved)
Reported by: MooseFS FreeBSD Team <freebsd AT moosefs.com>
Submitted by: Jakub Kruszona-Zawadzki <acid AT moosefs.com> (earlier version)
sys/fs/fuse/fuse_vnops.c