summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2012-05-11 16:07:02 +0200
committerKevin Wolf <kwolf@redhat.com>2012-06-15 14:03:42 +0200
commit4534ff5426afeeae5238ba10a696cafa9a0168ee (patch)
tree41cfe59d3c5b41f0e5d6c396a1c9563a2c21deab /block.c
parentUn-inline fdctrl_init_isa() (diff)
downloadqemu-kvm-4534ff5426afeeae5238ba10a696cafa9a0168ee.tar.gz
qemu-kvm-4534ff5426afeeae5238ba10a696cafa9a0168ee.tar.bz2
qemu-kvm-4534ff5426afeeae5238ba10a696cafa9a0168ee.zip
qemu-img check -r for repairing images
The QED block driver already provides the functionality to not only detect inconsistencies in images, but also fix them. However, this functionality cannot be manually invoked with qemu-img, but the check happens only automatically during bdrv_open(). This adds a -r switch to qemu-img check that allows manual invocation of an image repair. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block.c b/block.c
index c07ff390c..355ac8618 100644
--- a/block.c
+++ b/block.c
@@ -1222,14 +1222,14 @@ bool bdrv_dev_is_medium_locked(BlockDriverState *bs)
* free of errors) or -errno when an internal error occurred. The results of the
* check are stored in res.
*/
-int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res)
+int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix)
{
if (bs->drv->bdrv_check == NULL) {
return -ENOTSUP;
}
memset(res, 0, sizeof(*res));
- return bs->drv->bdrv_check(bs, res);
+ return bs->drv->bdrv_check(bs, res, fix);
}
#define COMMIT_BUF_SECTORS 2048