https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293088
Bug ID: 293088
Summary: fusefs: doesn't allow per-filehandle direct io
Product: Base System
Version: 16.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
If a FUSE daemon responds to a FUSE_OPEN request with the FOPEN_DIRECT_IO flag,
then it wants the kernel to bypass the cache for that file. And fusefs(4) will
honor that. However, the fuse protocol allows a file to be opened multiple
times, possibly with different FOPEN_ flags. In that case, the kernel should
consider that those FOPEN_ flags reply to one file descriptor only. So whether
we bypass the cache should depend on what FUSE_OPEN returned for that
particular file descriptor. It's a dumb feature, IMHO, but that's the way it
is.
The problem is that our current code interprets FOPEN_DIRECT_IO by setting the
FN_DIRECTIO flag within the vnode's private data. But there can be multiple
file descriptors per vnode. So we can't possibly respect that flag as the
protocol intends.
To solve this problem, we should move the FN_DIRECTIO flag from the private
vnode data to the fuse_filehandle structure.
For the record, this behavior was added by 2015, by commit
ead063e0a245b902fbda1a9ced2f3b963afd39ed (svn r279536), and gluster relies on
its correct implementation.
--
You are receiving this mail because:
You are the assignee for the bug.