From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bodg2-0008M5-Uu for qemu-devel@nongnu.org; Mon, 26 Sep 2016 17:43:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bodg1-0004X7-UM for qemu-devel@nongnu.org; Mon, 26 Sep 2016 17:43:06 -0400 Date: Mon, 26 Sep 2016 23:42:55 +0200 From: Kashyap Chamarthy Message-ID: <20160926214255.kovmn7xnp5kf6emo@eukaryote> References: <1473957290-13382-1-git-send-email-den@openvz.org> <1473957290-13382-2-git-send-email-den@openvz.org> <20160919012151.GA4883@lemon> <960740fa-37d0-48d5-820f-ebfe8979ffa8@openvz.org> <31566a2b-bf64-97de-5483-85284c341313@redhat.com> <20160926150421.GL6093@noname.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160926150421.GL6093@noname.str.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 1/2] block: sync bdrv_co_get_block_status_above() with bdrv_is_allocated_above() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Eric Blake , Fam Zheng , qemu-block@nongnu.org, qemu-devel@nongnu.org, Max Reitz , Stefan Hajnoczi , "Denis V. Lunev" On Mon, Sep 26, 2016 at 05:04:21PM +0200, Kevin Wolf wrote: > Am 19.09.2016 um 22:39 hat Eric Blake geschrieben: [...] > > I typically write this as: > > > > L2 <- L1 <- L0 > > > > (read "L2 backs L1, which in turn backs L0") with the active on the > > right. So I understand the confusion in Fam's question where you were > > using the opposite direction. > > And I tend to use this one: > > base <- sn1 <- sn2 <- top > > "sn*" isn't any better than "L*", but having at least one of "base" and > "top" (or "active") in there disambiguates the roles of the nodes. Not to quibble over terminology too much, but now that I'm writing a doc that I want to submit upstream, I began with your (Kevin's) notation. Then, I thought: Hmm, "sn1" could also be referred to as 'base', and "sn2" as 'top' when using `block-commit`' (and `block-stream`, once it starts supporting intermediate streaming?). And, moreover, as Eric (correctly) warns elsewhere about file-names vs. points-in-time: the guest state when 'sn1' was created is contained in 'base', so one could argue that 'sn1' ("snapshot 1") is a misnomer, and is technically 'overlay1'. So, I used the below notation until recently, including 'active' (with the rationale Kevin mentioned): base <- overlay1 <- overlay2 <- active Then, someone asked: "In the above chain, are you pointing to 'overlay2' as active, or is 'active' a separate image unto itself"? "Sigh, so it is still prone to misunderstanding", I thought. Given that, for now, though slightly more verbose and space-occupying, I settled on the below (occasionally doing s/base/orig/, to avoid the "overlay1 could be referred to as 'base' in some cases" problem): Live QEMU | v base <- overlay1 <- overlay2 <- overlay3 FWIW, the above also avoids the problem of a file called 'active' being described as: "previously-active, but not anymore, because its contents are merged into its backing file" in the event of a 'block-commit'. -- /kashyap