From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHyZP-0003Mv-Fm for qemu-devel@nongnu.org; Mon, 24 Feb 2014 11:40:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHyZH-0003YW-G9 for qemu-devel@nongnu.org; Mon, 24 Feb 2014 11:39:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHyZH-0003YR-8q for qemu-devel@nongnu.org; Mon, 24 Feb 2014 11:39:47 -0500 Message-ID: <530B75C8.60908@redhat.com> Date: Mon, 24 Feb 2014 17:39:36 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <530B4DAA.6070301@kamp.de> <20140224143735.GA6595@T430.redhat.com> In-Reply-To: <20140224143735.GA6595@T430.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , Peter Lieven Cc: Kevin Wolf , "qemu-devel@nongnu.org" , Stefan Hajnoczi Il 24/02/2014 15:37, Fam Zheng ha scritto: > On Mon, 02/24 14:48, Peter Lieven wrote: >> Hi, >> >> I wonder if the current output of get_block_status for compressed VMDKs is correct or >> if we need this patch?: >> >> diff --git a/block/vmdk.c b/block/vmdk.c >> index ff6f5ee..5fa29b0 100644 >> --- a/block/vmdk.c >> +++ b/block/vmdk.c >> @@ -1146,7 +1146,7 @@ static int64_t coroutine_fn vmdk_co_get_block_status(BlockDriverState *bs, >> break; >> case VMDK_OK: >> ret = BDRV_BLOCK_DATA; >> - if (extent->file == bs->file) { >> + if (extent->file == bs->file && !extent->compressed) { >> ret |= BDRV_BLOCK_OFFSET_VALID | offset; >> } >> > > Yes, I think you are right. The output shouldn't contain offset for compressed > extents. Ack. Paolo