Date: Tue, 10 Feb 2026 16:19:52 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 293088] fusefs: doesn't allow per-filehandle direct io Message-ID: <bug-293088-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
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: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org 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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-293088-227>
