From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] [UPDATED] Add host_device support to qemu-img.
Date: Sun, 05 Apr 2009 12:43:12 -0500 [thread overview]
Message-ID: <49D8EDB0.9010504@us.ibm.com> (raw)
In-Reply-To: <1238634456.15350.595.camel@voxel>
Nolan wrote:
> This patch allows the use a host_device as the destination for "qemu-img
> convert".
>
> I added a ->bdrv_create function host_device. It merely verifies that
> the device exists and is large enough.
>
> A check is needed in the qemu-img convert loop to ensure that we write
> out all 0 sectors to the host_device. Otherwise they end up with stale
> garbage where all zero sectors were expected.
>
> I also made the check against bdrv_is_allocated enabled for everything
> _except_ host devices, since there is no point in making the block
> backend write a bunch of zeros just so that we can memcmp them
> immediately afterwards. Host devices can't benefit from this because
> there is no way to differentiate between a sector being unallocated
> because it was never written, or because it was written with all zeros
> and then made a trip through qemu-img convert.
>
> Finally, there is an unrelated fix for a typo in the error message
> printed if the destination device does not support ->bdrv_create.
>
> Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
>
Applied. Thanks.
Regards,
Anthony Liguori
prev parent reply other threads:[~2009-04-05 17:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 1:07 [Qemu-devel] [PATCH] [UPDATED] Add host_device support to qemu-img Nolan
2009-04-02 1:20 ` malc
2009-04-02 3:18 ` [Qemu-devel] " Nolan
2009-04-02 3:36 ` malc
2009-04-05 17:43 ` Anthony Liguori [this message]
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=49D8EDB0.9010504@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/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.