Skip to content

How do you get the semantics of read without offset? #501

Answered by axboe
ioquatix asked this question in Q&A
Discussion options

You must be logged in to vote

If you check the man page for io_uring_enter.2, and look at the IORING_OP_{READ,WRITE} section, it states:

If offs is set to -1, the offset will use (and advance) the file position, like the read(2) and write(2) system calls.

So you can safely rely on this behavior.

Replies: 8 comments 19 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@axboe
Comment options

@ioquatix
Comment options

@axboe
Comment options

@ioquatix
Comment options

@ioquatix
Comment options

Answer selected by ioquatix
Comment options

You must be logged in to vote
5 replies
@ioquatix
Comment options

@ioquatix
Comment options

@axboe
Comment options

@ioquatix
Comment options

@ioquatix
Comment options

Comment options

You must be logged in to vote
3 replies
@ioquatix
Comment options

@axboe
Comment options

@ioquatix
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ioquatix
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants