]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: evict invalidated cache contents during write-through
authorasomers <asomers@FreeBSD.org>
Fri, 12 Apr 2019 19:05:06 +0000 (19:05 +0000)
committerasomers <asomers@FreeBSD.org>
Fri, 12 Apr 2019 19:05:06 +0000 (19:05 +0000)
commitbb88d1d48b5c52f373f84443eedfe9454a9da1cb
tree8dd62995c50d5ab7a7399d7aaa974b340a3aca5e
parent4afa2506fff257acfaf5ba9314db4ff440977ed7
fusefs: evict invalidated cache contents during write-through

fusefs's default cache mode is "writethrough", although it currently works
more like "write-around"; writes bypass the cache completely.  Since writes
bypass the cache, they were leaving stale previously-read data in the cache.
This commit invalidates that stale data.  It also adds a new global
v_inval_buf_range method, like vtruncbuf but for a range of a file.

PR: 235774
Reported by: cem
Sponsored by: The FreeBSD Foundation
sys/fs/fuse/fuse_io.c
sys/kern/vfs_subr.c
sys/sys/vnode.h
tests/sys/fs/fusefs/write.cc