From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH v7 11/11] main_blockdetach: destroy the disk on successful removal
Date: Mon, 21 May 2012 19:05:39 +0100 [thread overview]
Message-ID: <1337623539-29834-11-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1205211852180.26786@kaball-desktop>
main_blockdetach needs to call libxl_device_disk_destroy so that all the
disk related entries are properly removed from xenstore.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
tools/libxl/xl_cmdimpl.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index ce9237b..1167ed0 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -5396,7 +5396,8 @@ 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);
return 0;
}
--
1.7.2.5
prev parent reply other threads:[~2012-05-21 18:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 18:04 [PATCH v7 0/11] qdisk local attach Stefano Stabellini
2012-05-21 18:05 ` [PATCH v7 01/11] libxl: make libxl_device_disk_local_attach/detach internal functions Stefano Stabellini
2012-05-22 14:05 ` Ian Jackson
2012-05-21 18:05 ` [PATCH v7 02/11] libxl: libxl__device_disk_local_attach return a new libxl_device_disk Stefano Stabellini
2012-05-22 14:12 ` Ian Jackson
2012-05-28 11:31 ` Stefano Stabellini
2012-05-21 18:05 ` [PATCH v7 03/11] libxl: add a transaction parameter to libxl__device_generic_add Stefano Stabellini
2012-05-21 18:05 ` [PATCH v7 04/11] libxl: export libxl__device_from_disk Stefano Stabellini
2012-05-22 14:12 ` Ian Jackson
2012-05-21 18:05 ` [PATCH v7 05/11] libxl: introduce libxl__device_disk_add Stefano Stabellini
2012-05-22 14:14 ` Ian Jackson
2012-05-21 18:05 ` [PATCH v7 06/11] xl/libxl: add a blkdev_start parameter Stefano Stabellini
2012-05-21 18:05 ` [PATCH v7 07/11] libxl: introduce libxl__alloc_vdev Stefano Stabellini
2012-05-22 14:16 ` Ian Jackson
2012-05-21 18:05 ` [PATCH v7 08/11] xl/libxl: implement QDISK libxl_device_disk_local_attach Stefano Stabellini
2012-05-21 18:05 ` [PATCH v7 09/11] libxl__device_disk_local_attach: wait for state "connected" Stefano Stabellini
2012-05-21 18:05 ` [PATCH v7 10/11] libxl_string_to_backend: add qdisk Stefano Stabellini
2012-05-21 18:05 ` Stefano Stabellini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337623539-29834-11-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).