On Tue, Feb 6, 2024 at 2:53 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > 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. > Understood. Do you object to reserving the flag in uapi, but disallowing the server to set it? This is how it is in my branch after addressing you other review comments: https://github.com/amir73il/linux/commits/fuse_io_mode-030224 * FOPEN_PARALLEL_DIRECT_WRITES: Allow concurrent direct writes on the same inode + * FOPEN_CACHE_IO: internal flag for mmap of direct_io (reserved for future use) */ > BTW, I started looking at the fuse-backing-fd branch and really hope > we can get this into shape for the next merge window. > As far as I am concerned, those patches are good to go. I was only waiting for fuse_io_mode to stabilize, in case you wanted bigger changes there. I will post the FUSE_PASSTHROUGH patches, based on fuse_io_mode OTM so you could review them on-list as well. Thanks, Amir.