On Wed, Nov 29, 2023 at 6:55 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > On Wed, 29 Nov 2023 at 16:52, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > > > direct I/O read()/write() is never a problem. > > > > The question is whether mmap() on a file opened with FOPEN_DIRECT_IO > > when the inode is in passthrough mode, also uses fuse_passthrough_mmap()? > > I think it should. > > > or denied, similar to how mmap with ff->open_flags & FOPEN_DIRECT_IO && > > vma->vm_flags & VM_MAYSHARE) && !fc->direct_io_relax > > is denied? > > What would be the use case for FOPEN_DIRECT_IO with passthrough mmap? > I don't have a use case. That's why I was wondering if we should support it at all, but will try to make it work. > > A bit more challenging, because we will need to track unmounts, or at > > least track > > "was_cached_mmaped" state per file, but doable. > > Tracking unmaps via fuse_vma_close() should not be difficult. > OK. so any existing mmap, whether on FOPEN_DIRECT_IO or not always prevents an inode from being "neutral". Thanks, Amir.