From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI22n-0004a5-R6 for qemu-devel@nongnu.org; Mon, 24 Feb 2014 15:22:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WI22e-0001Cj-5V for qemu-devel@nongnu.org; Mon, 24 Feb 2014 15:22:29 -0500 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:34241 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WI22d-0001CW-Rj for qemu-devel@nongnu.org; Mon, 24 Feb 2014 15:22:20 -0500 Message-ID: <530BA9F0.2050508@kamp.de> Date: Mon, 24 Feb 2014 21:22:08 +0100 From: Peter Lieven MIME-Version: 1.0 References: <530B4DAA.6070301@kamp.de> <20140224143735.GA6595@T430.redhat.com> <530B75C8.60908@redhat.com> In-Reply-To: <530B75C8.60908@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 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: Paolo Bonzini , Fam Zheng Cc: Kevin Wolf , "qemu-devel@nongnu.org" , Stefan Hajnoczi Am 24.02.2014 17:39, schrieb Paolo Bonzini: > 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. I will send a patch. Peter > > Paolo > >