block/nfs: fix calculation of allocated file size
commitd9af73191cc4a1f23ca8149ca2d5f71f74f5329d
authorPeter Lieven <pl@kamp.de>
Thu, 20 Aug 2015 10:46:47 +0000 (20 12:46 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sat, 17 Oct 2015 23:17:25 +0000 (17 18:17 -0500)
treea29574a3e828e00bce325b5faadd7e5a56c31593
parent637dd0bb7c0e8a3275230b771085439f256b403d
block/nfs: fix calculation of allocated file size

st.st_blocks is always counted in 512 byte units. Do not
use st.st_blksize as multiplicator which may be larger.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Message-id: 1440067607-14547-1-git-send-email-pl@kamp.de
Signed-off-by: Jeff Cody <jcody@redhat.com>
(cherry picked from commit 055c6f912c8d3cd9a901972ae432c47e5872f71a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/nfs.c