From patchwork Tue Aug 1 14:19:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9874759 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 BAF6160361 for ; Tue, 1 Aug 2017 14:26:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABBEF2864F for ; Tue, 1 Aug 2017 14:26:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A07E3286A4; Tue, 1 Aug 2017 14:26:15 +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 C89942864F for ; Tue, 1 Aug 2017 14:26:14 +0000 (UTC) Received: from localhost ([::1]:42867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY7h-0005JQ-Hh for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Aug 2017 10:26:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY1H-0000On-8w for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcY1F-0002R6-Th 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 1dcY1F-0002MM-LZ; Tue, 01 Aug 2017 10:19:33 -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=YxeDy8G2K12zOto3/PeKOJq7ZiPxdrJIodIUwYm6WSE=; b=Dxym0xZPJXymS4OmudqoW9dVJE2fREfETikw8hILHw2cYudSgpKoACGtJHbCusdRDTiffZEHaNVQf2711qnIXHLOpks1DOeIlSPUmUhlNR1nGGuSLVcFYjNGUzaPgVC9zfVj7qcl+szAEaFfx9Vp7o1oj5EiCNPavH5VK3pHySk= 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:30 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 1 Aug 2017 17:19:04 +0300 Message-Id: <1501597152-25342-8-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-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f87a6073-b604-4033-d4d2-08d4d8e85365 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:wQOHJD0E/oKpeoKUk/sJAYrxt88xqs57Lq/ULP1dVhxbfq2UhKk75VnFAqAi/XK/gyAKOHGQqPk0FqQwlL41IJuomASCtFsD6aPRZeuKs01qN9S0lDkYsfGu/J7Qctc/jK1BAGAc61Vs3jKN1F3ebsGhXQn231uCy8JVwQKSNNbN6vMiNxp9aFf/iG1kQsEUx1fNWmtqffphDNFvK7uK6XrxweZOJMh/BsO3mQyI4zNT6/H5Bi9hHTf6tX+gpX0LZnqz/ieLm9IhqRErEO0eqO70CqfcsIVDGu5VkM4z+iPylG+dDAQqPOIun/8DD7yNS9+94jUp/Km+sR1stGDaE1yuQst927aWxPJJSNQ9lCN925NTKbQQOoEjlxnXxZ6qgTzQiPU6mbKms4T33i+hjbN7iKb6KOByO+AYv6Kx4TqQZz0rhqdHlM+jNAvz+Jzv6SSB916GlLpslAU9Fy5RNMFpreMN9va0i0ORjDpXnIQ2GUKKz2Lzd/JJL8q+ucWdq3R5q28oxeSc2cTceYWafXlGS6dO4uH2V+geZSuFCXi4/FgmFYH9M6vDu/Sb4E+A0hGJN1yhECFLnQHkEdcrvMiDKvKp46glP3U7rziRUtt+ethwEs86ooT6ERD3V0dIGoG72tAAwJNKUhmF+q70c3aTzYkGe7MkQIqcvlst+NJYdXf7UHegn2YX15jpx8t6CvgIzV8vWgC0nOIQ0713BPNkKMQeBsFmZTPdhWo7uxHrH1l3TFA8d7LbMC7bNOy8qhUcI5qxw7hgB5p2Kso8lOZu3O3TUAyxOcrWx8D3I5wPkp7upJj8Wlb2z/pthZW2 X-MS-TrafficTypeDiagnostic: HE1PR0801MB1996: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 25:DK+9u10lB2G9Mx6n593QvNFL6YKL4HvpI3KhZCkN+CE+TbXmXUXFY+eQzDPlF9On6NEQV82bEvJCZ+DnxWgRgrJD1ehCO9k66050m+/Jvele/uC8AhH0SMkxk7QutUbQFixj9n3o9uQ7cy4BQypnOxz94PfvnQA6A3brziXCqMUmKcNC6o44nq3h1vpFfuO+ud7Q3JCWDNEYIs660hAqeTDjWv1aOeP6/dXHTFOYekcDA19EdEACXxY2mUArzQFrsMpPMMJjtPSWwVOLAjjB8hWFYBMOAqL4mev2gi97keQcOLaDwFvnlkNeAQLCs6Dg4bjoUrqqai8gdfJwmB9defA1o3I18HJLsicO6KL9EPw1bUaRw8+EYQV6X4Wr1CQOldjSwCiPxZb5ji10v8+LyeoHkTKDbah7akId1pJMh1jOCaabxVyluibUHjt/pnew4YRvgK7qtgxgnpd06xTS/uiEqQR/2SbU4RlfB7Q8QgtQ9Vtxhj/aI1Eqilqf1Yaqz7NClJ3Za5UoGQdhLkeT8aAkk07aNqB/b3U6chWKQCrbv/JNXjttiZyK9lDRi+6I3xvB8qsoj8ji8qF42LB1SP0EhqVOAXUuyKb16BaGVB7AfsWzLuA725a0vIBjNnTPPlr9a3ObMBytJ+vob3b3EMR3JH2007CHh6xI6lKfiR5Y7GDqEbKROky62TjItU0F9QOXCougLGpeTtCkTWTLaMUivUkdfU9/yiwHsq27KLmaI/esz3dai9gGTpKREbB3t5ZSQ9SdXCArC6ZOVdXwbkqgywiZFI33qOR6yCvWYC5q+UMpepdHkGWtrE57klcNjOWYv+lSDv8br0DsNS+QSKrd3uGRQx58Jd6sCQLcnXjZSNIykSrYsQopYru/Zdsgr5J5oqNHGktS0RbbPL7QlgUOG9WN4QhulHCl4nU0+Xo= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 31:nEOVmdivk4x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ne5aIioKtS3jnzUEQrxi0U+YDhg1CEmSHclc3XbWptty3NNYmsasCggbtME= 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:5DYK0sg89NZbyJSQQljldJTxN1MLSUPEWZGxKvJC?= =?us-ascii?Q?6IFMrL02/iEhFCAMAWUxiygtGzXakgqocGewEninWbY3UVC5dVgf93li39fO?= =?us-ascii?Q?td3zsGpYK2mXYgUNHZRwCXKS4A0qmDlcsl606MaBsdmneypqYkj04VO8et/M?= =?us-ascii?Q?Xh/G1+anHECpD2Kt72KM4OUo0d1wupka0RPnoaCR0lnapaR6f+4yDuO5YlOh?= =?us-ascii?Q?mId6/cnIq5PrQotLij49trQju/bceFgb6G/0i+gqJlcz/IQTfyqIBPIHDKQL?= =?us-ascii?Q?2U7JvV7o+djz5IGUoMESiK9FOV7nqQQJ/whgWfc5XT1rwoFNVgAvwOUh0GKN?= =?us-ascii?Q?wfMHsTv/sQRgO5WwF9Kp9aunHz3DHf2dspb0uIfdwhI0P1qv00ysQ5kibi9y?= =?us-ascii?Q?KnMOz7XcxULOM0fq1c6pASz5yjeRkfxln4TZiB91wnQDGtAY3iYodOIit94R?= =?us-ascii?Q?uOxC45jB2U/2M8vwx7t9vMhreMM6Wty1vsLRuPEtObtBr/mvq9MuwAdZOixq?= =?us-ascii?Q?x97uNCHhcKv58BmxgC7JKTxBIj3S8SHuyWGcPyhCa7E7kvu68pstUjng1C6J?= =?us-ascii?Q?d2uzjZGCRMmCdvYHL9mVZX+chi63LtKD36e6T+uokJ30fPlGtjDIseq68Bx4?= =?us-ascii?Q?Dn41+NIkp3+eKnqhY75ShAlbzlDd8aEe81LH/AcH0dcXMTlYFwGqul2fKd32?= =?us-ascii?Q?Abb7tBpcfYlijx0hzoOt3mfMg+ysROU/w9V32U5i5ijLkcPVtRWB6qLPxGnr?= =?us-ascii?Q?hkscFpTPpwytpdKgWkuV15iKaz/1J8wdbqawSz+ohl6HO6lvXLUAovjec/Lj?= =?us-ascii?Q?H4wA3dUb0N48JXu8B2UhJUnRDiWAgudpOQvTGPgwlo7M+AbN/HC/CUhtL8P0?= =?us-ascii?Q?BuGcTF/OHZqa8UT07YAZeiWrStwgahIp/Ndfpj+xxHRgvFIUJzWvZF6WTGtO?= =?us-ascii?Q?fgLIRjxt794DfapIgNsnjYiVT8rsCF6haXwnzVOWTu6b8c5xK4+7o0BgsYKQ?= =?us-ascii?Q?vmAZ3URFeI6L0SGxHStxUKTrJwPc0GvlxSJSPoY4BT52+kxV6P9hguFEst/n?= =?us-ascii?Q?X1KSigtlQOLXy4oLuvywMNO2K4f4VowQGfzLW3VOFwwtwDTP36unDRdgO3tp?= =?us-ascii?Q?8AomQK2TXFXhxNGYEcAfoukQct3bi+Cv?= 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)(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:eB4gCjQN4sUOZSdDgVvrv3Q3bgeRgSWpMR1lSTs?= =?us-ascii?Q?fdcaKv0AKdYUxT62Sdn5QYir02BrYpK+y4n8l/Hyr9gRk+mgBjzR7/2ragRP?= =?us-ascii?Q?p93eGQRcrFa/H7SFYdnccTyyRV4uf36lHUghg86Bf8SN1sJZHoofDE3tPzfg?= =?us-ascii?Q?3dqUYYa1o20U62AdBZbwMKVRyL73DxZGSKtkDWq/S4s2j34bkot70C/BdDLx?= =?us-ascii?Q?FfckuNsGOzUDW/V5LL7FdVy1PBaImy3pa7lhPSZn1g9qhobfaDRUMYBa7vfA?= =?us-ascii?Q?qrgoCbcbGTrGw3jPFRnq3XUNNoFb+HflvFAtyfWtKt1wlSaYr7MSI3iFNEZ/?= =?us-ascii?Q?ktgeZHVjdYEwok1sp7ZWvTXMesi2/3bxaac6TEJdF85+e812BHQ35vZf7lN9?= =?us-ascii?Q?gpr0vO0ACYqgbWiz9cKGRguO8HOUEYgLxfbnBawAI3JJBf/I+25/s0pecFIM?= =?us-ascii?Q?C1Q3oWa0O0S7Asu5Gq7hojdhfBatGZ4EwvY7YxQ77OIrKUOLwTtau9sxBq1Y?= =?us-ascii?Q?A0jUwlMu9+saXyJn0A+I6/qEWJLFr2qNmBrZ/N4A+dzvu13L08O/LK2gcgHL?= =?us-ascii?Q?K0TeVe05FFUJ1ZVuUhu/OA8n3NJBPpTwnK+eiy7zcmfvprREW0NpPUC5xWMC?=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A=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 5:D9fF24X4FTWHBUZ4WJ9eC0TQ/Q+v5VrlQlU31J3CnKDnpOLwqB+hul2Akw2d4Ue9qJB/818YpNDNvz2H+L3UPefs+7Tgkdg55JxWIFckcwWF3Wu7z2gHWJxdFjJvVJXZDISAjQSAxQ45VYewsl+cHe1nPf93gckJdEGBZjus8y0PyDOTDT4aVPdhNWErXexZVGKWapIMhieE+3Wiq231n+1fzcUoLltCu4gCGKAai48C9Gtoe3bnf1OaibBkQzOyienuOJSxsA3pYjyq02HxN/yT6fQFf8Yd8lGJ2fKKU3jwY7foUuDviVNvI18NAfrFj9l3BQu5oHzj/CDbwCSf/MZ9xtyBygM/Da3Twcc/6+DstluqOAIh+G5+MXymjDMNjlnK1Npg8ojgosWGxi6nPbwABcVAHDQsCJwZwuu5ibfRaBNygP9THH4ongcQQPryMWleY1M4l0UvFMMuNgyNWu2EoELNAcdLgTf+llAxPgcvyZHs71k2ltmq7/A+m/ww; 24:f9/7KZZBvd2KHzE13+XqaYyUO8JK/rCFeTGdv/i98yuPsXY55PTLdzc4O7qxvoy5j3Qa8wwzcZL73KArGJ+tfwrRahTpCKnyMPPDZmrQuPA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 7:zr/UQRmgZ7D1fk3/Q5ilQmqFh6Dm97s4sQAiPIi4a5jhC0dlDi0q2ubZp+Sem6M1cT0/Wyeic5Vqv/Zsby767KXOVFWbzWqeDqit2jOGeYh71fKZa2RDUW8fD+vOj1Jk2XKy6avZtJGBnocmytGPEtz6K+Bov/pZgg0spVrEt2vsjE1ken279AokQQV8MNpSjH7wMQw8O74vglwTzL2iJMQsVUb0ZjnI2AXSf4+3euXWj8TUPxGUzqDPFVT6jqch/8K/F7evf6RWJbMhzXRy0/L5E3EO4/EP1ASIlm5r6Qfz5MLQSKZu26+ZKPgJET8Yqq1IVGVn5Vws1mS+Dxj0XygrtKa2Rvfcn+mi2ZnpSB4Sj/TNO4aH5P+pvthKapk914fQtPLpivSRWuoKtO18UwX2eKpUTPqcEZZbGIhtpnrXagav0fCKM4LfAmRF1lcYwmBHq362pVLaRG/7o6DLszPEWwbB6yyUWrYaFj153nn8Bxyl3PQZZO/rXzA7MC2mhp1cIruXtmvfhIhGjhR2bMymxMz9OHNIWxEj9EkK3R6EiGdAvKeIb9Qi71Chvdr64ALtXy/K10ywYtY5FtTfqtHJRfT9+zYx3kV0K/EBdnwp0zVRAVXbLqpICpcDgB5+xoSXaAlOFixD5S0H+7TpavY0heyLD+sua9s03vo7SmHr62j+NDgwCoLCgEmKFmpRGjhDBZhS9hvdt6NzSGke6o9V18kEcXEoWah4w91D6honpKFtIbFilDDX2THpjFhpA6LY2TURLy+mk0PXudXxUfaW7sGX8YqmwOh3tLiqhJE= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:ri61HSlQXRwNg/h0jjwPFaSgcwhxCvLpiA39bKR9scMD7yrOr93LnIVimlrXFI1BNJJIQP5tHvVwPNsuSIYR6uKnt1oRMBm8Rvqi/u9uKaM9XBC3agv6nNPNCyFMI1wb1u5BaDUvgQsH+QvMizuLwEXFGmHR5a6Wb8Aq36Wz7IM= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2017 14:19:30.2402 (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 07/15] qcow2: preallocation at image expand 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 patch adds image preallocation at expand to provide better locality of QCOW2 image file and optimize this procedure for some distributed storage where this procedure is slow. Preallocation is not issued upon writing metadata clusters. Possible conflicts are resolved by the common block layer code since ALLOCATE requests are serialising. Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2.h | 3 +++ block/qcow2.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-- qemu-options.hx | 4 ++++ 3 files changed, 67 insertions(+), 2 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 96a8d43..ebbb9cf 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -102,6 +102,7 @@ #define QCOW2_OPT_L2_CACHE_SIZE "l2-cache-size" #define QCOW2_OPT_REFCOUNT_CACHE_SIZE "refcount-cache-size" #define QCOW2_OPT_CACHE_CLEAN_INTERVAL "cache-clean-interval" +#define QCOW2_OPT_PREALLOC_SIZE "prealloc-size" typedef struct QCowHeader { uint32_t magic; @@ -327,6 +328,8 @@ typedef struct BDRVQcow2State { * override) */ char *image_backing_file; char *image_backing_format; + + uint64_t prealloc_size; } BDRVQcow2State; typedef struct Qcow2COWRegion { diff --git a/block/qcow2.c b/block/qcow2.c index bcdd212..66aa8c2 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -674,6 +674,11 @@ static QemuOptsList qcow2_runtime_opts = { }, BLOCK_CRYPTO_OPT_DEF_KEY_SECRET("encrypt.", "ID of secret providing qcow2 AES key or LUKS passphrase"), + { + .name = QCOW2_OPT_PREALLOC_SIZE, + .type = QEMU_OPT_SIZE, + .help = "Preallocation amount at image expand", + }, { /* end of list */ } }, }; @@ -1016,6 +1021,15 @@ static int qcow2_update_options_prepare(BlockDriverState *bs, goto fail; } + s->prealloc_size = + ROUND_UP(qemu_opt_get_size_del(opts, QCOW2_OPT_PREALLOC_SIZE, 0), + s->cluster_size); + if (s->prealloc_size && + !(bs->file->bs->supported_zero_flags & BDRV_REQ_ALLOCATE)) + { + s->prealloc_size = 0; + } + ret = 0; fail: QDECREF(encryptopts); @@ -1898,6 +1912,43 @@ static bool merge_cow(uint64_t offset, unsigned bytes, return false; } +/* + * If the specified area is beyond EOF, allocates it + prealloc_size + * bytes ahead. + */ +static void 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; + int64_t flen = bdrv_getlength(bs->file->bs); + + if (flen < 0) { + return; + } + + 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); + } +} + +static void handle_alloc_space(BlockDriverState *bs, QCowL2Meta *l2meta) +{ + BDRVQcow2State *s = bs->opaque; + QCowL2Meta *m; + + for (m = l2meta; m != NULL; m = m->next) { + if (s->prealloc_size) { + handle_prealloc(bs, m); + } + } +} + static coroutine_fn int qcow2_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) @@ -1982,24 +2033,31 @@ static coroutine_fn int qcow2_co_pwritev(BlockDriverState *bs, uint64_t offset, goto fail; } + qemu_co_mutex_unlock(&s->lock); + + if (bs->file->bs->supported_zero_flags & BDRV_REQ_ALLOCATE) { + handle_alloc_space(bs, l2meta); + } + /* If we need to do COW, check if it's possible to merge the * writing of the guest data together with that of the COW regions. * If it's not possible (or not necessary) then write the * guest data now. */ if (!merge_cow(offset, cur_bytes, &hd_qiov, l2meta)) { - qemu_co_mutex_unlock(&s->lock); BLKDBG_EVENT(bs->file, BLKDBG_WRITE_AIO); trace_qcow2_writev_data(qemu_coroutine_self(), cluster_offset + offset_in_cluster); ret = bdrv_co_pwritev(bs->file, cluster_offset + offset_in_cluster, cur_bytes, &hd_qiov, 0); - qemu_co_mutex_lock(&s->lock); if (ret < 0) { + qemu_co_mutex_lock(&s->lock); goto fail; } } + qemu_co_mutex_lock(&s->lock); + while (l2meta != NULL) { QCowL2Meta *next; diff --git a/qemu-options.hx b/qemu-options.hx index 2cc70b9..98e5136 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -758,6 +758,10 @@ occasions where a cluster gets freed (on/off; default: off) Which overlap checks to perform for writes to the image (none/constant/cached/all; default: cached). For details or finer granularity control refer to the QAPI documentation of @code{blockdev-add}. + +@item prealloc-size +The number of bytes that will be preallocated ahead at qcow2 file expansion +(allocating a new cluster beyond the end of file). @end table Example 1: