« Previous | Next » 

Revision 56d15a53


Added by Sanchit Garg almost 11 years ago

[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: M. Mohan Kumar <>
Signed-off-by: Sanchit Garg <>
Signed-off-by: Venkateswararao Jujjuri <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences