raw-posix: Use pread/pwrite instead of lseek+read/write
commit4899d10d142e97eea8f64141a3507b2ee1a64f52
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 19 Apr 2010 12:34:11 +0000 (19 13:34 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 3 May 2010 08:07:31 +0000 (3 10:07 +0200)
tree33961747d5ae2927bd04120140f1956f0a022c66
parent508e0893686794be55cfaa336fea584b16a471d9
raw-posix: Use pread/pwrite instead of lseek+read/write

This patch combines the lseek+read/write calls to use pread/pwrite
instead.  This will result in fewer system calls and is already used by
AIO.

Thanks to Jan Kiszka <jan.kiszka@siemens.com> for identifying excessive
lseek and Christoph Hellwig <hch@lst.de> for confirming that this
approach should work.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c