From patchwork Tue Aug 1 14:19:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9874743 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 A7BCA60361 for ; Tue, 1 Aug 2017 14:21:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 997062864F for ; Tue, 1 Aug 2017 14:21:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E2FA286DE; Tue, 1 Aug 2017 14:21:14 +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 B9825286AC for ; Tue, 1 Aug 2017 14:21:13 +0000 (UTC) Received: from localhost ([::1]:42842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY2q-0000eQ-TI for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Aug 2017 10:21:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY1I-0000P0-03 for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcY1G-0002T5-Sc for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:35 -0400 Received: from mail-he1eur01on0108.outbound.protection.outlook.com ([104.47.0.108]:54560 helo=EUR01-HE1-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 1dcY1G-0002MM-K3; Tue, 01 Aug 2017 10:19:34 -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=nUZ2LZGT6+Bfa5Y9UrLtuFLfRMYrQzWa8JfN0S+FeoQ=; b=GSKNPr/zF52K/EbRIrxUGSqQuVMa5sYgHg0zyq6HIAZ3/6GQxzKyULMKJ7SdoIhyCg941+s6MuAGfqiNHLipu1sajGtFyp9Ktk8hge6pJwz4fhke3ZAfgErmHpkFjd5B7EXPZJHS1B/dw9Kvf+Ne54S9DRrSWXhPrnBAog7MEzA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Tue, 1 Aug 2017 14:19:32 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 1 Aug 2017 17:19:06 +0300 Message-Id: <1501597152-25342-10-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501597152-25342-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1501597152-25342-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0202CA0002.eurprd02.prod.outlook.com (2603:10a6:3:8c::12) To HE1PR0801MB1996.eurprd08.prod.outlook.com (2603:10a6:3:50::9) X-MS-Office365-Filtering-Correlation-Id: 0816ec45-cf06-4457-dc9e-08d4d8e85470 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 3:fB7cEs4bWdPlnYay3IIdgmqYAR7yyjC00sNqELF77uQjz4FCJ9Xn6N25M5oBtoakCek9BqvwHzHHiweL/xG9qqLZj/QTbnFat7fm/gxYI6B/75CtrHwTmtjc3CaVE83oeZZ108WgSLJER7gjPwS8BqwSb5UG+XhKdQz+2rD7p4qZlmNTtEiFmls3FLg5PQDiicugfQYctHfFKDe8VW3GNyXpPc1CiS8vmdXwLcORygZo79+4+oVt8XSs8q9lOvBFe9r++LymRHYanN9aMYLJkL1MhNeJqsgYvmIiLvirH2kHacJrZ7H0W+LFpP/cXJjdGEwxgYjavKdf2MIUJ4RIjsGyAayPTi5wfV1KdeBxNrBtHL5j7G8CdBcX9Q/yYNN/9r9YKUKTXXZp0nKTaFd9cTtsEmBE4YUhJLiOmR+XhC1QVlvEZebmOlHJaOTNJNlhP1g2l9/NYQPHaAhHh1exfYAKchswEuAKvdDX3JsEjoHQpcwyVGoyNpKDV/zXvWLIdNLyJwH84KoK+04//c4aSHSvbRMgBhe3ePYt5nqoKIgUwIkIRH+p04Wnw6Lbxu7LYvmpEcrEfWpxkkn6hyoClpqyoAwk6hH+iMRdcQ9UuyxH9rqHlov3xiBEqFhhvaW46Pinf0H+xcX4FHC8pW3ggoNnI+rpnuHdHRpBNpwUUDULnx5YQEV5gPPVVxduVri4h0R6uZMNBoel+WdxjhVfB+kTNPO3SF5g/ny23H17860SLnnIbPC5LSTO0XAnYOozqGvDGdIyZRSuKtB8sYnvcubG1OyVsiYvUoer/EvYG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FWF3fk+3uVv0Fyjpdulr0VmfQFCNta9z64pcw9yDvR+2nqIQQkDyolTmTujxxfRjoIvG164KuZXK0Oexhz2/M6oHMcpYEcMtfyf9dCBt4DgOyDSc= 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)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0801MB1996; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0801MB1996; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 4:MV67/IRRhnFRwzAPH3L7YszVIGrepll4W+1G5BmF?= =?us-ascii?Q?6fTYkoaNXvJ3+760UHylHyUaA8P+/gIMacoBAP48163HiPuzZpaKTu26mHoM?= =?us-ascii?Q?KR+bW3+gTMX56ELaQetrmk1eil5YXwvR++or71roUUbFyfz1yqCTKNN4t9do?= =?us-ascii?Q?PutQq1Fy0Xmrabh6Hn2JOWa/mcqBinVHa2G3EYKReowkE0mC/Lj0WC3NDoGX?= =?us-ascii?Q?8Vt+v0Uxw1Sv5XLURpeMWdzNpxGkLDvkdNUMpKRn9Db5dZqd+x4TAjDdYtGh?= =?us-ascii?Q?NPIURZo+2E3ge9aNRMHEvrzesoU7t38QZBFY77wsQErxpzRgrcaZCYI1XXZ8?= =?us-ascii?Q?YYR7iyXPglNuzi52GhWxl2JCGav5odET2qoh9kWHqYDAp3yj5I5VkzxvIMCQ?= =?us-ascii?Q?77tuSQz1ar4/ak39rDObBTPCwrTxPeMPWQOh1lgG+8gUr6g99slAcO6yvsH6?= =?us-ascii?Q?XDlA3Yovm5y3StcRRchzCbuOZQuNEQRGvYbU0eCGEZ226Qe6fEd9oTaJ1UU8?= =?us-ascii?Q?d7NXnBVaZOGeAkWZsMyUqvMnzvGCAZW96eBEvOGIgC2mFRUCWOGyfcY3UJ7o?= =?us-ascii?Q?jmwRoOx+8u6qSDUQMy3uGjLeD4pWrczpk574DR9bM89bTQxbLw2+lcBc+/rW?= =?us-ascii?Q?Zyx8azIrycOCaiSCRMf6SIUTd9icCx3PRP74Q6iwQ8D0yQWrmWFIlmPmK2ad?= =?us-ascii?Q?oMTfdSZTh68bFQh50OwOjWajEo4Rn3UM3/PZUCjHmim7NPzlvheytGcw0cfL?= =?us-ascii?Q?9vlRNGd4sZoTO1uzsg/mlXnDEVrZzUUkXM0Vw9vg76DuNdgL7jb01sm2sqdP?= =?us-ascii?Q?/YGNiLf4C+QQNy8QxYIfzsyNWiCzSchXZ/JaJ/BU3gT7Of+jd0n8f2yV2/FM?= =?us-ascii?Q?bgNLTdoWuo3LhA3N4VYsz0PGibkCwAXK9ErNyPX6icdXuHsTscUDtaQOLpaj?= =?us-ascii?Q?2d5Kv8E8+mHl7SDrh4PBJkb8J90wlZi4iV9V8e++mHj3nvgBkhkBdF39EfQL?= =?us-ascii?Q?L54QCsRDXrq+fW9rr+RXZ5ckg6gpqpcUCFbn6M5MaaFW0qL17QNCrMo2Ztd2?= =?us-ascii?Q?Qr+AyaE9RoZMbl/e2j8DLWDfll8/3WlFpS/Rmk4mJv7KcPzQDp9xUQCOxbfj?= =?us-ascii?Q?jmx9cEEdyEBPt6lWlw0/vLYZVydx1/DL?= X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(7370300001)(6009001)(39840400002)(39450400003)(39400400002)(39410400002)(189002)(199003)(81166006)(53416004)(42186005)(7350300001)(2351001)(106356001)(2361001)(105586002)(33646002)(25786009)(50466002)(7736002)(38730400002)(189998001)(305945005)(97736004)(48376002)(6512007)(107886003)(53936002)(54906002)(575784001)(86362001)(5003940100001)(110136004)(66066001)(6666003)(6486002)(2950100002)(6916009)(50986999)(76176999)(4326008)(68736007)(478600001)(101416001)(8676002)(6506006)(81156014)(2906002)(36756003)(5660300001)(3846002)(6116002)(50226002)(47776003)(69596002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1996; 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; HE1PR0801MB1996; 23:b0p9rPM8MS+szZ3Uip3bd1YjX9RkVdhYOTve8q4?= =?us-ascii?Q?bjPuulfjirlYK2QV+Pevc+qBg3cfdp4xjzcjjC7yyGcz5XyYAQPrg2hL8F4W?= =?us-ascii?Q?GGKhuCsaZm3MNhBIhWMOibqUXBJf31mU6KC+0rvFTko7qDtdWuUXfDAPbSdx?= =?us-ascii?Q?XANpknzPc/dRXzvC5qz0SQJqW5beZofGLztPDX4z6sQ1YRHAAn7JgkHTT1qK?= =?us-ascii?Q?grldcAYHkDnmeEjIxavJA7jl+8IbY/tbomoeXnigIdR4sv1uaqOtvruf3qw7?= =?us-ascii?Q?5YAhZ7e66YoBLZgzssHPbcVQOr5Z6vg0EZcpF2gP+dFUnS31GVKRN7OdEwfM?= =?us-ascii?Q?/n1OwkCrmZKzpHjttkFdZohwBGNRtzELZhnPoghCVYeRZHlAf3F6bPBRDIJd?= =?us-ascii?Q?iPoITJH6DP3DSOzOFRflQTXz+fRPMXDuD2lLHsxfML8YcvcrDeDBHBqHaOs2?= =?us-ascii?Q?W031a8MVBLekR6NKvkaebXP7iwCdknVoz79bs29KBYMNrE4hiYI9OxlX4oZY?= =?us-ascii?Q?WFZGlvNGxQ79nl3JZLgmNA1jwmBj/G4zgsLiWetQRy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q?j8t4xsrCk2Eo2xtkKwiYGmhEMT6gqn8U59zgA0FO2vUB1oQ9IFtPTnuk/AZg?= =?us-ascii?Q?0ECYPivoDLen9bxSha4oGiLkDAxZsvmvyJ9gdlKUYy82KQnLnhAm7Mkx8RjR?= =?us-ascii?Q?lZA=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 5:ff911ogDuSGS6M5uAc5VZkixtJUu1H2M5RbAucFkZL6rcOyCvc4oVV7gOwNR4hmAih+yelEQcH0n6Oy0vYnSwCCR4mqNpmmNL3t+8NQXQD9KWVNiAjvTwGZxanTYsPoSUbDjvhQxevqneOFTFpgZOEztr9oMRq6KGZZemntsV6otyPGMvWwSrAot/f6GJYiR3kipkReRZglBTlF379ymT14U3VrtSG7s5FDDDSBNNUyL5mmKPuKCMKDiu0lois0xjqpr0jSxkQiUO8QXyHIf8z92BeM/gIdHNrJQkBt2bpb1FgxtYiWaUEKNYu1NwIft6FH0yzvqSX+PpbJefqyCtk4+ixyeLbrT6YulncSkNjP38tKSWKPh7/Fv4VaxhFfXpWFOifak6MzULJPQv70rrE0fbDPW+2JkTQaXeKFHKFrPVMS81jmNqHiCWiYtFfddm3dI8Jgr9mkBMPubuTM2oTHpWG7re9t7l50/2neVhsOJ78fwxWUjoG+3HSB3rpww; 24:gYJQGsrchTLNmpf8ojOzR5i/qmspv3HrUfh7pdFvm5PpNpThudC4qdoYunssRedGqdmONKkmP+XmRIG7OYt/4s47ue/C9vnlLgPuzgq9ots= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 7:rkkNoJ4KSFKsAnWEwUqp2AQrnutDCh0Swbk04+6O5yI8uvgXzD4LAkC5PfhbiXObj+nogBPoBBI13dAeQuXaGk9N+Ail5wAYy1e+G/RH7oMRMnMe/RhzWxp6Uid5I1DVYNAfv+VKCeAWv9CrDYYoHRgGlYfp+9Ynlb7EkxhrD7V04dIFoo33Nc2B38H5Ue35/Iq8KO1COI0Tvn5NjR+6dBEl8fECtYZU/qIzFxPSoKGq4KcyKWJYHFs0ZweWMXgn4ASzH572a5azPPlsrvJENcbbbZ2iJtoNPllEAsWxUEygnqFTnH7JH4X+46YFB3kXdp4TKMKq+8RCxEkRdXRR4YwzHbdAjUlhegrYeRro6cuOEB8u+hxzQap/UZhgcq0SJzY77RSMWwaJ6OntW0+IvP8xn8RkVl9zO6oUNXz6pLH+K7TpNt6fKRBBPNaORFwOHhvJc5SK2Dgr4NOboAyY7y3ixMmqA13vbYSkabPxsKbSFEbs0YvV3rSwqHjHQ7N8cWDLrkHAaBGiBMs4YVd/eYGa1CxECKVVpPVCfttiYkWpDV+RAVgLnehC3wDYnG37dSOjkARhqEVarZYKyIQNS6oh6fZ9ouxCL8kcwf75pX89u5KvlAcBv19/2HKHHUIX2Mfh6I/g+JsDVQz8qUNyX68aaQtyhY0SR3tqPYpogu34+vAvpa26rZd+Ap4vAxQzgFaPcS2SxKpnS59nDIxMjIslSgepcKPBWYTMAV8s9uS8xUsBhZ1OPzvFcB5bcNduyoPfCpkmlBYeSJZCpx/a7TMBtVMUh83/veQNEoNmbBg= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:uBAgtTOdOmIBkkv5ICMTHLsXoIWUsjjD6hiZsYf3Q+U9OwmmOEDdPFqronl6K74o8CVgEpzHmjAJ/ou0TmX8az0LPOtAKyY0T3FH0O9JupEFPahc9lmS2k5sU00ObjtAWKXanuHPnHT+ST6jAd7cvSpeVRWwYcx97XxfylNFXjA= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2017 14:19:32.1464 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1996 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.0.108 Subject: [Qemu-devel] [PATCH v4 09/15] qcow2: truncate preallocated space 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, qemu-block@nongnu.org, 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: "Denis V. Lunev" This could be done after calculation of the end of data and metadata in the qcow2 image. Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2.h | 3 +++ block/qcow2-cluster.c | 9 +++++++++ block/qcow2-refcount.c | 7 +++++++ block/qcow2.c | 7 +++++++ 4 files changed, 26 insertions(+) diff --git a/block/qcow2.h b/block/qcow2.h index ebbb9cf..595ed9c 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -330,6 +330,7 @@ typedef struct BDRVQcow2State { char *image_backing_format; uint64_t prealloc_size; + uint64_t data_end; } BDRVQcow2State; typedef struct Qcow2COWRegion { @@ -669,4 +670,6 @@ void qcow2_remove_persistent_dirty_bitmap(BlockDriverState *bs, const char *name, Error **errp); +void qcow2_update_data_end(BlockDriverState *bs, uint64_t off); + #endif diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 0185986..75baaf4 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -2014,3 +2014,12 @@ fail: g_free(l1_table); return ret; } + +void qcow2_update_data_end(BlockDriverState *bs, uint64_t off) +{ + BDRVQcow2State *s = bs->opaque; + + if (s->data_end < off) { + s->data_end = off; + } +} diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index c9b0dcb..d741a92 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -833,6 +833,9 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, ret = alloc_refcount_block(bs, cluster_index, &refcount_block); if (ret < 0) { goto fail; + } else { + qcow2_update_data_end(bs, s->refcount_table_offset + + s->refcount_table_size * sizeof(uint64_t)); } } old_table_index = table_index; @@ -954,6 +957,8 @@ retry: s->free_cluster_index - 1 > (INT64_MAX >> s->cluster_bits)) { return -EFBIG; + } else { + qcow2_update_data_end(bs, s->free_cluster_index << s->cluster_bits); } #ifdef DEBUG_ALLOC2 @@ -1018,6 +1023,8 @@ int64_t qcow2_alloc_clusters_at(BlockDriverState *bs, uint64_t offset, if (ret < 0) { return ret; + } else { + qcow2_update_data_end(bs, offset + (nb_clusters << s->cluster_bits)); } return i; diff --git a/block/qcow2.c b/block/qcow2.c index 2a1d2f2..4696106 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1498,6 +1498,8 @@ static int qcow2_do_open(BlockDriverState *bs, QDict *options, int flags, } } + s->data_end = bdrv_getlength(bs->file->bs); + #ifdef DEBUG_ALLOC { BdrvCheckResult result = {0}; @@ -2138,6 +2140,11 @@ static int qcow2_inactivate(BlockDriverState *bs) if (result == 0) { qcow2_mark_clean(bs); + + /* truncate preallocated space */ + if (!bs->read_only && s->data_end < bdrv_getlength(bs->file->bs)) { + bdrv_truncate(bs->file, s->data_end, PREALLOC_MODE_OFF, NULL); + } s->flags |= BDRV_O_INACTIVE; }