diff options
author | Max Reitz <mreitz@redhat.com> | 2014-10-22 14:09:39 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-10-23 15:34:01 +0200 |
commit | f307b2558f61e068ce514f2dde2cad74c62036d6 (patch) | |
tree | a507b7ba20578c1af38cc4778b0cdf7b797c0e41 /aio-posix.c | |
parent | 001c158defb65e88e6c50c85d6f20501f7149ddd (diff) | |
download | qemu-f307b2558f61e068ce514f2dde2cad74c62036d6.zip qemu-f307b2558f61e068ce514f2dde2cad74c62036d6.tar.gz qemu-f307b2558f61e068ce514f2dde2cad74c62036d6.tar.bz2 |
qcow2: Do not perform potentially damaging repairs
If a referenced cluster has a refcount of 0, increasing its refcount may
result in clusters being allocated for the refcount structures. This may
overwrite the referenced cluster, therefore we cannot simply increase
the refcount then.
In such cases, we can either try to replicate all the refcount
operations solely for the check operation, basing the allocations on the
in-memory refcount table; or we can simply rebuild the whole refcount
structure based on the in-memory refcount table. Since the latter will
be much easier, do that.
To prepare for this, introduce a "rebuild" boolean which should be set
to true whenever a fix is rather dangerous or too complicated using the
current refcount structures. Another example for this is refcount blocks
being referenced more than once.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'aio-posix.c')
0 files changed, 0 insertions, 0 deletions