From patchwork Wed Nov 1 15:44:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 833037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="JcYjNSD7"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yRtFY3ylZz9ryv for ; Thu, 2 Nov 2017 02:59:29 +1100 (AEDT) Received: from localhost ([::1]:56453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9vQN-0003EK-Kz for incoming@patchwork.ozlabs.org; Wed, 01 Nov 2017 11:59:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9vCL-0008I9-9a for qemu-devel@nongnu.org; Wed, 01 Nov 2017 11:45:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9vCG-0006lt-7q for qemu-devel@nongnu.org; Wed, 01 Nov 2017 11:44:57 -0400 Received: from mail-eopbgr40111.outbound.protection.outlook.com ([40.107.4.111]:51842 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e9vCF-0006lD-MS; Wed, 01 Nov 2017 11:44:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FVZ5naNlyPQz6TLO2SPawBOTDp2/hJxhzAJf78rqOUY=; b=JcYjNSD7LI95q/bcjQUpRKvd+WUV7tBRlZ00SGvAUp1YPgCehdsvz+Om3w6mhoX6QYR93t3lOQbHd7DAa08Sx5S6kQfoUc59TM9LXpM94VMKrmqQwODDHdF2WUFaYQVQJ5eL39kAXri8qxMGugGYSIRAqhbHfRanZr1Rj/HG48A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM5PR0801MB1987.eurprd08.prod.outlook.com (2603:10a6:203:4b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Wed, 1 Nov 2017 15:44:48 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Wed, 1 Nov 2017 18:44:05 +0300 Message-Id: <1509551048-129830-13-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509551048-129830-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1509551048-129830-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: VI1PR0501CA0017.eurprd05.prod.outlook.com (2603:10a6:800:92::27) To AM5PR0801MB1987.eurprd08.prod.outlook.com (2603:10a6:203:4b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 627c3a11-8547-4251-0793-08d5213f7c23 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:AM5PR0801MB1987; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 3:ohJQSyM2fvQUcg61tdXov5l90KUO+FBzcLbFxkQmM87RDwGRE4q0j3v4+3xa4TbdlILbY2DswQyI8WCSGiMHBu8CfTZesTiobNnL9Zebuy5wanBz3N5le/GmFL7gD8k3JHxR1iBjX5qS6+70nNcvh9jqpONK84CoFvTFuk1JBp2UOeAjWuCySWg4bq+VwNIt3nOnv90H1RPNKbISwLggggP0g+QwOr9tJ/ZT47nnX1R02RCRPN14HUoPcqDvv5YC; 25:Zrr1WWcOaBA4QMPiRo+Toe6nsrykbVcfcd47WTcG+5ezFEgDa0Zyr1k0juDiGvzwyq44RZvkVBHdxsAOZN/q62W9QOys3MesVdahPxNvSBlUhIsv69c0qBf1Lix4e57yzLfuQebciMT9QUCE2rr8/uWUg9fFryh9cEmOmUUzHJ/yRdPXifQpEVMKrwsINOeB1wyXgIkhrMQeVdyGalXwH3L617rZw8fdYk9KEr4rCLxsA9btklDxDnIQStqrgTLqCJtws126rzEfhgNei15bhwJutJdSrfM2lYik74EfVuzFxTCYJx9QGUOUxQPv19YfvHcpSSCD0izVJq5WBSsAsg==; 31:vASFs67O6k3n3StpF6LO4qXGC/PsFmbuEYvjYDa3/gl+LSpTnE/Mbv2UJcqBFy8n20NVZqhMJkXhH97/AK3VWt9ru1B2u59GDkhbhOrkKdBc9aTQdWYFvk9mk001Zdg57D80iTBi6GYSpSXo7Hwqhb51nHrr07CafhKW7Xoo4wy+RY8h9+ZMvvlRpEh2hnmI4z68JPhqhzxZhRggEJHw7TMsxI3woIbmeqs6q8aRsms= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1987: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:BhCWgHONG1lrxFi+F1vS0EVvL0IcoQbRp2+lHSSn25qukPB8SpadtmR0pTTe+1dcQ6F9caIigaa1VRjoRahoxlO2ukaHHQcJZJDZj4XCLk5x/v1P3f8UFyAeyv+2rfMCVRg1BqHWKare32brD6jRS7RYKxAO1s4qBGx6O4jluE3y6O7/YMwtMiu0RmQ3z/utlkU6ou4JCB3y4Hv291BcFhZQjSPpN41OyK+Le5KNojWBb/Feg8sqH2kP09jo+q+gWe7E/gPWKpgJ1V+GfaQ4pNuZH49NrUWLoyZHHw9wcYNow4aAsuuXC2zVekmYROpB3pk3lRcBlcjKQxZiRccmBbu/dTComopfVDl1uccy9vFCgalEUncQ6fYpkS2xk7fn1M89DYk4djtdvddk1vj+CWbyfytF3Qcdrd++YguYPr0=; 4:q9yS+D7QmJ4Zyg4wM59B2Fx1M+5ImRhYI2aS//SbnIitWzEyKyfdVZhsTRjDwlOea1MCIw19v4x8LkjfbFjeMOl02414RVmm5oX87UeE8P2pi/9ZxPHjxAYekjF+bXwQjep85fLa9kdepc0RYHrYoi1If0VLIn4tvi77n7w6GgmGLX5ODeh8fsgCWWFfWYIc0moZamPi6mP/JYK6RscLmuo3iF3zK2HnPbR0CzYxIgi2DJQDe7DxQxWTnH96bpWlkTCJQDdiALT9b0PomV54Gg== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231020)(100000703101)(100105400095)(3002001)(6041248)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1987; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1987; X-Forefront-PRVS: 0478C23FE0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(376002)(346002)(189002)(199003)(6666003)(16526018)(53936002)(107886003)(48376002)(86362001)(6916009)(2950100002)(3846002)(6116002)(101416001)(575784001)(50986999)(76176999)(106356001)(69596002)(5660300001)(25786009)(105586002)(316002)(53416004)(2351001)(16586007)(2361001)(54906003)(33646002)(4326008)(5003940100001)(478600001)(66066001)(36756003)(50226002)(6512007)(47776003)(2906002)(8936002)(6506006)(97736004)(6486002)(68736007)(305945005)(50466002)(81166006)(81156014)(8676002)(189998001)(7736002)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1987; H:xantnef-ws.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1987; 23:OyFKsUpVjS2uxJDnEwMTVkIxqYf/K7leWDBZCqr?= +vhb9S+POJ0r4pxBbBaVRPMCJ9ADIsYC07Uh//BsuT6Ch/Cjxtl0YC0Uejc9c9ug/LkRNKXKdDt9tCdu252ZMG6EKUesNCPsDCNbou/GkjdEaTJTRJMwuHEPKDhXBJgM5huqPFuJtSlDm7C4z2QZFT8F0BrDe4ZRhYru9QcE8dyzm8eRMUQPZSFVFdWxskk0ML27L2X6xqy4wEz8WsvLfK7pG7x8zXGUQGAvZag2gLGEtfZylxa8OUcdtTxbpFKYl5/tbYiHsjsIaalOHPeLctiCgzWhWHBtNVIAIvAF9VZkKx/B3Xzm+Pghhi42v11ttpp4a4gutREFKrBZqcULrmiq9AS2WXtGlKkwlst3nY7swBxd4jrbQGJiaftrPvpZPuJQpPU1eKtdzvdRSGavKc0wuNzWnq5bsgIcSbmRcpuqg1ywv3L7ybojUljkDRLYgXdaGDe56Xls36nwXewgVzetDp72IyqEQsp4nZ/MjQybozQ0z9uXBKbiy44o1UwvYRZwf3tHTUa8BsQrFSsclfh9HEhoV18sNu9E4twg/C2A+5Oz7LY0yeS7WATYDgiVvj9mMDJTZ0Dht8DJ+WqZ0EpuusV2VvjBHGrtv44JcVA+BIQYKS3KYuCdzuglrUIjJcoysf95Mhw/rbwTF01K4ivk7zqT6/h9v5GXUabCdsbCK/rUobsE/LTQ2pK9KD4d1OYq88OKKqbQ1bErNrPeMlPNPajUXQoNN9eP2TE22kHqZ1nAJRNzZPUVLZm1caS5l585PyGhFIpCg+1eG+b3/b2yDpMrb8NKG25qjHbtLSyVCbDAwTqpNzuNOT6TGdOPe3Uy6/JHHC9EOHHNf8JLQNoU1JUREh5q8aW9CGQY5Q/9pb3nWqNcN3WMNCBWgI9EnfjcJ8Aeq87Rsf4dmSUSDEN0R5OfMhi9cG/dgMeVqMyVFyVgmPadTuvuXRG1xReipoKwydj6BfMkFPHOebIZxlrf/w74wnQsdQaOYXORJYhAgVDGKVfGWzguU6NBMJqe4OfNaEIXqTqzmLhcg5fKbZM3kUIjQ80FPsv6WpCwYfGt/Ofc1pHiXeZDp798a3zoJQPRjTr1+Nc1On5LSmwAJXxkjPUjCvApgU1wuMhe7yBWWKgjAuLq3Kd2MtXGgURRlawILH80t8yCdr8bBipW5noL0R/OrEZNCFDo/hKFFs9aEQg== X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 6:hgtdkqcwwAeADau4JGVeWCS43FDGBWB3YxkyJSSdKpp4Pk23Ek5iMQSkKPc/yHcFmFGvhbAM/yr4775nipBKSBgpBINoZziM6oTh9XsuwLZ9a1lMe3/L+/2UvvwvzXUXq/VFhI2lx3nqIOsqIJE+Fn+2GOijKYXUooJUJ+xxK9/Udavc9n8JDDB6a4k1JDqyC3Nsniofc68vMBmFOAVyuOuAxAOK3hnYcu+VoMxWuF3LSDUUErZyhHv1i/VX83fq15C+e6LslUFV24FETQyZA2/+6RwC5HRY0kDfef3F2SSHcMhDsnexAPtq5S/5FuQ1Nkya1khJeytcnxQpeP1Nybi5SuZiErStoZyCjQYnagY=; 5:mylJXmvxODuy+XFXy7GlWg1jG7p0UVXCbvT3qWQ+xHy+YaqutgCHr0yu01P/zDPGzeh7beVL5uXnbSgb/CILTlwAUb3QczdOE/LcSn3b0MwGifDPzMW09h654MHD7GEksKbKG++DzWqXurvsz7+qr6rHbEKak10HTPiPuLx8FOo=; 24:PvimY3pdlTgj9xkzyJPgevaD290xz8+t4c4FEzlPmEMxKsxDiO1zEmJX4cy8RykNG1PVTEXbdEMRRSzBUj/ZEjulssUUO0sQCObcYpqZ96k=; 7:MmRjrk3HhCQKjoebPnzPleKd3w6Xxj9FneMMTUEdZrtvFt+8ps5BQ2RrX6UckD+sr9r26zMJjXzw11T3dbwE0f65HlgG1Cdb/2VMUGqUpPXE3+QnYwIA3XV0El4BdhKX1XabF2Q2S+VuU3iD9oBLT/Rb4SCVMVYFdo6cknSJja0WpP0CxyNDWwRtSR3fSs6ZDVM7cDC0LHFoGVNyKPn1+3hjHelumP/cdszkiSPN1WY+uW/tGNzsRZHHIUCfMyhL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:97Pt+4p7JKs1TmYmc6kQS618mRonHODweAT14iSZbR8Tt96z6XYlHL9Ytj76zdsypjdO0W26Sj4sOMnYJ36lTNrcHONiCNd4xjjmRzR2gxDdc5xoKE16cqb09kADsQ30sIiPW60p3vLB14R8icHKys5jUAlbI6v+s7SYYHGOkpg= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2017 15:44:48.2276 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 627c3a11-8547-4251-0793-08d5213f7c23 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1987 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.4.111 Subject: [Qemu-devel] [PATCH v5 12/15] qcow2: check space leak at the end of the image X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, Anton Nefedov , berto@igalia.com, den@virtuozzo.com, qemu-block@nongnu.org, Pavel Butsykin , mreitz@redhat.com, "Denis V . Lunev" Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Pavel Butsykin Preallocated space in the image may remain unused; the patch adds the functionality to identify and fix it in the qcow2_check to avoid wasting storage space on the host. Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2.c | 32 +++++++++++++ tests/qemu-iotests/026.out | 94 +++++++++++++++++++++++++++++--------- tests/qemu-iotests/026.out.nocache | 94 +++++++++++++++++++++++++++++--------- tests/qemu-iotests/029.out | 5 +- tests/qemu-iotests/060.out | 10 +++- tests/qemu-iotests/061.out | 5 +- tests/qemu-iotests/066.out | 5 +- tests/qemu-iotests/098.out | 7 ++- tests/qemu-iotests/108.out | 5 +- tests/qemu-iotests/112.out | 5 +- 10 files changed, 210 insertions(+), 52 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 5e2b543..ef65b5f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -530,6 +530,33 @@ int qcow2_mark_consistent(BlockDriverState *bs) return 0; } +static int qcow2_check_extra_preallocation(BlockDriverState *bs, + BdrvCheckResult *res, BdrvCheckMode fix) +{ + BDRVQcow2State *s = bs->opaque; + uint64_t img_size = bdrv_getlength(bs->file->bs); + + if (res->image_end_offset < img_size) { + uint64_t count = + DIV_ROUND_UP(img_size - res->image_end_offset, s->cluster_size); + fprintf(stderr, "%s space leaked at the end of the image %jd\n", + fix & BDRV_FIX_LEAKS ? "Repairing" : "ERROR", + img_size - res->image_end_offset); + res->leaks += count; + if (fix & BDRV_FIX_LEAKS) { + int ret = bdrv_truncate(bs->file, res->image_end_offset, + PREALLOC_MODE_OFF, NULL); + if (ret < 0) { + res->check_errors++; + return ret; + } + res->leaks_fixed += count; + } + } + + return 0; +} + static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result, BdrvCheckMode fix) { @@ -538,6 +565,11 @@ static int qcow2_check(BlockDriverState *bs, BdrvCheckResult *result, return ret; } + ret = qcow2_check_extra_preallocation(bs, result, fix); + if (ret < 0) { + return ret; + } + if (fix && result->check_errors == 0 && result->corruptions == 0) { ret = qcow2_mark_clean(bs); if (ret < 0) { diff --git a/tests/qemu-iotests/026.out b/tests/qemu-iotests/026.out index 86a50a2..29cc41e 100644 --- a/tests/qemu-iotests/026.out +++ b/tests/qemu-iotests/026.out @@ -5,7 +5,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 5; imm: off; once: on; write write failed: Input/output error -No errors were found on the image. +ERROR space leaked at the end of the image 1024 + +1 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 5; imm: off; once: on; write -b @@ -33,7 +36,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 1024 + +1 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 28; imm: off; once: on; write -b @@ -468,20 +474,27 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_hookup; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_hookup; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 394240 + +770 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 5120 -55 leaked clusters were found on the image. +65 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -489,19 +502,26 @@ Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 265728 -251 leaked clusters were found on the image. +770 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 394240 + +770 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write; errno: 28; imm: off; once: off; write @@ -520,20 +540,27 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 27648 -11 leaked clusters were found on the image. +65 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -541,27 +568,35 @@ Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 21504 -23 leaked clusters were found on the image. +65 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_table; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_table; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 131584 -11 leaked clusters were found on the image. +268 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -569,27 +604,35 @@ Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 131584 -23 leaked clusters were found on the image. +280 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_switch_table; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_switch_table; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 132608 -11 leaked clusters were found on the image. +270 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -597,8 +640,9 @@ Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 132608 -23 leaked clusters were found on the image. +282 leaked clusters were found on the image. This means waste of disk space, but no harm to data. === L1 growth tests === @@ -651,7 +695,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 5; imm: off; once: on write failed: Input/output error -No errors were found on the image. +ERROR space leaked at the end of the image 98304 + +96 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 5; imm: off; once: off @@ -665,7 +712,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 28; imm: off; once: on write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 98304 + +96 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 28; imm: off; once: off diff --git a/tests/qemu-iotests/026.out.nocache b/tests/qemu-iotests/026.out.nocache index ea2e166..42b258b 100644 --- a/tests/qemu-iotests/026.out.nocache +++ b/tests/qemu-iotests/026.out.nocache @@ -5,7 +5,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 5; imm: off; once: on; write write failed: Input/output error -No errors were found on the image. +ERROR space leaked at the end of the image 1024 + +1 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 5; imm: off; once: on; write -b @@ -33,7 +36,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 1024 + +1 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_update; errno: 28; imm: off; once: on; write -b @@ -476,20 +482,27 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_hookup; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_hookup; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 394240 + +770 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 5120 -55 leaked clusters were found on the image. +65 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -497,19 +510,26 @@ Event: refblock_alloc_hookup; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 265728 -251 leaked clusters were found on the image. +770 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 394240 + +770 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write; errno: 28; imm: off; once: off; write @@ -528,20 +548,27 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 27648 -11 leaked clusters were found on the image. +65 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -549,27 +576,35 @@ Event: refblock_alloc_write_blocks; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 21504 -23 leaked clusters were found on the image. +65 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_table; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_table; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 131584 -11 leaked clusters were found on the image. +268 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -577,27 +612,35 @@ Event: refblock_alloc_write_table; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 131584 -23 leaked clusters were found on the image. +280 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_switch_table; errno: 28; imm: off; once: on; write write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_switch_table; errno: 28; imm: off; once: on; write -b write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 33280 + +65 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 132608 -11 leaked clusters were found on the image. +270 leaked clusters were found on the image. This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 @@ -605,8 +648,9 @@ Event: refblock_alloc_switch_table; errno: 28; imm: off; once: off; write -b Failed to flush the L2 table cache: No space left on device Failed to flush the refcount block cache: No space left on device write failed: No space left on device +ERROR space leaked at the end of the image 132608 -23 leaked clusters were found on the image. +282 leaked clusters were found on the image. This means waste of disk space, but no harm to data. === L1 growth tests === @@ -659,7 +703,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 5; imm: off; once: on write failed: Input/output error -No errors were found on the image. +ERROR space leaked at the end of the image 98304 + +96 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 5; imm: off; once: off @@ -673,7 +720,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 28; imm: off; once: on write failed: No space left on device -No errors were found on the image. +ERROR space leaked at the end of the image 98304 + +96 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l1_grow_activate_table; errno: 28; imm: off; once: off diff --git a/tests/qemu-iotests/029.out b/tests/qemu-iotests/029.out index 5bc93e0..7176e38 100644 --- a/tests/qemu-iotests/029.out +++ b/tests/qemu-iotests/029.out @@ -6,7 +6,10 @@ is smaller than the current L1 table. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 wrote 4096/4096 bytes at offset 0 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -No errors were found on the image. +ERROR space leaked at the end of the image 65536 + +1 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=16777216 wrote 4194304/4194304 bytes at offset 0 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out index 736dc30..290ccec 100644 --- a/tests/qemu-iotests/060.out +++ b/tests/qemu-iotests/060.out @@ -78,20 +78,26 @@ Leaked cluster 9 refcount=1 reference=0 Repairing cluster 4 refcount=1 reference=2 Repairing cluster 9 refcount=1 reference=0 Repairing OFLAG_COPIED data cluster: l2_entry=8000000000040000 refcount=2 +ERROR space leaked at the end of the image 65536 The following inconsistencies were found and repaired: 1 leaked clusters 2 corruptions Double checking the fixed image now... -No errors were found on the image. + +1 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. incompatible_features 0x0 wrote 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) incompatible_features 0x0 read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -No errors were found on the image. +ERROR space leaked at the end of the image 131072 + +2 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/061.out b/tests/qemu-iotests/061.out index 942485d..87aaebf 100644 --- a/tests/qemu-iotests/061.out +++ b/tests/qemu-iotests/061.out @@ -328,7 +328,10 @@ wrote 131072/131072 bytes at offset 0 No errors were found on the image. read 131072/131072 bytes at offset 0 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -No errors were found on the image. +ERROR space leaked at the end of the image 196608 + +3 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. read 131072/131072 bytes at offset 0 128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/066.out b/tests/qemu-iotests/066.out index 093431e..81ef795 100644 --- a/tests/qemu-iotests/066.out +++ b/tests/qemu-iotests/066.out @@ -13,7 +13,10 @@ discard 67109376/67109376 bytes at offset 0 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 67109376/67109376 bytes at offset 0 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -No errors were found on the image. +ERROR space leaked at the end of the image 327680 + +5 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. Offset Length Mapped to File === Writing to preallocated zero clusters === diff --git a/tests/qemu-iotests/098.out b/tests/qemu-iotests/098.out index 7634d0e..733249f 100644 --- a/tests/qemu-iotests/098.out +++ b/tests/qemu-iotests/098.out @@ -20,7 +20,10 @@ Leaked cluster 4 refcount=1 reference=0 Leaked cluster 5 refcount=1 reference=0 Repairing cluster 4 refcount=1 reference=0 Repairing cluster 5 refcount=1 reference=0 -No errors were found on the image. +ERROR space leaked at the end of the image 131072 + +2 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. === reftable_update === @@ -34,6 +37,7 @@ ERROR cluster 1 refcount=0 reference=1 ERROR cluster 3 refcount=0 reference=1 Rebuilding refcount structure Repairing cluster 1 refcount=1 reference=0 +Repairing space leaked at the end of the image 65536 No errors were found on the image. === refblock_alloc === @@ -48,5 +52,6 @@ ERROR cluster 1 refcount=0 reference=1 ERROR cluster 3 refcount=0 reference=1 Rebuilding refcount structure Repairing cluster 1 refcount=1 reference=0 +Repairing space leaked at the end of the image 65536 No errors were found on the image. *** done diff --git a/tests/qemu-iotests/108.out b/tests/qemu-iotests/108.out index 75bab8d..d178b1e 100644 --- a/tests/qemu-iotests/108.out +++ b/tests/qemu-iotests/108.out @@ -68,13 +68,16 @@ Rebuilding refcount structure Repairing cluster 1 refcount=1 reference=0 Repairing cluster 2 refcount=1 reference=0 Repairing cluster 16 refcount=1 reference=0 +ERROR space leaked at the end of the image 720896 The following inconsistencies were found and repaired: 0 leaked clusters 2 corruptions Double checking the fixed image now... -No errors were found on the image. + +11 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. --- Signed overflow after the refblock --- diff --git a/tests/qemu-iotests/112.out b/tests/qemu-iotests/112.out index 81b04d1..7386be8 100644 --- a/tests/qemu-iotests/112.out +++ b/tests/qemu-iotests/112.out @@ -93,7 +93,10 @@ refcount bits: 1 === Amend from refcount_bits=1 to refcount_bits=64 === -No errors were found on the image. +ERROR space leaked at the end of the image 131072 + +2 leaked clusters were found on the image. +This means waste of disk space, but no harm to data. refcount bits: 64 === Amend to compat=0.10 ===