From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ljg6J-0006Xh-JX for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ljg6E-0006UV-Af for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:26 -0400 Received: from [199.232.76.173] (port=57245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ljg6D-0006UI-TY for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:21 -0400 Received: from mx1.redhat.com ([66.187.233.31]:45059) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ljg6D-0004KP-K3 for qemu-devel@nongnu.org; Tue, 17 Mar 2009 16:41:21 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n2HKfLeJ020357 for ; Tue, 17 Mar 2009 16:41:21 -0400 From: Uri Lublin Date: Tue, 17 Mar 2009 22:40:52 +0200 Message-Id: <1237322452-11337-15-git-send-email-uril@redhat.com> In-Reply-To: <1237322452-11337-14-git-send-email-uril@redhat.com> References: <1237322452-11337-1-git-send-email-uril@redhat.com> <1237322452-11337-2-git-send-email-uril@redhat.com> <1237322452-11337-3-git-send-email-uril@redhat.com> <1237322452-11337-4-git-send-email-uril@redhat.com> <1237322452-11337-5-git-send-email-uril@redhat.com> <1237322452-11337-6-git-send-email-uril@redhat.com> <1237322452-11337-7-git-send-email-uril@redhat.com> <1237322452-11337-8-git-send-email-uril@redhat.com> <1237322452-11337-9-git-send-email-uril@redhat.com> <1237322452-11337-10-git-send-email-uril@redhat.com> <1237322452-11337-11-git-send-email-uril@redhat.com> <1237322452-11337-12-git-send-email-uril@redhat.com> <1237322452-11337-13-git-send-email-uril@redhat.com> <1237322452-11337-14-git-send-email-uril@redhat.com> Subject: [Qemu-devel] [PATCH 14/14] block-qcow2: do not keep track of highest-alloc for backing files Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Uri Lublin Signed-off-by: Uri Lublin --- block-qcow2.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/block-qcow2.c b/block-qcow2.c index c98024e..63460e0 100644 --- a/block-qcow2.c +++ b/block-qcow2.c @@ -260,6 +260,8 @@ static int qcow_read_extensions(BlockDriverState *bs, uint64_t start_offset, break; case QCOW_EXT_MAGIC_HIGH_ALLOC: + if ((bs->open_flags & BDRV_O_BACKING) != 0) + break; if (ext.len != sizeof(uint64_t)) { fprintf(stderr, "ERROR: ext_high_alloc: len=%u too large" " (>=%lu)\n", @@ -294,6 +296,9 @@ static void update_highest_alloc(BlockDriverState *bs) uint64_t high; int ret; + if ((bs->open_flags & BDRV_O_BACKING) != 0) + return; + #ifdef DEBUG_EXT QCowExtension ext; int len; -- 1.6.0.6