]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Use pread() and pwrite() in disk-image.c
authorPekka Enberg <penberg@kernel.org>
Fri, 8 Apr 2011 11:53:26 +0000 (14:53 +0300)
committerPekka Enberg <penberg@kernel.org>
Fri, 8 Apr 2011 11:53:26 +0000 (14:53 +0300)
commitdf3663f30d9b85f6a7692783c569b9b8415cdf56
treebf6756123383bed67da2828fc8be0e0922adf72e
parent924e9295f37afb4a8a00be65aac6ee2c95e23a24
kvm tools: Use pread() and pwrite() in disk-image.c

This patch convert lseek() + read()/write() pairs with pread()/pwrite(). The
performance of running the following command

  dd if=/dev/vda of=/dev/null

in the guest does not show significant performance differences but should be a
net win because of the reduction in system calls.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/disk-image.c
tools/kvm/include/kvm/read-write.h
tools/kvm/read-write.c