From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHwf7-0004Fv-M3 for qemu-devel@nongnu.org; Mon, 24 Feb 2014 09:37:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHwf1-0006Nh-Es for qemu-devel@nongnu.org; Mon, 24 Feb 2014 09:37:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHwf1-0006NJ-6J for qemu-devel@nongnu.org; Mon, 24 Feb 2014 09:37:35 -0500 Date: Mon, 24 Feb 2014 22:37:35 +0800 From: Fam Zheng Message-ID: <20140224143735.GA6595@T430.redhat.com> References: <530B4DAA.6070301@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <530B4DAA.6070301@kamp.de> Subject: Re: [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: Kevin Wolf , Paolo Bonzini , "qemu-devel@nongnu.org" , Stefan Hajnoczi 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. Fam