From patchwork Thu Jun 1 15:14:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9759827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB90D60375 for ; Thu, 1 Jun 2017 15:19:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8C812074F for ; Thu, 1 Jun 2017 15:19:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD0D526247; Thu, 1 Jun 2017 15:19:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D3B992074F for ; Thu, 1 Jun 2017 15:19:30 +0000 (UTC) Received: from localhost ([::1]:45193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGRsn-0002hw-BM for patchwork-qemu-devel@patchwork.kernel.org; Thu, 01 Jun 2017 11:19:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dGRog-0000Mv-OG for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dGRod-0004l2-83 for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:14 -0400 Received: from mail-db5eur01on0136.outbound.protection.outlook.com ([104.47.2.136]:6143 helo=EUR01-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 1dGRoc-0004jz-Le for qemu-devel@nongnu.org; Thu, 01 Jun 2017 11:15:11 -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=y5CMc6LnXUOGFt5lM/kyGDHvNT7zduKmgaO/E8jlmS8=; b=VOFHC8H6Y4qP5o4qIzV8rNhsLZZuM3zGQPutl8O6Dv5d5vgNlXPFWqek/ty0jqGkEV3trwrS1YUINh9+9hMkKHBjfsUP5cgwETGjG/7LoF9UcXh+E1CZTGxRu+00LUY9yMy+fMeP7lfuc5u+C8dbL9Vweh5G6/6+npJnU4c63lQ= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by VI1PR0801MB1999.eurprd08.prod.outlook.com (2603:10a6:800:8a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Thu, 1 Jun 2017 15:15:07 +0000 From: Anton Nefedov To: Date: Thu, 1 Jun 2017 18:14:27 +0300 Message-ID: <1496330073-51338-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496330073-51338-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1496330073-51338-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR1001CA0005.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:b7::15) To VI1PR0801MB1999.eurprd08.prod.outlook.com (2603:10a6:800:8a::20) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0801MB1999: X-MS-Office365-Filtering-Correlation-Id: 51f6c74d-e2a3-43bf-38e5-08d4a900fd81 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:VI1PR0801MB1999; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 3:r0m0e6eorg0wsj87DoyFU7zmtePLHjcK95G4iCdqi50DL3zY+1FO5nblaWTvyuES4p43AAH9cEBUrOO9I1uoJpEEWwfqUGipeQf3JOxBvBOo2k1nediNzMOZ7E8jXkuDHinZFddTvBCJGojn5eGbArcc9rCNOaUScsjzFardgKZtMvcML83F0aK04n0OLC6ttxJvece75UbFrcnwKAZfqhx3mJHwQTkTDXuneZP4orEKAmj4UNsAgavlETWXURU49awJUxdQADxHDIyya0+R3uURC9MCW/xLDhRfxPOrUdFSM5Lg5rZ3aJQD0XmfOfs8GKqh/RdnhrZXjb/7xor7zw==; 25:UPdLGTensV25iptomL4dfJTM5KtuTyojhMIJDMu7n4ySXVpEKxnaOHexSJfJBw/znQBDJ1LUR+X2KWs5orpu3yZj3KycoS+1w0F0Yk4mSkqRmTEfFEIImxrAexnhDhrJYhYbM5oOEqjHfvMRaVfwhVfyyLXvzXumyMkPoj6SpcvIOvAuaiD25+N4mN1ImfAXoqjb+rfiLK1z0FTG8SOe1lq7nfLkXOW7GoE9KZLyMOw91A/FJkq9ojaAZtQTZZ7my7qRjotZcdZV1iiW3gBMPxXcrPrT28aOATW+hys3yDYV6s4GA2tlP8ya/WQhEwZ/d0NlEMdgxIBPtjdtQAvRydLOVBCsInM3TUrExgyRSbiKSQt+BukhfHqsCdXARxPkjDcpPnEXCsvtd7yEZ6IHUBhVEvuxEQofqj/WVph2yCFGyP3R2Zvfg/gAf1DKr5V+zjPTpaG3Cx0eBarI/9P1f8T1Ek45aQ2lC6fuxeSdvGw= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 31:hEt7GIIbnXNdbZ7lNjSIQ+z6W593xvF5gEnq97oXB1HgAyNYS7whI74uKsckC+Y7OlfFFdDhqqDp1O3NrYjUY28h23wqqJw8g5wF2WlJ7VTwXHvF4MqaB5qr2tNBHeb3HDmba7yTEbbv/VPw5fMA6or23cnD0x71WdxrCjhS+RZBeqZ+/H4yhjqKbFHTPjyegE9HX9sgmDSZcnk9sA8Qaub38b3qUmWkkEJCK4PMz6k=; 20:H/EN2yJorjGfbUc/KwPQOeuvcsAdMHI7i7MgQTFIv60TTW4fEqWHtWzAVd5RJK3n435M7vwElH62JzImVTGJ1suoZsjvcF9QIOHSsIKZg8LGr5+3o7Qk4Vxd4gArEIwFDnDpVRLmaZ2voX6CHnP1lBUy/y97/O9ppXOWP5BqjjIMiGtgHZ3LaLi0DMPjb1z2K3NqMIuPVI+DX4KMUeg75iGuEC2OPYgMjoovhxWqiEBtTCtN3+d3CahlTlyQUFSP6kbyI5LazbG/1zubTltDQ3oUM8w6m72zO1ViXEDrPEqId+TQ+iJUvitsbaZyGuINACZEt1zSsdhXsor7O3ddQRWIGdiD0YHtm5/RJbKb1ONJYYXuqgLjaJvjlG4nn6O4u+dX4coC9ENOhRO3EVDqY4mjfQhZMkyKc5Ain+zD/2I= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123560025)(20161123558100)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0801MB1999; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0801MB1999; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1999; 4:YSXvAkN9QMOAWYeGx8x2P4UhK7MU7rqX+uwfXKOF?= =?us-ascii?Q?IW48zCbMwFsJLLOKVMkk95YmL24OuxBpsE66ry7pjq9V18P0E/bT1iOlc1jZ?= =?us-ascii?Q?H3s48AW46EqZoKluQ9Ft5L5qQXf6BRCfDU9u6HIeldGT6LR1A+3wQp3Gg60x?= =?us-ascii?Q?F40gaVhWg5h4YvcRWXQlIV0eArOyMS/8YpJbg44zx8nMoRSpcvb10Ba6Bw/x?= =?us-ascii?Q?IwNFFnT5/Z+Tl5+5pk2A9C4yKTmgXWbLPYZ3SNfmjIn4nYOoYF8U4q07GKq3?= =?us-ascii?Q?dADhcFioQYJCCKF9NbL6A3+mHqcZQV+8Y/wGsXsRbTvS05P4I+mriP24nYn6?= =?us-ascii?Q?+JOgHAW9RVMPVosK4GwwQHrHS40+tCTtRRUGeqgc0tcPiFV2jxIPlEcgAk7s?= =?us-ascii?Q?VhrWTu9YO24t7pAGvNRbKDvxZWODwVntL0hizK4h9lD8DeM7bihpfq1HDQRG?= =?us-ascii?Q?CJSC/qvcdI09fK13MVd/vItNY5dDEnVhrzQGUpN3JLD0sKIeeuYBYQQK8oEI?= =?us-ascii?Q?5KBmf/HT/XzzyI+qPun6/rBQB0snT5Trs3MK9bLnbwHXHQT1Z4Z7j2+WzsZz?= =?us-ascii?Q?8BGc9L0iN5jGllptCZTunaXqmzAlgMgWLRWNhkUk8ZmEG1ScIHraKwlqvkj0?= =?us-ascii?Q?B3oTwcEMnbj53MgRRRbQoauSd8E1jJtD5M7S5tUcNVZ5KNe5CB3OQ5H4SpMc?= =?us-ascii?Q?yFRG7+9LDCql/x02MQUgDWtdwUeXFQsRUmhfW2AAAW4YIz3+ulPfCjdTpcn1?= =?us-ascii?Q?s6Ou+s4HwuZJtj5c9EaVWwihUK329U71x+CXXczFD4+Boi6swtA6G+WQ9pUg?= =?us-ascii?Q?6FVKu9so7+lTgVrlglBajkyBW+sGPURDpELvn9fBmhAwD4qUhqf+krTR7dq7?= =?us-ascii?Q?P0gTj3IhwykfJDdcdwLH5uzmGvZBG2fu/zMgjAzIWYkvNWLn1sXTJ5HFwjYX?= =?us-ascii?Q?2G2EHxXjUPtaBvlINAmLpdO/uhKvGX+GifMDTBlP5CVDZlbcS282biGAPGuT?= =?us-ascii?Q?MxTdf7sL5ltdrriH274ralyyG2g6aa4Lcv1B8A5N9m6fXu4gPc2za5tLRQ/e?= =?us-ascii?Q?zUgF9UkduMiP5Af4wewwo1uNT8UzUuPjHG6Dk5LBtqCn4I6TZGHLWZxI8QUW?= =?us-ascii?Q?hRfwGNCrwL+lAxFOnZ5il5939VPWwcuU?= X-Forefront-PRVS: 0325F6C77B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39830400002)(39450400003)(39400400002)(6916009)(6666003)(6486002)(7736002)(478600001)(5660300001)(305945005)(54906002)(53936002)(4326008)(53946003)(6512007)(6506006)(2950100002)(110136004)(107886003)(3846002)(50226002)(8676002)(66066001)(42186005)(81166006)(38730400002)(25786009)(6116002)(76176999)(50986999)(47776003)(86362001)(5003940100001)(2906002)(2351001)(36756003)(48376002)(50466002)(33646002)(575784001)(53416004)(189998001)(21314002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0801MB1999; H:xantnef-ws.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0801MB1999; 23:Q1wrL/e20gOAF6jynJYKF9HrThpqFTSFmotqXAx?= =?us-ascii?Q?G/oeg/WpXqxls6x+PvIV11sPADRRVIJMLNojeYThA/xbJR0nHFvcP9UfRQ2E?= =?us-ascii?Q?Yw7k4N/cRhsNlA2zZ2VZIILX8MWEZ9P2wjsFsTcUmYhz1Sjk8Nx/cMkmFKqc?= =?us-ascii?Q?omuKuqNhfV1LIpQVz7lWIiGzt2Karmouex1bY/mRHVtlKLHHiQnTK4tsLXrk?= =?us-ascii?Q?B2bqTkTrDyr7OzfXLfaPJ9bT4LNaQ6hLVvOuLXyMSxrfOC727DlXqbdTKHtJ?= =?us-ascii?Q?ipuS95+DjxsoWvOYp18tK2VhSteq3vH0txI1I7BVzEVXMZ3xWW6kSR5XK7r8?= =?us-ascii?Q?zzxw6tQ26cNll8vZ+J5oQVyp07i8GHUImDdB3Oyl56Mv1wwK9gFs3jUkmzcz?= =?us-ascii?Q?0QXDMMBfnA8RnN5RDcC4ViC4i/x2Wbmzmfm+h8CZ7UgAsvcIgyVtjlHXf3SL?= =?us-ascii?Q?NamTrysbFYQySF1XmaHViuyR6ANHS6VaHv917Rggqpcr3SS9dS/XAIrRbsWc?= =?us-ascii?Q?P5d6UB5reOjA5MxnCqk1crIRcjbpy+G98XOvKwTesPFfXwQRsB83uVuZmB0i?= =?us-ascii?Q?RFRT6hw1llZ4TzybirENekkijpg8JO5PqnLZjkcJj62IlBn+E6rs1kdXjDsY?= =?us-ascii?Q?k2N33Yz4P/gRN/sLBTEnWU0Ibeuw1Ea/xy8m5VbDOT6C0cwdSEoNecFPvRL4?= =?us-ascii?Q?U/oAFjCamUOrBIPx2l66tCGzJHHfqTOlLZmz3GysS0Db+QDidzOdWgg1Upnp?= =?us-ascii?Q?w9PIAkzWzKTYylurfm8yxWIofpiUz2OPVrszFM06idOsLuCHOERWEyqBHH93?= =?us-ascii?Q?gfnLzxwFYfkHvz+JpsmDVXRWp6QzHHgouRQDNzEA0QXcHejVfAHQtyDDgnVK?= =?us-ascii?Q?GAFGaW9GRuT21hGfb7SkdTcaysHOt3PJkqYkX1y6H80F44NfurqlzyKTDHRo?= =?us-ascii?Q?4ZFovVMC7KvnVBZ4j36KNXuKYyrDi44zvnafiG4uxPffKHtN/LebXBi99QCD?= =?us-ascii?Q?HcMKy7ybLMi6df6bpxJcRhXirzEP0FgrIj+tAycdAetHo5kVWxs8Px3uNxdT?= =?us-ascii?Q?vrJWf+4j0c73MEacv5bOzcf7QTROtQnr3RQUMTrwsi5+9IEQZ67mgokM/xDH?= =?us-ascii?Q?sWI39D9dSv4U=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 6:gMoamHSudDUB/BGuQmxLwqDZZXZ7fF/yvJAzw8KJfI3TgtC3E2kCTy22ABv6le7OBTWuDHqWeczb5cKo5YQTWhb0PxFwWlwxPM24QlQw7gw1NmMQeCxKLv/364aXJAVLgut0gKlhnIB6bjwYzEIZNThxwhtzrZ2BMgen264cD5D9N70XBoQnIjwfq8kwgRwB6NNj09t2ESE6upg99J0dotBNiwjGAKlME/cs3oIweP3Htkgw4vmB+yM/AmhFPa/W2r40RMCQrvWjQ5YeCwsyGV8X4SJZ/qbBXvVq1i8GUM2KbeCICVewo6vIdriz9cdtw+LMxVtVbRGdAnQjuq7A1jOPHqJ2KBfHBL85vmzaODLmfy9LdGnNzPH3xYT2mPCHlqJfxbLXDxsBEg38oLwBArPsG78hO6WQYq1eTFVTxnQvxGHzGZdRsq+46XRSkRteiI8qQXYAWZ/eNYeUpX+5el0T5NRgji3v+trHn331euGirovAK1hVF6swNkGl/EyZbzol2XLTaHkTCq9Cp3of0g== X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 5:t+/1s40EcffWgFCZKKMAWT6fJcWjALOERRzK6GuMKPBZ6mGvF4QPud4lVAgVTZB8lgHh9aA9y1CBOu30nE+vcdmRZ5lq666APhFVab6gwLisUPXPsp6NnYWc+GEpv7VBHg7MwyNVNf/7MnGxNI5T85kJnFZKG9g57ttmBES9rEZcF86Gcw2JiuvfH8MuNjDDLI0gjkqY2bG+FUXK4VpFJd7idzG0i5ObJIlmggasCQ8OsRlswblkdMxCyPhc8WI+1S1300Wv26vB1LT7TniEqLMRVzMF77P0fG9qRagF1rpj0YRthceGv9ENeckYXvX8Yxin+qhPcRaqSgJjHoZUvsL3j6Yw3g0dFOT0TWTNeYGLQWXOkJpGo2BVUoUfS+gLC3adc33Jyp8Ss7Iqei0rnhpv9zDpEtbXvomDc9UduCCSjndhwQiR6Wz3+CPL97ziERyphdohx96CDn1+wJ2KWmJDceY6WeLHnZoTE/R2f87jfjWqn9BpJWO5BSz3DRL9; 24:dc4yQkaAVvrF7DFUBZc3N51gI+zSepAr+1CaQfPXpPpoY6nF0xlO9MZnvqQYJubM0I5IiEaBq04tCLpl0KB/xTLQGOB23dfDv4UvL5KQ6Pw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0801MB1999; 7:1u/6RAElE4iALDgGbEv+fbh1DnHuPPiIjyEQPyfdT/NiBbbR/39lGItv0O8wR2vj5v+n51EZanpgv8yqjMBP4+rmpli3lhf2+/v4YB+DpylVft5WUrI5mREWzlndVHNzOwziPYnmK9mlGmBj4TMZP/UEsaxHQPqPcjXdYUwqOxZ4BC6E3D9aI7GnynNbZTFaW64v0ltuwUUlMjYVibdFM75H7QsCi3CG+X5pHp8Bl07SAcNW0+1CYHxy9c1/h9DtC3HLPzrbEd/Qx9i/Zw7dUwXQSdp2iDbZiQL8YXS+wvaUzo1LgTbEDJGQORAnkTWADi+zM5TeqZA7PrpfiG9wCA==; 20:PFf/IoLDiXLe+XFDdaoT0W4yUNgzhMPC7lA0M2BkDIeZ4dfpgWQb025iL4bOf7c56DiPOaqg7iMHxRYuJlQXjih9SAiky3FTJP6fQg1HoTuOfXgH7D//jTk9+dUYApENr0D8nVGCivFHym2O93K3xvJdOv1pNS5o/rFjT+pl4iI= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2017 15:15:07.4437 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0801MB1999 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.136 Subject: [Qemu-devel] [PATCH v2 09/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 , den@virtuozzo.com, Pavel Butsykin , mreitz@redhat.com, "Denis V . Lunev" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Pavel Butsykin Preallocating memory in the image may remain unused after the fall, for the qcow2_check adds the ability to identify and fix it, so as not to store extra memory on the host. Signed-off-by: Pavel Butsykin Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2.c | 31 +++++++++++ tests/qemu-iotests/026.out | 104 ++++++++++++++++++++++++++++--------- tests/qemu-iotests/026.out.nocache | 104 ++++++++++++++++++++++++++++--------- 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, 225 insertions(+), 56 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 33e5455..809102a 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -322,6 +322,32 @@ 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, 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) { @@ -330,6 +356,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..e8cf348 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 @@ -181,7 +187,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l2_alloc_write; 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: l2_alloc_write; errno: 5; imm: off; once: on; write -b @@ -207,7 +216,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l2_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 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: l2_alloc_write; errno: 28; imm: off; once: on; write -b @@ -468,20 +480,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 +508,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 +546,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 +574,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 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 @@ -569,27 +610,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 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_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 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 @@ -597,8 +646,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 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. === L1 growth tests === @@ -651,7 +701,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 +718,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..820ce0f 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 @@ -189,7 +195,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l2_alloc_write; 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: l2_alloc_write; errno: 5; imm: off; once: on; write -b @@ -215,7 +224,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 Event: l2_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 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: l2_alloc_write; errno: 28; imm: off; once: on; write -b @@ -476,20 +488,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 +516,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 +554,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 +582,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 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 @@ -577,27 +618,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 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_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 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 @@ -605,8 +654,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 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. === L1 growth tests === @@ -659,7 +709,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 +726,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 d057aa1..3d4e5b3 100644 --- a/tests/qemu-iotests/060.out +++ b/tests/qemu-iotests/060.out @@ -77,20 +77,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 a431b7f..69fb929 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 ===