qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] [UPDATED] Add host_device support to qemu-img.


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] [UPDATED] Add host_device support to qemu-img.
Date: Sun, 05 Apr 2009 12:43:12 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]