From: Kevin Wolf <kwolf@redhat.com>
To: Brad Campbell <brad@fnarfbargle.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Brad Campbell <lists2009@fnarfbargle.com>
Subject: Re: [Qemu-devel] Qemu-img convert with -B
Date: Thu, 28 Apr 2011 08:36:26 +0200 [thread overview]
Message-ID: <4DB90AEA.2090206@redhat.com> (raw)
In-Reply-To: <4DB8CBB8.9050002@fnarfbargle.com>
Am 28.04.2011 04:06, schrieb Brad Campbell:
> On 27/04/11 22:02, Brad Campbell wrote:
>> On 27/04/11 21:56, Kevin Wolf wrote:
>>
>>> When you don't have a backing file, leaving an cluster unallocated means
>>> that it's zero. When you have a backing file, it could be anything. So
>>> if qemu-img convert wanted to save this space, it would have to read
>>> from the backing file and leave the cluster unallocated if it reads as
>>> zero.
>>>
>>> This is something that qemu-img doesn't do today.
>>
>
> This passes cursory testing, but I'm just wondering if this is along the
> right lines?
I haven't checked all details, but it looks like what I would have done.
(Though something is wrong with your indentations, I suspect that the
patch wouldn't apply)
> @@ -939,9 +957,16 @@ out:
> free_option_parameters(create_options);
> free_option_parameters(param);
> qemu_free(buf);
> + if (buf3) {
> + qemu_free(buf3);
> + }
qemu_free (and the libc free, too) work just fine with NULL, so the
check isn't needed.
Kevin
next prev parent reply other threads:[~2011-04-28 6:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 3:05 [Qemu-devel] Qemu-img convert with -B Brad Campbell
2011-04-27 8:10 ` Stefan Hajnoczi
2011-04-27 8:56 ` Brad Campbell
2011-04-27 10:06 ` Kevin Wolf
2011-04-27 13:45 ` Brad Campbell
2011-04-27 13:56 ` Kevin Wolf
2011-04-27 14:02 ` Brad Campbell
2011-04-28 2:06 ` Brad Campbell
2011-04-28 6:36 ` Kevin Wolf [this message]
2011-04-28 9:38 ` Brad Campbell
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=4DB90AEA.2090206@redhat.com \
--to=kwolf@redhat.com \
--cc=brad@fnarfbargle.com \
--cc=lists2009@fnarfbargle.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 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).