On Tue, 6 Feb 2024 at 13:39, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > I have played with this rebranding of > FOPEN_CACHE_IO => FOPEN_NO_PARALLEL_DIO_WRITES > > The meaning of the rebranded flag is: > Prevent parallel dio on inode for as long as this file is kept open. > > The io modes code sets this flag implicitly on the first shared mmap. > > Let me know if this makes the external flag easier to swallow. > Of course I can make this flag internal and not and FOPEN_ flag > at all, but IMO, the code is easier to understand when the type of > iocachectl refcount held by any file is specified by its FOPEN_ flags. If there's no clear use case that would benefit from having this flag on the userspace interface, then I'd recommend not to export it for now. I understand the need for clarifying the various states that the kernel can be, but I think that's a bigger project involving e.g. data and metadata cache validity, where the current rules are pretty convoluted. So for now I'd just stick with the implicit state change by mmap. BTW, I started looking at the fuse-backing-fd branch and really hope we can get this into shape for the next merge window. Thanks, Miklos