On 2/17/22 8:58 AM, Dylan Yudaken wrote: > Currently submitting multiple read/write for one file with IOSQE_IO_LINK > and offset = -1 will not behave as if calling read(2)/write(2) multiple > times. The offset may be pinned to the same value for each submission (for > example if they are punted to the async worker) and so each read/write will > have the same offset. > > This patchset fixes this by grabbing the file position at execution time, > rather than when the job is queued to be run. > > A test for this will be submitted to liburing separately. > > Worth noting that this does not purposefully change the result of > submitting multiple read/write without IOSQE_IO_LINK (for example as in > [1]). But then I do not know what the correct approach should be when > submitting multiple r/w without any explicit ordering. > > [1]: https://lore.kernel.org/io-uring/8a9e55bf-3195-5282-2907-41b2f2b23cc8@xxxxxxxxx/ I think this series looks great, clean and to the point. My only real question is one you reference here already, which is the fpos locking that we really should get done. Care to respin the referenced patch on top of this series? Would hate to make that part harder... -- Jens Axboe