Hi,

On Fri, 4 Apr 2025 at 14:35, Marco Cavenati <marco.caven...@eurecom.fr> wrote:
> Almost. Unlike  lseek(2), pread(2) and co. do not have side effects on the 
> fd's offset.
> From the man page:
> > The pread() and pwrite() system calls are especially useful in
> > multithreaded applications.  They allow multiple threads to
> > perform I/O on the same file descriptor without being affected by
> > changes to the file offset by other threads.

* If the r/w pointer adjustment (lseek(2)) is not required, then why
set the  '*_FEATURE_SEEKABLE'  flag?

> It is a first step in making QIOChannelBlock compatible with
> mapped-ram feature that requires it since mapped-ram uses
> io_preadv and io_pwritev methods.

* The qio_channel_block_preadv/pwritev functions defined above, which
shall be called via  '->io_preadv' and '->io_pwritev' methods, appear
to call bdrv_readv/writev_vmstate() functions. Do those functions need
to adjust (lseek(2)) the stream r/w pointers?

Thank you.
---
  - Prasad


Reply via email to