Hello Prasad, On Friday, April 04, 2025 10:19 CEST, Prasad Pandit <ppan...@redhat.com> wrote: > * IIUC, when _FEATURE_SEEKABLE is set, the channel I/O sequence > eventually makes underlying preadv(2)/pwritev(2) calls, which use > lseek(2) to adjust the stream r/w pointer with the given offset, > before doing the r/w operation. 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.
> * QIOChannelBlock has '.io_seek' routine corresponding to the lseek(2) > call. It is not clear how setting QIO_CHANNEL_FEATURE_SEEKABLE helps > for QIOChannelBlock streams. 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. Best, Marco