diff options
Diffstat (limited to 'block/qcow2-refcount.c')
-rw-r--r-- | block/qcow2-refcount.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 0112cc37b0..812c93c5c7 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -703,6 +703,7 @@ void qcow2_free_any_clusters(BlockDriverState *bs, nb_clusters << s->cluster_bits); break; case QCOW2_CLUSTER_UNALLOCATED: + case QCOW2_CLUSTER_ZERO: break; default: abort(); @@ -973,6 +974,12 @@ static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res, l2_entry & ~511, nb_csectors * 512); break; + case QCOW2_CLUSTER_ZERO: + if ((l2_entry & L2E_OFFSET_MASK) == 0) { + break; + } + /* fall through */ + case QCOW2_CLUSTER_NORMAL: { /* QCOW_OFLAG_COPIED must be set iff refcount == 1 */ |