From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPCMH-0000fw-Nm for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:11:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPCM9-0008IY-HC for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:11:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPCM9-0008IL-1l for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:11:17 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9JDBFZs005638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Oct 2012 09:11:15 -0400 Message-ID: <5081516D.1070803@redhat.com> Date: Fri, 19 Oct 2012 15:11:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <153170376.13357325.1350637125350.JavaMail.root@redhat.com> <87wqym3a2p.fsf@blackfin.pond.sub.org> In-Reply-To: <87wqym3a2p.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 25/25] hmp: add NBD server commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com 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. > 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? > 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. Paolo