[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/40] hmp: Extend drive_del to delete nodes without
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 19/40] hmp: Extend drive_del to delete nodes without BB |
Date: |
Mon, 14 Mar 2016 18:37:20 +0100 |
Now that we can use drive_add to create new nodes without a BB, we also
want to be able to delete such nodes again.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
blockdev.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index 1297c90..322ca03 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2824,6 +2824,15 @@ void hmp_drive_del(Monitor *mon, const QDict *qdict)
AioContext *aio_context;
Error *local_err = NULL;
+ bs = bdrv_find_node(id);
+ if (bs) {
+ qmp_x_blockdev_del(false, NULL, true, id, &local_err);
+ if (local_err) {
+ error_report_err(local_err);
+ }
+ return;
+ }
+
blk = blk_by_name(id);
if (!blk) {
error_report("Device '%s' not found", id);
--
1.8.3.1
- [Qemu-devel] [PULL 12/40] blockdev: Snapshotting must not open second instance of old top, (continued)
- [Qemu-devel] [PULL 12/40] blockdev: Snapshotting must not open second instance of old top, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 15/40] vmdk: Switch to heap arrays for vmdk_write_cid, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 13/40] block: Fix snapshot=on cache modes, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 14/40] block: Fix cache mode defaults in bds_tree_init(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 16/40] vmdk: Switch to heap arrays for vmdk_read_cid, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 17/40] vmdk: Switch to heap arrays for vmdk_parent_open, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 21/40] block: Introduce blk_set_allow_write_beyond_eof(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 23/40] qcow: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 22/40] parallels: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 20/40] block: Use writeback in .bdrv_create() implementations, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 19/40] hmp: Extend drive_del to delete nodes without BB,
Kevin Wolf <=
- [Qemu-devel] [PULL 24/40] qcow2: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 25/40] qed: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 18/40] hmp: 'drive_add -n' for creating a node without BB, Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 29/40] vmdk: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 30/40] vpc: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 28/40] vhdx: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 26/40] sheepdog: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14
- [Qemu-devel] [PULL 27/40] vdi: Use BB functions in .bdrv_create(), Kevin Wolf, 2016/03/14