Skip to content
Snippets Groups Projects
Commit 56d15a53 authored by Sanchit Garg's avatar Sanchit Garg Committed by Anthony Liguori
Browse files

[virtio-9p] Use preadv/pwritev instead of readv/writev


readv & writev, read & write respectively from the current offset
of the file & hence their use has to be preceeded by a call to lseek.
preadv/writev can be used instead, as they take the offset as an argument.
This saves one system call( lseek ).
In case preadv is not supported, it is implemented by an lseek
followed by a readv. Depending upon the configuration of QEMU, the
appropriate read & write methods are selected. This patch also fixes the
zero byte read/write bug & obviates the need to apply a fix for that bug separately.

Signed-off-by: default avatarM. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: default avatarSanchit Garg <sancgarg@linux.vnet.ibm.com>
Signed-off-by: default avatarVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
parent 9f506893
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment