[libvirt] [PATCH] RFC: Add blockdev-delete QMP command

Ian Main imain at redhat.com
Tue Feb 11 18:38:12 UTC 2014


On Mon, Feb 10, 2014 at 10:05:54AM -0700, Eric Blake wrote:
> On 02/07/2014 04:15 PM, Ian Main wrote:
> > This is the sister command to blockdev-add.  In Fam's example he uses
> > the drive_del HMP command to clean up but when trying to do this via
> > libvirt it doesn't work.  This command seems to be needed in order to
> > perform proper cleanup.
> > 
> > Signed-off-by: Ian Main <imain at redhat.com>
> > ---
> >  blockdev.c       | 52 ++++++++++++++++++++++++++++++++++++++--------------
> >  qapi-schema.json | 11 +++++++++++
> >  qmp-commands.hx  | 30 ++++++++++++++++++++++++++++++
> >  3 files changed, 79 insertions(+), 14 deletions(-)
> > 
> 
> > +SQMP
> > +blockdev-delete
> > +------------
> > +
> > +Remove host block device.  The result is that guest generated IO is no
> 
> > +Example (1):
> > +
> > +-> { "execute": "blockdev-snapshot-delete-internal-sync",
> > +                "arguments": { "device": "target0" }
> 
> Wrong example.

Ah, good catch, thanks.
 
> But indeed having the ability to drop things in QMP would be nice.
> 
> In RHEL, libvirt is using a downstream __com.redhat_drive_del before
> falling back to upstream HMP drive_del, so how does this differ from
> drive_del or the RHEL downstream command?

It really doesn't differ except that it's available via QMP.

	Ian




More information about the libvir-list mailing list