qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] qcow2: Snapshot update for zero clusters
@ 2013-08-30  8:36 Max Reitz
  2013-08-30  8:36 ` [Qemu-devel] [PATCH v2 1/2] qcow2-refcount: " Max Reitz
  2013-08-30  8:36 ` [Qemu-devel] [PATCH v2 2/2] qemu-iotests: Snapshotting " Max Reitz
  0 siblings, 2 replies; 7+ messages in thread
From: Max Reitz @ 2013-08-30  8:36 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Max Reitz

When creating a snapshots, the refcount adjustment function basically
adjusted the refcounts of any cluster with a non-zero L2 entry. However,
the L2 entry of unallocated zero clusters is exactly one (therefore
non-zero) which led to wrong refcount updates on cluster 0 (the main
qcow2 header), since the cluster index for these unallocated zero clusters
is 0.

This series fixes this by taking all cluster types specifically into
account using qcow2_get_cluster_type and handling them accordingly.
Furthermore, a short test is added.

v2:
 - more thorough commit message
 - take pre-allocated zero clusters into account
 - abort on unknown cluster type
 - a test case

Max Reitz (2):
  qcow2-refcount: Snapshot update for zero clusters
  qemu-iotests: Snapshotting zero clusters

 block/qcow2-refcount.c   | 52 ++++++++++++++++++++++++++-------------
 tests/qemu-iotests/062   | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/group |  1 +
 3 files changed, 100 insertions(+), 17 deletions(-)
 create mode 100755 tests/qemu-iotests/062

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-30 13:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-30  8:36 [Qemu-devel] [PATCH v2 0/2] qcow2: Snapshot update for zero clusters Max Reitz
2013-08-30  8:36 ` [Qemu-devel] [PATCH v2 1/2] qcow2-refcount: " Max Reitz
2013-08-30 13:02   ` Eric Blake
2013-08-30  8:36 ` [Qemu-devel] [PATCH v2 2/2] qemu-iotests: Snapshotting " Max Reitz
2013-08-30 13:07   ` Eric Blake
2013-08-30 13:08     ` Eric Blake
2013-08-30 13:12       ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).