block: Add 'x-blockdev-del' QMP command
commit81b936ae70e635557af9ca80922ee69146cb5f4c
authorAlberto Garcia <berto@igalia.com>
Mon, 2 Nov 2015 14:51:55 +0000 (2 16:51 +0200)
committerMax Reitz <mreitz@redhat.com>
Wed, 11 Nov 2015 15:55:28 +0000 (11 16:55 +0100)
tree5f0e78e898987584d69ebe045f0c31825fd515f4
parentf636ae85f3db8ffb987c79715869dba1b8217e8a
block: Add 'x-blockdev-del' QMP command

This command is still experimental, hence the name.

This is the companion to 'blockdev-add'. It allows deleting a
BlockBackend with its associated BlockDriverState tree, or a
BlockDriverState that is not attached to any backend.

In either case, the command fails if the reference count is greater
than 1 or the BlockDriverState has any parents.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 6cfc148c77aca1da942b094d811bfa3fcf7ac7bb.1446475331.git.berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
blockdev.c
qapi/block-core.json
qmp-commands.hx