From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaKxx-0004BK-35 for qemu-devel@nongnu.org; Mon, 29 Feb 2016 05:22:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaKxt-0006BB-T4 for qemu-devel@nongnu.org; Mon, 29 Feb 2016 05:22:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaKxt-0006B7-OE for qemu-devel@nongnu.org; Mon, 29 Feb 2016 05:22:09 -0500 From: Markus Armbruster References: <1454151394-52320-1-git-send-email-vsementsov@virtuozzo.com> <20160203081418.GC25746@ad.usersys.redhat.com> <56B45D3A.405@virtuozzo.com> <20160209142852.GA13149@stefanha-x1.localdomain> <56B9FAAE.8040503@virtuozzo.com> <20160210101004.GB7317@stefanha-x1.localdomain> <20160216170943.GA31393@stefanha-x1.localdomain> <56C4B21F.9030006@virtuozzo.com> <20160218121114.GC12470@redhat.com> <20160218164148.GB13271@stefanha-x1.localdomain> <20160219020826.GA23506@ad.usersys.redhat.com> <87povtulpt.fsf@blackfin.pond.sub.org> <56D0ADBD.20000@redhat.com> <87vb583pci.fsf@blackfin.pond.sub.org> Date: Mon, 29 Feb 2016 11:22:06 +0100 In-Reply-To: <87vb583pci.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Mon, 29 Feb 2016 09:14:37 +0100") Message-ID: <8760x73jg1.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 0/6] external backup api List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, Vladimir Sementsov-Ogievskiy , Fam Zheng , "Denis V. Lunev" , Stefan Hajnoczi , qemu-devel@nongnu.org, jsnow@redhat.com Markus Armbruster writes: [...] > Consider a QCOW2 image D (for delta) with a backing file B (for base). > If you open it normally, you see "D over B". Get LBA Status should > certainly claim the "deallocated" state only for blocks that are > allocated neither in D nor B. > > However, you can also open D *without* its backing file. Then you see > "D over nothing". Here, get LBA Status should claim "deallocated" state > for anything not allocated in D. > > My proposal is to expose a "just the dirty blocks" view of a block > backend similarly: it's a *separate* backend that contains *only* the > dirty blocks. Attempts to read a clean block behave exactly like > reading an unmapped block from any other thinly provisioned backend > (QCOW2 gives you zeroes, if I remember correctly). I think it's only > natural to make Get LBA Status claim "deallocated" for exactly the clean > blocks then. Regarding implementation: perhaps we can have a "bitmap filter" block driver that masks out blocks based on a bitmap. Read-only, at least until somebody comes up with sane semantics for writing, and a use case :) Digression: masking out blocks based on a bitmap is is vaguely similar to how a COW block driver replaces blocks based on delta. What makes such a COW block driver a *format* is persistence. Same for bitmap filters. The question whether we want a bitmap filter *format* is being discussed elsewhere. Even if the answer should be "no", we could still have a non-persistent filter if it's useful. [...]