qcow2: Rebuild refcount structure during check
commitc7c0681bc8a781e0319b7cf969b904dfe50d083e
authorMax Reitz <mreitz@redhat.com>
Wed, 22 Oct 2014 12:09:40 +0000 (22 14:09 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 23 Oct 2014 13:34:01 +0000 (23 15:34 +0200)
tree51f15ff59d2d92382074c8f0aacafd1c41ad1e59
parentf307b2558f61e068ce514f2dde2cad74c62036d6
qcow2: Rebuild refcount structure during check

The previous commit introduced the "rebuild" variable to qcow2's
implementation of the image consistency check. Now make use of this by
adding a function which creates a completely new refcount structure
based solely on the in-memory information gathered before.

The old refcount structure will be leaked, however. This leak will be
dealt with in a follow-up commit.

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