public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] io_uring_enter(2): clarify OP_READ and OP_WRITE
@ 2021-05-23 16:20 Drew DeVault
  2021-05-23 16:41 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Drew DeVault @ 2021-05-23 16:20 UTC (permalink / raw)
  To: io-uring; +Cc: Drew DeVault, Jens Axboe, Pavel Begunkov

These do not advance the internal file offset, making them behave more
like pread/pwrite than read/write.
---
 man/io_uring_enter.2 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index f898ffd..81044c1 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -576,16 +576,18 @@ for the general description of the related system call. Available since 5.6.
 .TP
 .B IORING_OP_WRITE
 Issue the equivalent of a
-.BR read(2)
+.BR pread(2)
 or
-.BR write(2)
+.BR pwrite(2)
 system call.
 .I fd
 is the file descriptor to be operated on,
 .I addr
-contains the buffer in question, and
+contains the buffer in question,
 .I len
-contains the length of the IO operation. These are non-vectored versions of the
+contains the length of the IO operation, and
+.I offs
+contains the read or write offset. These are non-vectored versions of the
 .B IORING_OP_READV
 and
 .B IORING_OP_WRITEV
-- 
2.31.1


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

* Re: [PATCH] io_uring_enter(2): clarify OP_READ and OP_WRITE
  2021-05-23 16:20 [PATCH] io_uring_enter(2): clarify OP_READ and OP_WRITE Drew DeVault
@ 2021-05-23 16:41 ` Jens Axboe
  2021-05-23 16:44   ` Drew DeVault
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Axboe @ 2021-05-23 16:41 UTC (permalink / raw)
  To: Drew DeVault, io-uring; +Cc: Pavel Begunkov

On 5/23/21 10:20 AM, Drew DeVault wrote:
> These do not advance the internal file offset, making them behave more
> like pread/pwrite than read/write.

They do, if -1 is used as the offset. Care to update the patch and include
that clarification?

-- 
Jens Axboe


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

* Re: [PATCH] io_uring_enter(2): clarify OP_READ and OP_WRITE
  2021-05-23 16:41 ` Jens Axboe
@ 2021-05-23 16:44   ` Drew DeVault
  0 siblings, 0 replies; 3+ messages in thread
From: Drew DeVault @ 2021-05-23 16:44 UTC (permalink / raw)
  To: Jens Axboe, io-uring; +Cc: Pavel Begunkov

On Sun May 23, 2021 at 12:41 PM EDT, Jens Axboe wrote:
> They do, if -1 is used as the offset. Care to update the patch and
> include that clarification?

Certainly.

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

end of thread, other threads:[~2021-05-23 16:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-23 16:20 [PATCH] io_uring_enter(2): clarify OP_READ and OP_WRITE Drew DeVault
2021-05-23 16:41 ` Jens Axboe
2021-05-23 16:44   ` Drew DeVault

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