qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v2 1/2] qcow2: Simplify image creation


From: Stefan Hajnoczi
Subject: [Qemu-devel] Re: [PATCH v2 1/2] qcow2: Simplify image creation
Date: Tue, 15 Jun 2010 12:08:32 +0100

On Tue, Jun 15, 2010 at 11:36 AM, Kevin Wolf <address@hidden> wrote:
> +    /*
> +     * And now open the image and make it consistent first (i.e. increase the
> +     * refcount of the cluster that is occupied by the header and the 
> refcount
> +     * table)
> +     */
> +    BlockDriver* drv = bdrv_find_format("qcow2");
> +    assert(drv != NULL);
> +    ret = bdrv_open(bs, filename, BDRV_O_RDWR | BDRV_O_NO_FLUSH, drv);
> +    if (ret < 0) {
> +        goto out;
> +    }

Here I think we should really return directly on error.
bdrv_delete(bs) doesn't work since bs isn't initialized when
bdrv_open() fails.

Stefan



reply via email to

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