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

Re: [Xen-devel] [PATCH v10 19/19] xl: main_blockdetach don't call destroy if remove succeeds



On Fri, 2012-07-20 at 15:12 +0100, Roger Pau Monne wrote:
> xl was calling libxl_device_disk_destroy after a successful call to
> libxl_device_disk_remove, which leads to an error.
> 
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> ---
>  tools/libxl/xl_cmdimpl.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 1371458..d68bac3 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -5416,8 +5416,7 @@ int main_blockdetach(int argc, char **argv)
>      }
>      if (libxl_device_disk_remove(ctx, domid, &disk, 0)) {
>          fprintf(stderr, "libxl_device_disk_remove failed.\n");
> -    } else
> -        libxl_device_disk_destroy(ctx, domid, &disk, 0);
> +    }

Somebody should probably be calling dispose on the disk here,
unconditionally. dispose used to be called destroy so that might be
where the confusion arose?

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.