Recall from the MT app file I/O with the pread, pwrite APIs section, we could use the pread(2) and pwrite(2) system calls to effectively perform file I/O in parallel via multiple threads (in a multithreaded app). Similarly, Linux provides the preadv(2) and the pwritev(2) system calls; as you can guess, they provide the functionality of the readv(2) and writev(2) with the addition of a fourth parameter offset; just as with the readv(2) and writev(2), the file offset at which SG-IO is to be performed can be specified and it will not be changed (again, perhaps useful for an MT application). The signature of the preadv(2) and pwritev(2) is shown here:
#include <sys/uio.h>ssize_t preadv(int fd, const struct iovec *iov, int ...