On Thu, Nov 2, 2023 at 3:13 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > On Thu, 2 Nov 2023 at 14:08, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > > Just to be clear, at the last close for an inode, we would check > > if attribute cache needs to be invalidate and the inode will return > > to "neutral" mode, when server could legally switch between > > caching and passthrough mode. > > Exactly. FYI, this is now implemented in the fuse-backing-fd branch OTM [1], including auto-invalidate of attributes in fuse_getattr() when there is a backing inode. With this in place, the few fstests that were reported to fail in the v14 cover letter (top of this thread) are now passing. One detail worth noting is that I found it too complicated to support writeback cache (for the non-passthrough inodes) along with fuse passthrough support on the same filesystem, so for now, this combination is not allowed. > > > EIO works for me. > > Just as simple. > > Will try to get this ready for early 6.8 cycle. > My patches are based on top of the fuse IO mode patches [2] that were a joined effort with Bernd. I will wait for Bernd to post his patches before I post the FUSE passthrough patches. There are a few questionable behaviors w.r.t mixing parallel dio with fuse passthrough, but I won't get into them now. We can discuss them after the patches are posted. I will mention that I took a design choice that server can (and is encouraged to) use FOPEN_DIRECT_IO together with FUSE_PASSTHROUGH and a backing file id to request that read/write will go directly to server, but mmap will have a backing inode to map to, so that it won't need to use page cache and deny future passthrough open of the same inode. Thanks, Amir. [1] https://github.com/amir73il/linux/commits/fuse-backing-fd-260124/ [2] https://github.com/amir73il/linux/commits/fuse_io_mode