From: Dylan Yudaken <[email protected]>
To: Jens Axboe <[email protected]>,
Pavel Begunkov <[email protected]>,
<[email protected]>
Cc: Dylan Yudaken <[email protected]>
Subject: [PATCH 0/3] io_uring: consistent behaviour with linked read/write
Date: Thu, 17 Feb 2022 07:58:12 -0800 [thread overview]
Message-ID: <[email protected]> (raw)
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
next reply other threads:[~2022-02-17 15:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 15:58 Dylan Yudaken [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox