public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 0/3] io_uring: consistent behaviour with linked read/write
@ 2022-02-17 15:58 Dylan Yudaken
  2022-02-17 15:58 ` [PATCH 1/3] io_uring: remove duplicated calls to io_kiocb_ppos Dylan Yudaken
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Dylan Yudaken @ 2022-02-17 15:58 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov, io-uring; +Cc: Dylan Yudaken

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/[email protected]/

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-18 17:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-17 15:58 [PATCH 0/3] io_uring: consistent behaviour with linked read/write Dylan Yudaken
2022-02-17 15:58 ` [PATCH 1/3] io_uring: remove duplicated calls to io_kiocb_ppos Dylan Yudaken
2022-02-17 15:58 ` [PATCH 2/3] io_uring: update kiocb->ki_pos at execution time Dylan Yudaken
2022-02-17 15:58 ` [PATCH 3/3] io_uring: do not recalculate ppos unnecessarily Dylan Yudaken
2022-02-17 19:45 ` [PATCH 0/3] io_uring: consistent behaviour with linked read/write Jens Axboe
2022-02-18 17:20   ` Dylan Yudaken
2022-02-18 17:25     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox