Hello, From MOUNT_FUSEFS(8) : kernel_cache By default cached buffers of a given file are flushed at each open(2). This option disables this behaviour From sys/fs/fuse/fuse_kernel.h : FOPEN_KEEP_CACHE: don't invalidate the data cache on open However, looking at sys/fs/fuse/fuse_node.c, FOPEN_KEEP_CACHE is never used ! Adding the following in the else{} of fuse_vnode_open() corrected the issue : if (!(fuse_open_flags & FOPEN_KEEP_CACHE)) { fuse_io_invalbuf(vp, td); } Issue found investigating this bug : https://github.com/vgough/encfs/issues/315 Many thanks ! Ben
https://reviews.freebsd.org/D10434
Many thanks Conrad !
A commit references this bug: Author: cem Date: Fri Apr 21 22:00:22 UTC 2017 New revision: 317273 URL: https://svnweb.freebsd.org/changeset/base/317273 Log: fuse: Implement FOPEN_KEEP_CACHE flag Implement FUSE open flag FOPEN_KEEP_CACHE. Without this flag, cached file contents should be invalidated on open. Apparently, fusefs-encfs relies upon this behavior. PR: 218636 Submitted by: Ben RUBSON <ben.rubson at gmail.com> Changes: head/sys/fs/fuse/fuse_node.c
Thank you very much Conrad ! After how many days / weeks do you think we could MFC this patch ?
I'm the wrong person to ask :-).