qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 25/25] hmp: add NBD server commands


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 25/25] hmp: add NBD server commands
Date: Fri, 19 Oct 2012 15:53:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> Il 19/10/2012 14:44, Markus Armbruster ha scritto:
>> Apropos hotplug.  The only way to unexport a block device is to stop the
>> NBD server outright.  Once the device backend has been exported,
>> unplugging the device gets rid of the frontend, but the backend stays
>> until you stop the NBD server, or you kill the backend with the big
>> drive_del hammer.
>
> Right.  (Though for removable devices you can just eject it, which calls
> the close notifier).
>
>> Makes me wonder whether we need QMP command nbd-server-del.
>
> Perhaps yes, but it can be added later.

Perhaps deleting the backend should automatically unexport it.  I
suspect that's not the case for the automatic delete on unplug.

>> I agree that we can the human monitor is again for human users only,
>> thus we don't have to encumber it with the need of tools.  I might also
>> buy your argument that extra exports don't really hurt.  But device plug
>> / -unplug is just as relevant there as in QMP.  If it's a show-stopper
>> for QMP, then I don't think it can be a "minor loss" for HMP.
>
> The question is, who do we expect to use HMP at this time?

Humans.  I don't think we have data to justify narrower assumptions.

Some human users will happily use libvirt to unplug devices, others may
want to do it in the human monitor.  "Users of the human monitor don't
want to do X" is a rather questionable argument for me.

>> 2. What if we ever change our minds regarding fine-grained NBD export
>> control in the human monitor?  Add a second command to start the server
>> without exporting everything?  Add a "don't auto-export" argument to the
>> existing command?
>
> The latter.
>
> But indeed one alternative, possibly better, is to remove the auto-add
> and add a "nbd_server_add -a" (for "all") flag to HMP.  I think I'll
> drop the last patch and send a pull request for the others (with your
> suggested changes), while we discuss this.

I like the -a idea.  In fact, I was pondering it myself :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]