From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43106 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFZO8-00027N-Jj for qemu-devel@nongnu.org; Mon, 08 Nov 2010 16:36:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFYrj-0007ek-67 for qemu-devel@nongnu.org; Mon, 08 Nov 2010 16:03:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFYri-0007ec-VW for qemu-devel@nongnu.org; Mon, 08 Nov 2010 16:02:59 -0500 Date: Mon, 8 Nov 2010 23:02:50 +0200 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH 0/3] v4 Decouple block device removal from device removal Message-ID: <20101108210250.GD10777@redhat.com> References: <20101103120443.GD3469@us.ibm.com> <20101103172910.GT3469@us.ibm.com> <20101103180224.GB19117@redhat.com> <20101103205929.GF3469@us.ibm.com> <20101103212640.GB20833@redhat.com> <20101104164551.GB20081@us.ibm.com> <20101105141708.GG17667@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , yamahata@valinux.co.jp, qemu-devel@nongnu.org, Anthony Liguori , Ryan Harper , Stefan Hajnoczi On Fri, Nov 05, 2010 at 05:01:49PM +0100, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Fri, Nov 05, 2010 at 02:27:49PM +0100, Markus Armbruster wrote: > >> I'd be fine with any of these: > >> > >> 1. A new command "device_disconnet ID" (or similar name) to disconnect > >> device ID from any host parts. Nice touch: you don't have to know > >> about the device's host part(s) to disconnect it. But it might be > >> more work than the other two. > >> > >> 2. New commands netdev_disconnect, drive_disconnect (or similar names) > >> to disconnect a host part from a guest device. Like (1), except you > >> have to point to the other end of the connection to cut it. > > > > I think it's cleaner not to introduce a concept of a disconnected > > backend. > > Backends start disconnected, so the concept already exists. > > > One thing that we must be careful to explicitly disallow, is > > reconnecting guest to another host backend. The reason being > > that guest might rely on backend features and changing these > > would break this. > > > > Given that, disconnecting without delete isn't helpful. > > What about disconnect, hot plug new device, connect? Exactly. I don't think we want to support this. New device might not support all features that old one has. Or it may have more features. > >> 3. A new command "drive_del ID" similar to existing netdev_del. This is > >> (2) fused with delete. Conceptual wart: you can't disconnect and > >> keep the host part around. Moreover, delete is slightly dangerous, > >> because it renders any guest device still using the host part > >> useless. > > > > I don't see how it's more dangerous than disconnecting. > > If guest can't access the backend it might not exist > > as far as guest is concerned. > > If we keep disconnect and delete separate operations, we can make delete > fail when still connected. Typo insurance. > > >> Do you need anything else from me to make progress? > > > > Let's go for 3. Need for 1/2 seems dubious, and it's much harder > > to support.