[PATCH 0/3] io_uring: consistent behaviour with linked read/write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

Dylan Yudaken (3):
  io_uring: remove duplicated calls to io_kiocb_ppos
  io_uring: update kiocb->ki_pos at execution time
  io_uring: do not recalculate ppos unnecessarily

 fs/io_uring.c | 42 ++++++++++++++++++++++++++++++------------
 1 file changed, 30 insertions(+), 12 deletions(-)


base-commit: 754e0b0e35608ed5206d6a67a791563c631cec07
-- 
2.30.2





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux