From patchwork Mon Jul 31 16:22:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9872437 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 A7B4E602F0 for ; Mon, 31 Jul 2017 16:28:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91DEC28068 for ; Mon, 31 Jul 2017 16:28:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85B532810E; Mon, 31 Jul 2017 16:28:00 +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 9D1E828068 for ; Mon, 31 Jul 2017 16:27:59 +0000 (UTC) Received: from localhost ([::1]:60532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDXy-0008Hl-SF for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 12:27:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDSq-0004uE-Ix for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcDSo-0005V5-Nf for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:40 -0400 Received: from mail-eopbgr10091.outbound.protection.outlook.com ([40.107.1.91]:58624 helo=EUR02-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 1dcDSo-0005RO-E0; Mon, 31 Jul 2017 12:22:38 -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=GVgeGU7nwtxR3dYvIPYw2VhgPQkn+Pi4if1OguAFkwg=; b=Du00aFmR0zSzTlouyC2Od7FJ9KlleOsCFTSEq396EoX8q0cetEXG7R4MTCJSpIZ6DVTfVAijUaGRkKzncnUgNLIyryQzWxvbk2g5FL8qS+J8puyqaI4OpcL9f4YESp1pJGTabVuCr++8EcGSfFdwbXLmnPhbjdsZGzOyvO07HOE= 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.1.1304.22; Mon, 31 Jul 2017 16:22:34 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 31 Jul 2017 19:22:02 +0300 Message-Id: <1501518125-29851-11-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501518125-29851-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1501518125-29851-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: VI1PR08CA0217.eurprd08.prod.outlook.com (2603:10a6:802:15::26) To AM5PR0801MB1987.eurprd08.prod.outlook.com (2603:10a6:203:4b::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29eef5d2-6402-4fde-879b-08d4d8305a8f 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:AM5PR0801MB1987; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 3:NTtMRoF6y7wNavcqrUKCB1mLGXTTdh/0R3rKTfZaDUApA9MaN9OqdnboTdKMfCT7jVX+Do8qMZU4YAJWjRqOG2REfQvcquPwAxHKFGtEpV+QFZoNO6XsLX1j5tOXUUTwj3bF/i0hNZooIhfndiIlItLxY4o/9lnC7j9UapK2fLrY71SFecDQtWTnXrbw1T9duaf+lmZtrn4qpaaSeNdH5hulRCImuTuJs7v6Fe3rlslYzXYop+w8y9+zwAoqtu4f6c6cYr1XshDOoF/8nE1BpZJ8pp66lFcTZUUH8f6V71TnFPqgeq4hgh07mghJDQ0fr+VWSkeAul8hZ/xTch+fjndxCipGQHMEP56NMc19fa9/1GG1rdirObTieeHVhdh//U4Ns0RQs8meBhCH1PbFIt2jEOnO2doLPGX4G1OUXATQdncIlrudtYyRgTAK6y4KTYnFHALuH5Bw+gEAoF+ggT45Dpfx1W+bE4PljwyNHb5iM+xk/bGcaAytvtJIYqZa5ZiM2ZPwTT24jN5bGiVEwbV9+XifaPvwsYxVjOQEsxI62eL1TEMa27/p98rViaF9t/CgFF8SSKNU+jofQy2KMZC12TfhGy7AS7ifTUO6Sg7OOLnyMyRFjNgyLbxoJSZ8h+yzFl0+4NWVrbtxQm6rn+Ym8ErDi9Wtxg+iGjAV0joAStoz368GN4KUJ3Gv6EnEzIFwcapE//iPquXiG3AdSf45KFTOtkD1QDd/f89ZZpgeINmUAL/ZmOlJB/S6muTtBJ6j2yspzSxwOA2/+vN4ucQh7ErOp1WsQCa0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C1VkSq/0DSY/2Xrr6FBBGseHEvVjgrId4xtsYt7LW8s24Htie3SXeNbr7tHb0yyLhzZuhY/J/Hr6OIY= 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)(8121501046)(5005006)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123558100)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(6072148)(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-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1987; 4:RuHZkDqd0lAsZwjQBxnnCz2O8lSaFzYADpKJK3WT?= =?us-ascii?Q?+4DIBnW+QoOhu3Zr7zqlciceUKHL6BEuAGGl/14csvlzh+7f7SSHi7M1YJCO?= =?us-ascii?Q?Ujyo6dpNDyBesacfi4v6HQI1W3xMQJzto/09IXgtw/NryEcDpWXgTzPgorUt?= =?us-ascii?Q?crGAI/f+tbiE73Szewatb0MxWZpUzt+EpLTUDQj4jP83//9OAVRcQ5WhxI8r?= =?us-ascii?Q?fDAK/YS0IJ+mvNcyjPPdDGr46MOZlONz5I4ghz1u7aNtBIQt0wojwKfvWKvw?= =?us-ascii?Q?r2A0h9XtPuA1THtboeu8K6bLJe8VKIZnU1QtwRNgN3qt/ByQiWVK/cKnzhzR?= =?us-ascii?Q?S8zwjwFRS/RVBOaHeWP1YiL1IEpvgLFo8a5skfzAZz+BbpEgtUDeaZvJJqEx?= =?us-ascii?Q?+t04ksQ4ClFsPaeU6joyXI6Tf7WE7axxwc3jrf9pvv5ZLYU2uPSvg/+CJbjQ?= =?us-ascii?Q?oaHHCSRTu8Y2W74622CTxmDGALnl3U7nGw+xjN+lfwNTrQfELME317KBk2A0?= =?us-ascii?Q?i3aDnt6eT/g2TLEGwHF0/SYXkQm4yrTPvb5NfQrdLUN795rTAHUNk6baNwvt?= =?us-ascii?Q?CwmcV3qhf3LZ9fbRHchYDfsPoP1bIMqUif+SpqcS/mLwyGQllPOjErUSXDG3?= =?us-ascii?Q?/Sbk6KORWiswj82yzi1r/1CosSP3yhrBp+hHuxBQZnacuOAFPu+9RP5LNL9o?= =?us-ascii?Q?4ZCc2WCgoNv42eS5WjUGOPqzOumr4s4E+7Xk2ySUKke23jo2vO+L1LMbQUFw?= =?us-ascii?Q?MK7XeHIoEjwe8zx7XcAlPihp2GcjGCXbpV6XfoJFyZu7VH/PLMwKoopiGrWz?= =?us-ascii?Q?odMiuKosG0L7IFyNSn0moPidcY9hhoT3psnV3hj1Cw4e1oMxD57ZoOMkHVu1?= =?us-ascii?Q?0LZFBXyUHVx6olib8AJZ77dKScKI6kQrkthHgz44Dm3Vr2DXfiWDiqKIW7XR?= =?us-ascii?Q?9+/QNF/OkWi29/Xvkpwbbz0uqcoXwyMuMnlTCLCjhJGHJnmXdz5Ki2jMuN9M?= =?us-ascii?Q?Ji2tlZtAL4tOX3SVUy4FHVeOB7i+wD+9NuAfenHBNG2hOVQOc8vnFUFBULKI?= =?us-ascii?Q?vNwm8wGI8dMlOTKZklENVXKRaTrkVihH5jKbjnjSnd1UMiv2FNjb1/QN3fvh?= =?us-ascii?Q?yu8Kr3mZexxuWLPRVrOR1F914B0OkjwI?= X-Forefront-PRVS: 03853D523D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(7370300001)(4630300001)(6009001)(39400400002)(39410400002)(39840400002)(39450400003)(199003)(189002)(5003940100001)(66066001)(47776003)(81166006)(53936002)(48376002)(101416001)(81156014)(50466002)(6506006)(36756003)(8676002)(305945005)(2950100002)(69596002)(189998001)(6486002)(4326008)(7350300001)(6666003)(2906002)(97736004)(50226002)(107886003)(110136004)(38730400002)(105586002)(25786009)(106356001)(53416004)(478600001)(6916009)(68736007)(2351001)(42186005)(2361001)(86362001)(7736002)(33646002)(76176999)(50986999)(3846002)(6116002)(5660300001)(6512007); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1987; H:xantnef-ws.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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:6lxi6EtdSGlrlMWc+Cv/iAdMgv3QHdBsVTSBUeT?= =?us-ascii?Q?8F1VU16JbmKYRRN5mAxtTzs1+vLzD+fmnYj8/TCiJdtsJBNfb9tg+1yce0CL?= =?us-ascii?Q?3OBOEYQG2F5+8bZ/xWzRpaanLB8cSE8oR0pbbO+g5fCNa7HJdEC6vJZv+H7l?= =?us-ascii?Q?hpxg4Fr8CSEjLl+N5RRnjjxQddnm/ZO0TdvVflbl46ueFAtsVxbMFKC/N8Yx?= =?us-ascii?Q?ZlRhvcnebeaGPXUOV31bfIypzwTQiyZgLoQxMIenM/6UqNnEJz6/xwGNNf30?= =?us-ascii?Q?RPFg/0EvGcwj1glnp5FykO04a/FOxeINA/aU3NrKa9bbXg5+WSIaZYk6q52A?= =?us-ascii?Q?9F+quWrz69IkNzJkOwp3AcXKD8PxHt5UD6xOE1J8N0iqlo1d7wffO+AGVMWb?= =?us-ascii?Q?qzdSHHx0EX03jkiEdDpdHHra7DBjUZJpShUHocKIF90WoSMxeAq94DBeRv+i?= =?us-ascii?Q?HAy24lm430j2L7XFiGONVMv+XdIdbAdDfOY8XFrO3XxpumiSTTp+q4TW2fUP?= =?us-ascii?Q?Sy+iKmNC934LTKl7HdpurrWy1tyWZuWewEu9d9UJ5c7fYkrcYzTPNIu7KJZO?= =?us-ascii?Q?6Wc2k+XtzJihay2w5/Yf2WKFwAjKZr4KwLrFHX+QwjrriLt9eDOm83Tbtn9U?= =?us-ascii?Q?YNybbkHs2ZM0CDOURCo0BG8+jMY3cu4WT10XPZFMW0njgOIKPbBkqBoEbeSi?= =?us-ascii?Q?HPpu++Ybx9kyCMnlpDFntVlEr4uORvvJyZTb7IYXkGmo+GMHoXCphY3RjKeM?= =?us-ascii?Q?7NeleTASfqfH2H/70toPy7j62z/oRaWPMc1MPvO1UQHxPuhDKnIexi/toGop?= =?us-ascii?Q?UDR5EEYujfTaKGicKgl/FuymXyHubCpM5ssIB4M7W1bzX/t0gJsmT9L3vJVK?= =?us-ascii?Q?vmeJqrANz1sKwpH7ZWAD04QcNF4TLJYIcmRBQuqBm5hM0D7PSBLQuneSk4ZY?= =?us-ascii?Q?qUrcYyERXohGzOXLBisBAU7R4lz9kQxYXrNr3Wdl0o0F87kcBPzFnFbdB1nf?= =?us-ascii?Q?hgXMcGXyifWIou2JldGQ4DaSKFE2KNOCfVzaOxznxOVvkK/LSGNChmgXr6nz?= =?us-ascii?Q?FGazPEP8BXlhc3p7ZNbL3RV969JgLNzFxnQEFFa0g6BUdopYJFZnd2vN/2Od?= =?us-ascii?Q?yMOqKP2iuWp8uy0m8AwB/Xvjfg/3slZhQRdHTfFTjvHvotkDnA0OK5JtjSkI?= =?us-ascii?Q?EXBhw7cUeqXpy4nVwkx0bkdejI1A3TNNxlnNrzh9du2g9yQzbFhrY0sF1UKc?= =?us-ascii?Q?IgoNIahaYYdVQhbMM+GRASVhJPtmaWz+czaKKP1nsYfEYLit7FqV+B7Fgxec?= =?us-ascii?Q?z3bcEHSa5EGi13mtckceh7vk=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1987; 6:sjk0JVML4URDZYPtvWbKcBMMI37fq5N1yyapzQuW?= =?us-ascii?Q?VRzhDkTqTeQILCZxJA87WzJ80PlCb6pJesGeFvpFdbE3ve3vX9rSarKlJihd?= =?us-ascii?Q?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6RTTrFhzPoFtZFRHUHhfJhCIaAxXmwBju2H+DPFfOGBgO6XcLjAjpGyO+P3plN+INm/AoKDkZK3nlTvuC/OFEBr4c1dp62ZOS1Fo+3WIDy5ZTkmcJLPvIr6K5xtSFL/NZ6xB+QH95YwYhcwl4hKv0l3vEm2UCht0W3qLP/oWdXNqr9r8oZoj7gSNTZH4TYk4a2J3+O5HMCy/p1hUDtQb4Ss6W3KqJWwIm4VZaX2wg6HzjCTgTNxDAlY/5XdSGjxdpjEzjDrivLQ4x5LHS9DdfeC73S6gX96REVJ2FcYi+QN9BNjU4ke3v9ffy+7MO9Zm6Mj0z9lf1lECOcoOU4cniaT50EfPj0yA35KztG15MwB22AFFCrQ8dUToaZPGew5AOaaS7hP6N29lemiN2yrHquaZbZaVQlfISx4NmoYYd+RNsgPuIKMisEXUliDWfuGgoQbdo0Dnz36j/F9QpzFzY62KkCBuSteV5ZRZiBuX7kZYUtuoGsYmwh6smtuJihteNS5/rfd4ihE= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:AxqfEyxKWEPQjfiL/qNpgJVbtHDcHHq0M9ZKA7AGfBBUH0Fcdvc+wRHCo8G5alIWKu9UhsLLC3lLo031VUrkkfQn6Wyq7P3t/pvPGXY8R32NK0ej/F+MC5WiKdAC1KXN6L53PuE2lljo2dcxndC/P36EAg/+Vo0wGzHr/JlP9Y8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 16:22:34.8124 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1987 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.1.91 Subject: [Qemu-devel] [PATCH v3 10/13] qcow2: skip writing zero buffers to empty COW areas 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 Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP It can be detected that 1. COW alignment of a write request is zeroes 2. Respective areas on the underlying BDS already read as zeroes after being preallocated previously If both of these true, COW may be skipped Signed-off-by: Anton Nefedov --- block/qcow2.h | 12 ++++++++++ block/qcow2-cluster.c | 5 +++- block/qcow2.c | 64 ++++++++++++++++++++++++++++++++++++++++++++------- block/trace-events | 1 + 4 files changed, 73 insertions(+), 9 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 595ed9c..db1c6f5 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -363,6 +363,12 @@ typedef struct QCowL2Meta bool keep_old_clusters; /** + * True if the area is allocated at the end of data area + * (i.e. >= BDRVQcow2State::data_end) + */ + bool clusters_are_trailing; + + /** * Requests that overlap with this allocation and wait to be restarted * when the allocating request has completed. */ @@ -381,6 +387,12 @@ typedef struct QCowL2Meta Qcow2COWRegion cow_end; /** + * Indicates that both COW areas are empty (nb_bytes == 0) + * or filled with zeroes and do not require any more copying + */ + bool zero_cow; + + /** * The I/O vector with the data from the actual guest write request. * If non-NULL, this is meant to be merged together with the data * from @cow_start and @cow_end into one single write operation. diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index f274daa..61148ea 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -735,7 +735,7 @@ static int perform_cow(BlockDriverState *bs, QCowL2Meta *m) assert(start->offset + start->nb_bytes <= end->offset); assert(!m->data_qiov || m->data_qiov->size == data_bytes); - if (start->nb_bytes == 0 && end->nb_bytes == 0) { + if ((start->nb_bytes == 0 && end->nb_bytes == 0) || m->zero_cow) { return 0; } @@ -1203,6 +1203,7 @@ static int handle_alloc(BlockDriverState *bs, uint64_t guest_offset, uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m) { BDRVQcow2State *s = bs->opaque; + const uint64_t old_data_end = s->data_end; int l2_index; uint64_t *l2_table; uint64_t entry; @@ -1324,6 +1325,7 @@ static int handle_alloc(BlockDriverState *bs, uint64_t guest_offset, .alloc_offset = alloc_cluster_offset, .offset = start_of_cluster(s, guest_offset), .nb_clusters = nb_clusters, + .clusters_are_trailing = alloc_cluster_offset >= old_data_end, .keep_old_clusters = keep_old_clusters, @@ -1335,6 +1337,7 @@ static int handle_alloc(BlockDriverState *bs, uint64_t guest_offset, .offset = nb_bytes, .nb_bytes = avail_bytes - nb_bytes, }, + .zero_cow = false, }; qemu_co_queue_init(&(*m)->dependent_requests); QLIST_INSERT_HEAD(&s->cluster_allocs, *m, next_in_flight); diff --git a/block/qcow2.c b/block/qcow2.c index 5c7c2b5..38aee65 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1918,6 +1918,11 @@ static bool merge_cow(uint64_t offset, unsigned bytes, continue; } + /* If both COW regions are zeroes already, skip this too */ + if (m->zero_cow) { + continue; + } + /* The data (middle) region must be immediately after the * start region */ if (l2meta_cow_start(m) + m->cow_start.nb_bytes != offset) { @@ -1965,26 +1970,65 @@ static bool is_zero_sectors(BlockDriverState *bs, int64_t start, /* * If the specified area is beyond EOF, allocates it + prealloc_size * bytes ahead. + * + * Returns + * true if the space is allocated and contains zeroes */ -static void coroutine_fn handle_prealloc(BlockDriverState *bs, +static bool coroutine_fn handle_prealloc(BlockDriverState *bs, const QCowL2Meta *m) { BDRVQcow2State *s = bs->opaque; uint64_t start = m->alloc_offset; uint64_t end = start + m->nb_clusters * s->cluster_size; + int ret; int64_t flen = bdrv_getlength(bs->file->bs); if (flen < 0) { - return; + return false; } if (end > flen) { /* try to alloc host space in one chunk for better locality */ - bdrv_co_pwrite_zeroes(bs->file, flen, - QEMU_ALIGN_UP(end + s->prealloc_size - flen, - s->cluster_size), - BDRV_REQ_ALLOCATE); + ret = bdrv_co_pwrite_zeroes(bs->file, flen, + QEMU_ALIGN_UP(end + s->prealloc_size - flen, + s->cluster_size), + BDRV_REQ_ALLOCATE); + if (ret < 0) { + return false; + } } + + /* We're safe to assume that the area is zeroes if the area + * was allocated at the end of data (s->data_end). + * In this case, the only way for file length to be bigger is that + * the area was preallocated by this or another request. + */ + return m->clusters_are_trailing; +} + +static bool check_zero_cow(BlockDriverState *bs, QCowL2Meta *m) +{ + if (bs->encrypted) { + return false; + } + + if (m->cow_start.nb_bytes != 0 && + !is_zero_sectors(bs, + (m->offset + m->cow_start.offset) >> BDRV_SECTOR_BITS, + m->cow_start.nb_bytes >> BDRV_SECTOR_BITS)) + { + return false; + } + + if (m->cow_end.nb_bytes != 0 && + !is_zero_sectors(bs, + (m->offset + m->cow_end.offset) >> BDRV_SECTOR_BITS, + m->cow_end.nb_bytes >> BDRV_SECTOR_BITS)) + { + return false; + } + + return true; } static void handle_alloc_space(BlockDriverState *bs, QCowL2Meta *l2meta) @@ -1993,8 +2037,12 @@ static void handle_alloc_space(BlockDriverState *bs, QCowL2Meta *l2meta) QCowL2Meta *m; for (m = l2meta; m != NULL; m = m->next) { - if (s->prealloc_size) { - handle_prealloc(bs, m); + if (s->prealloc_size && handle_prealloc(bs, m)) { + if (check_zero_cow(bs, m)) { + trace_qcow2_skip_cow(qemu_coroutine_self(), m->offset, + m->nb_clusters); + m->zero_cow = true; + } } } } diff --git a/block/trace-events b/block/trace-events index b9746a7..422959f 100644 --- a/block/trace-events +++ b/block/trace-events @@ -62,6 +62,7 @@ qcow2_writev_done_part(void *co, int cur_bytes) "co %p cur_bytes %d" qcow2_writev_data(void *co, uint64_t offset) "co %p offset %" PRIx64 qcow2_pwrite_zeroes_start_req(void *co, int64_t offset, int count) "co %p offset %" PRIx64 " count %d" qcow2_pwrite_zeroes(void *co, int64_t offset, int count) "co %p offset %" PRIx64 " count %d" +qcow2_skip_cow(void* co, uint64_t offset, int nb_clusters) "co %p offset %" PRIx64 " nb_clusters %d" # block/qcow2-cluster.c qcow2_alloc_clusters_offset(void *co, uint64_t offset, int bytes) "co %p offset %" PRIx64 " bytes %d"