[libvirt] [PATCH v3 2/5] Fall back to QEMUD_SAVE_FORMAT_RAW if compression method fails.

Eric Blake eblake at redhat.com
Tue Nov 30 22:19:42 UTC 2010


On 11/30/2010 12:12 AM, Hu Tao wrote:
> When dumping a domain, it's reasonable to save dump-file in raw format
> if dump format is misconfigured or the corresponding compress program
> is not available rather then fail dumping.

Makes sense to me.

> ---
>  src/qemu/qemu_driver.c |   39 +++++++++++++++++++++++++--------------
>  1 files changed, 25 insertions(+), 14 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index f00d8a3..ad67e52 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -137,6 +137,8 @@ struct _qemuDomainObjPrivate {
>      int persistentAddrs;
>  };
>  
> +static int getCompressionType(struct qemud_driver *driver);

This would be better as enum qemud_save_formats rather than int.  No
need for a forward declaration, since you implemented the function in
topological order.

> +static int qemudDomainCoreDump(virDomainPtr dom,
> +                               const char *path,
> +                               int flags ATTRIBUTE_UNUSED) {
> +    struct qemud_driver *driver = dom->conn->privateData;
> +    virDomainObjPtr vm;
> +    int resume = 0, paused = 0;
> +    int ret = -1, fd = -1;
> +    virDomainEventPtr event = NULL;
> +    int compress;

Likewise.

ACK with those nits fixed.  So I squashed in 5/5 to keep 'make
syntax-check' happy for the purposes of 'git bisect', made the above
changes, and pushed this patch.  The rest of your series still needs a v4.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101130/6a97a880/attachment-0001.sig>


More information about the libvir-list mailing list