* [PATCH] io_uring_enter(2): Clarify how to read from and write to non-seekable files
@ 2021-05-31 12:38 Alois Wohlschlager
2021-06-01 17:10 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Alois Wohlschlager @ 2021-05-31 12:38 UTC (permalink / raw)
To: io-uring
IORING_OP_READ* and IORING_OP_WRITE* all take a file offset. These
operations can still be used with non-seekable files, as long as the
offset is set to zero.
Signed-off-by: Alois Wohlschlager <[email protected]>
---
man/io_uring_enter.2 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 5b498e5..dd3c962 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -195,6 +195,9 @@ Vectored read and write operations, similar to
.BR preadv2 (2)
and
.BR pwritev2 (2).
+If the file is not seekable,
+.I off
+must be set to zero.
.TP
.B IORING_OP_READ_FIXED
@@ -588,6 +591,10 @@ contains the buffer in question,
contains the length of the IO operation, and
.I offs
contains the read or write offset. If
+.I fd
+does not refer to a seekable file,
+.I off
+must be set to zero. If
.I offs
is set to -1, the offset will use (and advance) the file position, like the
.BR read(2)
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] io_uring_enter(2): Clarify how to read from and write to non-seekable files
2021-05-31 12:38 [PATCH] io_uring_enter(2): Clarify how to read from and write to non-seekable files Alois Wohlschlager
@ 2021-06-01 17:10 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-06-01 17:10 UTC (permalink / raw)
To: Alois Wohlschlager, io-uring
On 5/31/21 6:38 AM, Alois Wohlschlager wrote:
> IORING_OP_READ* and IORING_OP_WRITE* all take a file offset. These
> operations can still be used with non-seekable files, as long as the
> offset is set to zero.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-01 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-31 12:38 [PATCH] io_uring_enter(2): Clarify how to read from and write to non-seekable files Alois Wohlschlager
2021-06-01 17:10 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox