Page MenuHomeFreeBSD

FUSE: Refresh cached file size when it changes (lookup)
AbandonedPublic

Authored by cem on Feb 12 2019, 9:43 AM.

Details

Reviewers
None
Summary

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
Reported by: MooseFS FreeBSD Team <freebsd AT moosefs.com>
Submitted by: Jakub Kruszona-Zawadzki <acid AT moosefs.com> (earlier version)
Tested by: anonymous, Jakub Kruszona-Zawadzki, Ben RUBSON (in various versions)

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 22462
Build 21617: arc lint + arc unit