From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNhL2-0006hA-SF for qemu-devel@nongnu.org; Mon, 25 Jan 2016 08:37:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNhKx-0000zE-LE for qemu-devel@nongnu.org; Mon, 25 Jan 2016 08:37:48 -0500 Date: Mon, 25 Jan 2016 14:37:31 +0100 From: Kevin Wolf Message-ID: <20160125133731.GH5154@noname.redhat.com> References: <1453689887-2567-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453689887-2567-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v8 00/15] qemu-img map: Allow driver to return file of the allocated block List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, Stefan Hajnoczi , pbonzini@redhat.com Am 25.01.2016 um 03:44 hat Fam Zheng geschrieben: > v8: Fix patch 15. [Max] > Add Max's rev-by in patch 1. > > v7: Rebase, update patch 1 for two new bdrv_get_block_status_above() callers in > qemu-img.c. [Max] > Add Max's rev-by in patch 12. > > Original cover letter > --------------------- > > I stumbled upon this when looking at external bitmap formats. > > Current "qemu-img map" command only displays filename if the data is allocated > in bs (bs->file) itself, or in the backing chain. Otherwise, it displays an > unfriendly error message: > > $ qemu-img create -f vmdk -o subformat=monolithicFlat /tmp/test.vmdk 1G > > $ qemu-img map /tmp/test.vmdk > Offset Length Mapped to File > qemu-img: File contains external, encrypted or compressed clusters. > > This can be improved. This series extends the .bdrv_co_get_block_status > callback, to let block driver return the BDS of file; then updates all driver > to implement it; and lastly, it changes qemu-img to use this information in > "map" command: > > > $ qemu-img map /tmp/test.vmdk > Offset Length Mapped to File > 0 0x40000000 0 /tmp/test-flat.vmdk > > $ qemu-img map --output json /tmp/test.vmdk > [{"length": 1073741824, "start": 0, "zero": false, "offset": 0, "depth": 0, > "file": "/tmp/test-flat.vmdk", "data": true} > ] Commented on patches 1, 4 and 11. The rest looks good to me. Kevin