From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW30c-0008Pf-4y for qemu-devel@nongnu.org; Thu, 12 Mar 2015 09:18:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YW30Y-0002U0-VT for qemu-devel@nongnu.org; Thu, 12 Mar 2015 09:18:42 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:55971 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YW30Y-0002Tr-OP for qemu-devel@nongnu.org; Thu, 12 Mar 2015 09:18:38 -0400 Date: Thu, 12 Mar 2015 14:18:35 +0100 From: Alberto Garcia Message-ID: <20150312131835.GA4412@igalia.com> References: <2e1103fe919e6a065dbd2e305f8b9b0fdb687b4e.1424439295.git.berto@igalia.com> <20150305140425.GD5427@noname.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150305140425.GD5427@noname.redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/3] block: Support streaming to an intermediate layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Jeff Cody , qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster (Ccing Markus and Jeff as suggested) On Thu, Mar 05, 2015 at 03:04:25PM +0100, Kevin Wolf wrote: > My question is whether we can't simply call stream_start() with an > intermediate node as bs instead of introducing a new parameter. I'm > not completely sure about the consequences of 3., i.e. moving > ownership of a block job to some BDS somewhere down the chain, but > otherwise it should be possible and seems cleaner. I would like to get some feedback about how to properly block jobs during a block streaming operation to an intermediate node. So let's suppose we have a graph like this: [A] <- [B] <- [C] <- [D] <- [E] <- [F] [F] is the active layer, and to its left is the chain of backing files. So if we stream from [B] (base) to [D] (top) this is the result: [A] <- [B] <- [D] <- [E] <- [F] The idea is that the block job would be owned by the node that is receiving the data ([D] in this example) so other operations would still be allowed in other parts of the chain. I would also update query-block-jobs so it would return jobs owned by inner nodes, not just the ones at the root (there's still the issue of how to refer to those nodes, yesterday I wrote a separate e-mail about that). During this process we would block all operations involving any node between base and top ([C] in this example): - Streaming from [D] to [F] would be allowed. - Streaming from [A], [B] or [C] would not be allowed. - Streaming with no base would not be allowed either. Are those assumptions correct? What would we do if part of the chain is shared, like in this case? [A] <- [B] <- [C] <- [D] <- [E] <- [F] ^ \ [G] <- [H] <- [I] <- [J] Berto