From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPD5P-0004wX-41 for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPD5N-0006HH-PA for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:58:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPD5N-0006HD-Gl for qemu-devel@nongnu.org; Fri, 19 Oct 2012 09:58:01 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9JDw0NS027739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Oct 2012 09:58:00 -0400 Message-ID: <50815C66.5050303@redhat.com> Date: Fri, 19 Oct 2012 15:57:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <153170376.13357325.1350637125350.JavaMail.root@redhat.com> <87wqym3a2p.fsf@blackfin.pond.sub.org> <5081516D.1070803@redhat.com> <87d30ezhyz.fsf@blackfin.pond.sub.org> In-Reply-To: <87d30ezhyz.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 15:53, Markus Armbruster ha scritto: > Paolo Bonzini 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. No, because we keep a reference via drive_put_ref. But that's by design, drive_del exists after all and we can add a more fine-grained nbd_server_del too. Paolo