aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@amazon.com>2013-12-16 09:43:27 -0800
committerAnthony Liguori <aliguori@amazon.com>2013-12-16 09:43:28 -0800
commit80d6f5eae79b009bf3e02e59e9e225db42ddf887 (patch)
tree108e379cac64825286e068bf3f06c7ff9a83a246 /block.c
parente157b8fdd412d48eacfbb8c67d3d58780154faa3 (diff)
parentc547e5640d5b0993cdfb252331065c1a1d813bd8 (diff)
Merge remote-tracking branch 'kwolf/tags/for-anthony' into staging
Block patches # gpg: Signature made Fri 13 Dec 2013 09:47:03 AM PST using RSA key ID C88F2FD6 # gpg: Can't check signature: public key not found # By Peter Lieven (2) and others # Via Kevin Wolf * kwolf/tags/for-anthony: blkdebug: Use QLIST_FOREACH_SAFE to resume IO qemu-img: make progress output more accurate during convert block: expect get_block_status errors in bdrv_make_zero block/vvfat: Fix compiler warnings for OpenBSD qapi-schema.json: Change 1.8 reference to 2.0 sheepdog: check if '-o redundancy' is passed from user Message-id: 1386956943-19474-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block.c b/block.c
index 13f001ad69..64e7d220c6 100644
--- a/block.c
+++ b/block.c
@@ -2421,6 +2421,11 @@ int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags)
nb_sectors = INT_MAX;
}
ret = bdrv_get_block_status(bs, sector_num, nb_sectors, &n);
+ if (ret < 0) {
+ error_report("error getting block status at sector %" PRId64 ": %s",
+ sector_num, strerror(-ret));
+ return ret;
+ }
if (ret & BDRV_BLOCK_ZERO) {
sector_num += n;
continue;