summaryrefslogtreecommitdiffstats
path: root/target-sparc
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2015-02-10 15:02:31 -0500
committerMax Reitz <mreitz@redhat.com>2015-03-16 12:10:30 -0400
commit14a58a4e0c2e98a7d9232e1c229a531ca231133b (patch)
treeda3f084b64c003b0c87a915cdd94980cb5742a11 /target-sparc
parent2867ce4ab86c77579e94c6bb2b6e44ddfcf67f5d (diff)
downloadhqemu-14a58a4e0c2e98a7d9232e1c229a531ca231133b.zip
hqemu-14a58a4e0c2e98a7d9232e1c229a531ca231133b.tar.gz
qcow2: Respect new_block in alloc_refcount_block()
When choosing a new place for the refcount table, alloc_refcount_block() tries to infer the number of clusters used so far from its argument cluster_index (which comes from the idea that if any cluster with an index greater than cluster_index was in use, the refcount table would have to be big enough already to describe cluster_index). However, there is a cluster that may be at or after cluster_index, and which is not covered by the refcount structures, and that is the new refcount block new_block. Therefore, it should be taken into account for the blocks_used calculation. Also, because new_block already describes (or is intended to describe) cluster_index, we may not put the new refcount structures there. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 1423598552-24301-2-git-send-email-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'target-sparc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud