From patchwork Tue Aug 1 14:19:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9874757 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 5639860361 for ; Tue, 1 Aug 2017 14:25:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47A21281C3 for ; Tue, 1 Aug 2017 14:25:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C50028420; Tue, 1 Aug 2017 14:25:19 +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 63E1C281C3 for ; Tue, 1 Aug 2017 14:25:18 +0000 (UTC) Received: from localhost ([::1]:42865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY6n-0004Pf-GC for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Aug 2017 10:25:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY1N-0000VZ-7Q for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcY1K-0002Wm-P5 for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:41 -0400 Received: from mail-he1eur01on0132.outbound.protection.outlook.com ([104.47.0.132]:46811 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 1dcY1K-0002Tv-H8; Tue, 01 Aug 2017 10:19: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=n0m6v6jC9gxYXs8hKc2BBJnzWpvyV0MGOZlUJomV6i8=; b=J4mVXMHuMISa2qgYOXXq4FWTBx6Z9IOR0CgbbHy17KPVHjCNEa1Tr5lzGkXc78QZm5HzO5jhj6WyWBXye3b4KLyUeXGT4hrjcrHZ3TlNjhM1cotYJr+inpXDxpkbB4LSi4Dio7mFglOGKcx151GSdF40CZ7GpT7mOv8g4rAv45s= 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:34 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 1 Aug 2017 17:19:09 +0300 Message-Id: <1501597152-25342-13-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: 34abf98f-04a1-4159-a22f-08d4d8e8561b 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:8aHIpneIDNo+36yDpB2ZP0NuL4KrmBjLSvg6F6WIkTjX2NotJpeWQdxpW6hoCKD0U0JhVmTaeL7cmkGZTQgWxyCHzYkR5kEKmOlFDgUEcV/JIuMakP7TFcdahHrg/7eY6ApKlyzJd4B2E1J6Wsd4Ys5voVESazMwu/N0jFWLK+UeBHaWx9s+Hj4ZHQfFihdCedcG9MeJ+pvIVzu1Av3FiGuTgpCcMpJ7LX/BLq2DjLXsylTe/rpKTa8pdsckCctBbwIp1edHgxa9r0zLoYfzuHBxIkkCiqIxFQPCKB0J1V46ofgq0Ai0wYGbDrqcGo8hkklmPCTxlQwtQU+mjRvMDEqU0EsTyVBXt/26aGpeKLlrSgS86XsV8hY0F18cJq/psqrSZcyqscAHN8mvQRlatJukhG2EFcTDloi5vJ5j80P9RuDc30jVKd+QSWk0u2SwtSYye+cbVnKfN8HV3pvgUCBvhPZw7lQV+9jBJHKsUWASXriqNxAmdA6OROm/YeExS+/1ovfV6z3XQIoWvKJ3652l9qoDuetTqi2PjMevwTV0kBaMZ93+pXbtKQdYN+P43GePgsy21ucKjomIZvRH0S0YPO46eNB2T5vQUOa51uxm+X1jOy94WhyecyqfUvljxXCRpAuE89y4LxvtjGlskPSJ/JlufuJK4dhq2srl/OFGuTOJ0vet3CEEMw13uo0QspXnveQqCg9EQ6yJg8NkG9JExbhqakPDw1rgGnu3IZ8hw4D2H9NN06pevg52NYYEwJOx2+GmFDxA7EMFy7zZIZ5LjWYGbJvEYUsCsN+f1KolcL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oWzheQKp2OvuM1u6D3rgGAzuDu9lxoaDDewo+Eh9u8/yioOxvn8PdLVOada3f8vt0oybYUCjg5UlyVez7fdq1+oEEqhkVbR+8= 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:/pW1yPwEgvfxSprHMgFuFgIGWAob2bZFVk6kQEyN?= =?us-ascii?Q?lgi3JMtvBCPDvSV+6UoOMdAtUaY/jxVCOPI/Qm9qiD6RPq3KGryIhYqu9GPQ?= =?us-ascii?Q?23jufkMWek6u4nKwfa0+2/zJ3CSzlMoebAPEsxNoZqVoCkgmw9YWEgjtCoRI?= =?us-ascii?Q?KbOyEX6eAzoqZdszq7Gc/lnOZXa/IWRTYLhzyaHNcEDAGOAVS1DbRh83FQAS?= =?us-ascii?Q?IovfE1KwNqEyIrjj/HBPHzCZQCE/4Pe4OfUmgIgSBL5WtxBsfKw0j7E/tByV?= =?us-ascii?Q?6w2w/NIVXhE1sAtHDtTli9vBd6NNSmqR2hyaiVsVjutauEawsOrly2aKH1qR?= =?us-ascii?Q?6AqKK1j3shMd416y7+mRaLLASsxjzanpcWoHt9YMoEFtUA3ZV4WSYUbRoaOa?= =?us-ascii?Q?pNphaLvrzf3wxolFHvw1r7/tXTSujwVqzaftujkOdZ8WDo3ggPeLbMvM09Lr?= =?us-ascii?Q?6y8xRSu/q2A79JCbyYEk8uEEOorRRSzTFmV77MPdtlQ+TWnoYyzDZepPrIMe?= =?us-ascii?Q?5KG0VG4DVk6S0IoD4Zlx2ElXggd6RZH12YRk4v8ZKSfUR2SpaRh+68XXQlPZ?= =?us-ascii?Q?SeZtAnSe7wj8AY1TokEffAvkUDsbBhxVgP4jmiUaOewHuMdB7pdTdgFHKr5P?= =?us-ascii?Q?p6etDrMWUaPoiDbTkJ2GnqTQ8HOTtUcSILctSrs9vVo5hVJmHmDGkQKWCNWM?= =?us-ascii?Q?7w7seuYquR3kEFhHCixhC4LtsA64AavMKV0rbV+AX2XrRhjkryLAVLeHaP5H?= =?us-ascii?Q?q0C4XRbxTzpMkIp9dhNFkpCLbafYeFUGZ02m+pLLpqib6cNzOUo4t5Xs5HH3?= =?us-ascii?Q?eUyl5K7rOZqGjh8nCJpxFJ/48ElNiBXa9c//yeqNbMYy/dGj3EkdrOYKwxw6?= =?us-ascii?Q?XHSlrQX0ORG6+Im43GnwwVGcgaE5NLFZDqksvEmg1ZvWPGS3jPL/VV5zpPGY?= =?us-ascii?Q?LP+727ZtFxpMwIbP/MZ+S4b0anNISsbg24CA2Aufi/qdnlQGgWoJtVUCG+FV?= =?us-ascii?Q?BTqgXZeDdM3kseDTcZXvh486LZXsFP6lFQCTJuYagZg2YpRvMEeGC/SXX0T9?= =?us-ascii?Q?P5zDkGR2uE/VEY8Tj6ktVlDwyaJDsNufHxlUyPE//s3B+TFuesTcl/wlyJVz?= =?us-ascii?Q?i4wykBROvqJaO7bViddB6dxoSJc51rDz?= 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)(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:Gn+hyLBXGnhcuj5s8iVmZGAHf0Xlt9BZe8mEmDl?= =?us-ascii?Q?JoMYTJxDEvqBKvR+mui94xeyUrNpTAIqbXcBt46iqYzih4FD1n/WReweKxpb?= =?us-ascii?Q?zMNvUWVInSo3BHHMSSosL/mu/F5UleL6swPPokPpxeCPflB2K/2UL2XyQbZ4?= =?us-ascii?Q?KGf7r4Is+li2s49rgFwmHSV48uqtDHxZxeJoqDzbNwf4pJL3kKgw97ip4Wbz?= =?us-ascii?Q?Ayqya/+VFKdNXkc5MjXPcPWeMQv21H8TWfuoNbbBlpP0e8XVpgrH5QMP6oST?= =?us-ascii?Q?DemKT8T5R+5nX26b3pYcMzaO9nCqMKif5EK6WMsAg8PZybJKraaCbd9QVaut?= =?us-ascii?Q?SrSdip4zr/6Y3qvAd5fAioVd4Duiwj4ZmyPW1dVCwun67hFfVOYJiDWPvnN3?= =?us-ascii?Q?a1fO3swZcGIQSOatG12bV5SHbbkbbFQUFEJaAY9GSdeX6dvuNg5rgqF9pEuz?= =?us-ascii?Q?h0oY3MEWe69/hi/YvmfixpKDVmSMbYVZc0EYPUNAwKwiNddfmRbzut+8JWVA?= =?us-ascii?Q?5KWWDibyiOrEwUJzMJGmf/+idvgF8c1PcTvzo2rtG0KJbrXSsVCsNE4iGboc?= =?us-ascii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05ULIpQVgPicbHfuuZwQHLxYyIMfzOhwwptvfuYYIo2px41?= =?us-ascii?Q?qfY=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 5:ieCzkBrJUNyVWfkyNrgthPM2OaGIvDzKipa/2HPzvfIaZcEEKgEc0DvHD9GCcVzta+gLZ1kZyaXLGdEyuWIXqpK9CmaPAGZF8tVRpjHz/Ds0w1S1rxW1lQEg/8HMgjfGwC/0H8fjUmrEMOo89G5Rb9ZjayAzRxKyqiq8KWXqGnnfMZhTxerSPPOxP7uoY9u58RuhwJBUI7+zDLynweRWYGwDHElOhZxUkBARlmttBJTCDiIFtIV7nEresDomgDtEg1IGzFOlYieZcDrrxnZmCm1iJ59gsKAI5HaYx5TIopp0qpwbYND5L5ZmZrYEBUGdqEtmDKP1nqXoGsfYcmje1yVq08F5CuWaRcUmZD1CVHwgI6r1VfeRRZiwgjTfWa12W6A/6zVFGIv0MGSYEps4AdmhwqUTMOIRp5cczaNHYwELCD5GACfS3HTLZgb/yU6/XLV68PxWGjhRyQaFk5gdTBSWcXeyC0nV5R82D0IZ0MDlPJ1L5qlui+Wa1j26T3V8; 24:dY8TcGPowssEePRr60aCAYSSslAKEXuvCNegw11ifovitRsONq1/MfCJYlombGanB5lEhzLWL5RPtbRT1d5VH6tCAC+2bHvY1IeikXQZVS8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 7:LciU9ABaYWoRK2hufrp5r5o9YdtcugSz/4PJWNtftdZgynp22UP8z68i4sFs3VZbxZm3b+cr31+FysaYfVqgu5ck6JMDRhGgLn4lOW49QNLANLyeqEq5JWAAo0/mU44A4+EEqisOVKPNYgkCVwqr3HeoiZAFfSiOfJKSE5fBMSgtIfvXGfAjH+iXCYaeMDuh2otAnPZ0Sio8y47FRoufldqO6u2PcMPxVjQeFRkqhQeRgzq7Oa7S1fcV3eXjrF8lYhpkY8RSAy9rZMu34gIkUU9YlvLnA7sNb4p1CcSP0YJQ+tHpj67xn4FCpfC1QKkSUm/wscPHytX6TsDFdAqXXQAtS+9oTY//ziyUvCQrkVFHe+P/dVYhdTJG3DfmH16fF9LltPFeAcF+6s9F9Ue3HmefAozQJ7DpsL+m8fNzvm5iO1pfDJ6RZt5HTWJLnYQA0agGjAtcFxzhfLk+RFO2zh9OknePyJ/ED0WIQQb/5HYMarm14Rs2tK7bX3n/RcOeA7TSulKrzIeZVw8YnH40vGATfjpTqAIDuG08+6uNWqGRrhAhNHR/b5A5CHYkZ2cRs9lLWvhar6tlLX0ySrhz5ZEoKQpHhChJnG8oI1wNmo/v8h95ctnE9ZdOKCPESYxWB/mTKTgY8MpbGdh4ABz2+bFH1n1M9XGmnVm7WnjzeXM73ILJ2bnQbFjc4GQoraa+ssKX4ENadOD7N5PZGUpTCk+Vg/yEbLcdTcMY7ad+Uz2w4aTbLzm8HbUYNF9B99iTFNdeCC92qIeFdMxgS+iSMSxX2m/G9Wnoq4339BaMDfc= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:t4mVPZA58G9vM6AwvurY0y2X89HoszfzbPSR3kI8zuP1+Yw2fG3gTRvIKhnrpWQqADwx/Uye/VXLv46HE3b6drrpuMi5O1YeFdYXDtbvDgGfJXFdRDY7NkPXgpju+xudEgxPnetNLeFZNevi8MffMoU8645jNKIjq6I0hVf36uQ= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2017 14:19:34.9902 (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.132 Subject: [Qemu-devel] [PATCH v4 12/15] 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 | 60 ++++++++++++++++++++++++++++++++++++++++++++------- block/trace-events | 1 + 4 files changed, 69 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 75baaf4..d54b96a 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 2ec8b03..e49ad50 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1921,6 +1921,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) { @@ -1971,26 +1976,61 @@ static bool is_zero(BlockDriverState *bs, int64_t offset, int64_t bytes) /* * 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(bs, m->offset + m->cow_start.offset, m->cow_start.nb_bytes)) + { + return false; + } + + if (m->cow_end.nb_bytes != 0 && + !is_zero(bs, m->offset + m->cow_end.offset, m->cow_end.nb_bytes)) + { + return false; + } + + return true; } static void handle_alloc_space(BlockDriverState *bs, QCowL2Meta *l2meta) @@ -1999,8 +2039,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 13a5a87..faf1811 100644 --- a/block/trace-events +++ b/block/trace-events @@ -61,6 +61,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"