From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56912 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PEOk5-0006kN-TH for qemu-devel@nongnu.org; Fri, 05 Nov 2010 12:02:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PEOjr-0000c8-Hk for qemu-devel@nongnu.org; Fri, 05 Nov 2010 12:02:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PEOjr-0000bf-9l for qemu-devel@nongnu.org; Fri, 05 Nov 2010 12:02:03 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 0/3] v4 Decouple block device removal from device removal References: <20101102202338.GB3469@us.ibm.com> <20101103072134.GA6772@redhat.com> <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> Date: Fri, 05 Nov 2010 17:01:49 +0100 In-Reply-To: <20101105141708.GG17667@redhat.com> (Michael S. Tsirkin's message of "Fri, 5 Nov 2010 16:17:08 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , yamahata@valinux.co.jp, qemu-devel@nongnu.org, Anthony Liguori , Ryan Harper , Stefan Hajnoczi "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? >> 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.