#include "block/qdict.h"
#include "sysemu/block-backend.h"
+#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "qcow2.h"
#include "qemu/error-report.h"
{
int64_t nr;
return !bytes ||
- (!bdrv_is_allocated_above(bs, NULL, offset, bytes, &nr) && nr == bytes);
+ (!bdrv_is_allocated_above(bs, NULL, false, offset, bytes, &nr) &&
+ nr == bytes);
}
static bool is_zero_cow(BlockDriverState *bs, QCowL2Meta *m)
compat = qemu_opt_get(opts, BLOCK_OPT_COMPAT_LEVEL);
if (!compat) {
/* preserve default */
- } else if (!strcmp(compat, "0.10")) {
+ } else if (!strcmp(compat, "0.10") || !strcmp(compat, "v2")) {
new_version = 2;
- } else if (!strcmp(compat, "1.1")) {
+ } else if (!strcmp(compat, "1.1") || !strcmp(compat, "v3")) {
new_version = 3;
} else {
error_setg(errp, "Unknown compatibility level %s", compat);
{
.name = BLOCK_OPT_COMPAT_LEVEL,
.type = QEMU_OPT_STRING,
- .help = "Compatibility level (0.10 or 1.1)"
+ .help = "Compatibility level (v2 [0.10] or v3 [1.1])"
},
{
.name = BLOCK_OPT_BACKING_FILE,