public inbox for [email protected]
 help / color / mirror / Atom feed
* Support for random access file reads
@ 2020-11-04 10:51 Tim Fox
  2020-11-04 11:08 ` Stefan Metzmacher
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Fox @ 2020-11-04 10:51 UTC (permalink / raw)
  To: io-uring

Hello folks,

I am new to io-uring and would like to read bytes from a specific
position in a file. I was looking for some kind of pread/preadv
functionality in io-uring but couldn't see any.

Perhaps the expectation that the file descriptor offset is explicitly
set via lseek outside of io-uring, to enable random file access use
cases like mine?

Thanks

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

* Re: Support for random access file reads
  2020-11-04 10:51 Support for random access file reads Tim Fox
@ 2020-11-04 11:08 ` Stefan Metzmacher
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Metzmacher @ 2020-11-04 11:08 UTC (permalink / raw)
  To: Tim Fox, io-uring


[-- Attachment #1.1: Type: text/plain, Size: 495 bytes --]

Hi Tim,

> I am new to io-uring and would like to read bytes from a specific
> position in a file. I was looking for some kind of pread/preadv
> functionality in io-uring but couldn't see any.
> 
> Perhaps the expectation that the file descriptor offset is explicitly
> set via lseek outside of io-uring, to enable random file access use
> cases like mine?

Look for IORING_OP_READ/IORING_OP_READV and io_uring_prep_read/io_uring_prep_readv() they
all take an offset.

metze




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2020-11-04 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 10:51 Support for random access file reads Tim Fox
2020-11-04 11:08 ` Stefan Metzmacher

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