mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
block/export: Add block-export-del
Implement a new QMP command block-export-del and make nbd-server-remove a wrapper around it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-21-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
3859ad36f0
commit
3c3bc462ad
7 changed files with 77 additions and 43 deletions
|
@ -476,8 +476,8 @@ void hmp_nbd_server_remove(Monitor *mon, const QDict *qdict)
|
|||
bool force = qdict_get_try_bool(qdict, "force", false);
|
||||
Error *err = NULL;
|
||||
|
||||
/* Rely on NBD_SERVER_REMOVE_MODE_SAFE being the default */
|
||||
qmp_nbd_server_remove(name, force, NBD_SERVER_REMOVE_MODE_HARD, &err);
|
||||
/* Rely on BLOCK_EXPORT_REMOVE_MODE_SAFE being the default */
|
||||
qmp_nbd_server_remove(name, force, BLOCK_EXPORT_REMOVE_MODE_HARD, &err);
|
||||
hmp_handle_error(mon, err);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue