]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2-refcount.c
qcow2-refcount: Repair OFLAG_COPIED errors
authorMax Reitz <mreitz@redhat.com>
Fri, 30 Aug 2013 12:34:28 +0000 (14:34 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 30 Aug 2013 13:48:44 +0000 (15:48 +0200)
commite23e400ec62a03dea58ddb38479b4f1ef86f556d
tree12e25c97798da30fcf8b0dea9760b2e71a32b2a0
parent4f6ed88c03c4026e31ce152ea760a0da839f0dda
qcow2-refcount: Repair OFLAG_COPIED errors

Since the OFLAG_COPIED checks are now executed after the refcounts have
been repaired (if repairing), it is safe to assume that they are correct
but the OFLAG_COPIED flag may be not. Therefore, if its value differs
from what it should be (considering the according refcount), that
discrepancy can be repaired by correctly setting (or clearing that flag.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2.h