[Bug 230258] [FUSE] [BUG]: Attributes caching issue

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Aug 2 00:15:21 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230258

--- Comment #1 from Conrad Meyer <cem at freebsd.org> ---
FreeBSD's bufcache caches file contents by default.  This can be worked around
by having userspace open files with the O_DIRECT option, or by having your FUSE
filesystem's FUSE_OPEN handler return FOPEN_DIRECT_IO in open_flags (i.e. set
the 'direct_io' flag in fuse_file_info).

Your test 'hello' filesystem does not appear set the direct_io flag on hello1
and hello2 (and of course 'echo >>' is unlikely to), so that may explain
corrupt results.

Given FreeBSD's local cache cannot possibly be consistent with your distributed
filesystem (at least without sophisticated cache invalidation that FUSE
probably lacks), you likely want to always operate in DIRECT mode.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list