Dominique Martinet wrote on Fri, Apr 28, 2023 at 03:14:52PM +0900: > > We already pass a struct dir_context to ->iterate_shared(), so we > > have a simple way to add context specific flags down the filesystem > > from iterate_dir(). This is similar to the iocb for file data IO > > that contains the flags field that holds the IOCB_NOWAIT context for > > io_uring based IO. So the infrastructure to plumb it all the way > > down the fs implementation of ->iterate_shared is already there. > > Sure, that sounds like a good approach that isn't breaking the API (not > breaking iterate/iterate_shared implementations that don't look at the > flags and allowing the fs that want to look at it to do so) Hmm actually I said that, but io_getdents() needs to know if the flag will be honored or not (if it will be honored, we can call this when issue_flags & IO_URING_F_NONBLOCK but if we're not sure the fs handles it then we risk blocking) I'm not familiar with this part of the VFS, but I do not see any kind of flags for the filesystem to signal if it'll handle it or not -- this is actually similar to iterate vs. iterate_shared so that'll mean adding iterate_shared_hasnonblock or something, which is getting silly. I'm sure you understand this better than me and I'm missing something obvious here, but I don't think I'll be able to make something I'm happy with here (in a reasonable timeframe anyway). Thanks, -- Dominique Martinet | Asmadeus