From: Kevin Wolf <kwolf@suse.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH] ioemu: Merge qcow2 fixes from qemu
Date: Thu, 27 Mar 2008 13:15:41 +0100 [thread overview]
Message-ID: <47EB8FED.4070401@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
The following two fixes by Jürgen Keil have been in qemu for a year now.
They are still missing in ioemu.
[Qemu-devel] PATCH: qcow2 image corruption
http://lists.gnu.org/archive/html/qemu-devel/2007-03/msg00773.html
[Qemu-devel] [PATCH] qcow2: release refcount table clusters of the old
table, after growing the refcount table
http://lists.gnu.org/archive/html/qemu-devel/2007-04/msg00043.html
Signed-off-by: Kevin Wolf <kwolf@suse.de>
[-- Attachment #2: ioemu-qcow2-merge.patch --]
[-- Type: text/x-patch, Size: 961 bytes --]
diff -r 81147306041a tools/ioemu/block-qcow2.c
--- a/tools/ioemu/block-qcow2.c Tue Mar 25 14:37:43 2008
+++ b/tools/ioemu/block-qcow2.c Thu Mar 27 13:59:33 2008
@@ -1886,6 +1886,8 @@
int64_t table_offset;
uint64_t data64;
uint32_t data32;
+ int old_table_size;
+ int64_t old_table_offset;
if (min_size <= s->refcount_table_size)
return 0;
@@ -1931,10 +1933,14 @@
&data32, sizeof(data32)) != sizeof(data32))
goto fail;
qemu_free(s->refcount_table);
+ old_table_offset = s->refcount_table_offset;
+ old_table_size = s->refcount_table_size;
s->refcount_table = new_table;
s->refcount_table_size = new_table_size;
+ s->refcount_table_offset = table_offset;
update_refcount(bs, table_offset, new_table_size2, 1);
+ free_clusters(bs, old_table_offset, old_table_size * sizeof(uint64_t));
return 0;
fail:
free_clusters(bs, table_offset, new_table_size2);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-03-27 12:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47EB8FED.4070401@suse.de \
--to=kwolf@suse.de \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.