aliguori 93c65b47a6 Add host_device support to qemu-img. (Nolan Leake)
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>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6978 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-05 17:40:43 +00:00
2009-03-07 18:59:05 +00:00
2009-02-09 23:19:44 +00:00
2009-03-31 15:46:09 +00:00
2009-04-02 22:54:35 +00:00
2009-01-14 19:40:27 +00:00
2009-01-22 17:15:25 +00:00
2008-12-13 09:32:43 +00:00
2009-03-07 21:48:00 +00:00
2009-01-05 18:11:53 +00:00
2009-03-07 15:46:23 +00:00
2009-03-10 21:43:35 +00:00
2009-03-10 21:43:35 +00:00
2009-01-14 18:39:49 +00:00
2009-03-13 16:22:41 +00:00
2008-10-12 17:54:42 +00:00
2008-10-27 19:49:12 +00:00
2009-02-09 19:58:22 +00:00
2009-03-05 23:01:23 +00:00
2009-03-05 23:01:23 +00:00
2009-03-08 12:41:36 +00:00
2009-02-08 17:17:52 +00:00
2008-11-12 17:18:41 +00:00
2009-03-08 12:41:36 +00:00
2007-09-16 20:03:23 +00:00
2008-04-12 20:14:54 +00:00
2008-04-12 20:14:54 +00:00
2008-05-31 16:21:33 +00:00
2005-04-07 22:20:31 +00:00
2008-12-14 08:50:18 +00:00
2008-11-30 16:25:37 +00:00
2009-01-05 18:11:53 +00:00
2008-08-25 22:26:03 +00:00
2009-03-28 08:14:42 +00:00
2007-05-05 19:24:38 +00:00
2007-05-05 19:24:38 +00:00
2009-03-05 23:01:23 +00:00
2009-01-14 18:39:49 +00:00
2009-02-11 21:00:32 +00:00
2009-01-14 18:34:22 +00:00
2007-11-17 17:14:51 +00:00
2009-03-05 23:01:23 +00:00
2008-12-14 08:50:18 +00:00
2008-12-13 09:32:43 +00:00
2007-10-06 11:28:21 +00:00
2008-12-14 08:53:17 +00:00
2008-02-04 14:47:49 +00:00
2008-12-04 11:29:42 +00:00
2009-03-05 23:01:23 +00:00
2009-03-05 23:01:23 +00:00
2008-09-06 16:31:30 +00:00
2009-03-06 23:44:29 +00:00
2009-03-06 23:44:29 +00:00
2009-03-06 23:44:29 +00:00
2009-03-06 23:44:29 +00:00
2005-01-06 20:50:00 +00:00

Read the documentation in qemu-doc.html.

Fabrice Bellard.
Description
No description provided
Readme 404 MiB
Languages
C 82.6%
C++ 6.5%
Python 3.4%
Dylan 2.9%
Shell 1.6%
Other 2.8%