[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] qmp: add nbd-server-remove
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] qmp: add nbd-server-remove |
Date: |
Thu, 9 Nov 2017 09:54:14 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 11/09/2017 09:40 AM, Vladimir Sementsov-Ogievskiy wrote:
> Add command for export removing. It is needed for cases when we
> don't want to keep export after the operation on it was completed.
> The other example is temporary node, created with blockdev-add.
> If we want to delete it we should firstly remove corresponding
> NBD export.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> qapi/block.json | 20 ++++++++++++++++++++
> blockdev-nbd.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 47 insertions(+)
It would be nice (okay as a followup patch) to add iotest coverage of
the new command.
> ##
> +# @nbd-server-remove:
> +#
> +# Stop exporting block node through QEMU's embedded NBD server.
> +#
> +# @device: The device name or node name of the exported node. Should be equal
> +# to @device parameter for corresponding nbd-server-add command
> call.
> +#
> +# @force: Whether active connections to the export should be closed. If this
> +# parameter is false the export is only removed from named exports
> list,
> +# so new connetions are impossible and it would be freed after all
> +# clients are disconnected (default false).
> +#
> +# Returns: error if the server is not running or the device is not marked for
> +# export.
> +#
> +# Since: 2.12
You are correct that this is too late for 2.11, but I like the concept.
Once we have some testsuite coverage, I'll queue it for 2.12.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature