From patchwork Mon Jul 31 16:21:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9872419 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 81B17602F0 for ; Mon, 31 Jul 2017 16:24:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 702E828249 for ; Mon, 31 Jul 2017 16:24:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6525028503; Mon, 31 Jul 2017 16:24:18 +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 AF92928249 for ; Mon, 31 Jul 2017 16:24:17 +0000 (UTC) Received: from localhost ([::1]:60516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDUO-00054n-Ug for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 12:24:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDSk-0004nw-JU for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcDSi-0005Pb-UK for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:34 -0400 Received: from mail-eopbgr10104.outbound.protection.outlook.com ([40.107.1.104]:11934 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 1dcDSi-0005Kw-KW; Mon, 31 Jul 2017 12:22:32 -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=NK+mgxClO5Fh4ZXu/7/Lc3HX9kJnJAmpdubikAlW/pE=; b=hxs0762opfY5SKLSSxiAceZrS6DG3ePkwZvDN010vwvVk+Hr0ziDa7cVJnyDKhru5cTZ8xld7/zvh8ceYGyZfr3aBtHTwy/b95CVQuVOVLegDd00RC7YddoBgNV77vYz+i9cLddTUt02+zZ6QpQ4AazwzloebhYaq/uwEGc9R98= 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:28 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 31 Jul 2017 19:21:57 +0300 Message-Id: <1501518125-29851-6-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: 31f14399-30b3-415b-c253-08d4d830571f 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:kVIM4pAUUGMEeJOcm1Zwfjf9eOxqaAybHHhLF076F5wCBqqeL0tqtsCtZjcunsnTYioLZdyN3NtthZWHjJd5xm8rTL8TREhcatTx1HOGTrOEwTz0P/htImICX9A0GhVo4GZuCuA6mtdhPJ49NCvHeIxmNY4di30BlGpMedfGrGMMwsQcntcjzPWgrsB5OKhmo8O08P+gqf23FgHQqg2Cq/zJvUcewiwlA+EBj/bE1tiEIc2iXXlzAC/PN5+TNpyd9cGhzg2CCyJZlI0WqcgteFSFNozKEKtHyCNyWrXZKaAX2v/HbOSfvYwAe/1L7QRNbyvqSeBwzZcHGb8CxzEwp5refzquX6d7Z/IuW0wdRif6nd099nAdHapHfujUeGRp7RIe3qPUUwenxOSdGfuN4LfO2KADsl0ZC1mQmXYqK+mfLGrlw8wGHSsl+SbTUaP7B9zpNTQ2AH/TfoW+WlgwCTiCEk7dD7ufTKa8y1Z15beBKOKys9JBLC/Ahepr4049m0Y+rXrFUpZ/PjerXGabxz3uVhVbtEUHhDP8i9yLV5W/MUr/7u35lNSzBoUt8YIQyZTmxEfLIMF3w5VByuJognojeD5wyglhq7j/YAVyPi+43XUzYmx8q7jf+LUhlj00SJhsk9x/v/Jb9BILJJvx78agOWXuov63s3gxpcZ3jAoBJmcAKUa1iyZgGZOq67mGbeI9IIBfp45HBpIY44TQv5E/yk9PNEiKF0/H76Z5d2Erpkd0LE4fCXu+tqle4YO1XWHfzLPLQ4lqxKO1zYyAO2rXH3KBXC4F8tP5qeGm8Jy8SmDpo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rkp7ue16LvbTcgkBdW6yqw4KatMAPOfu4JltPyRXVVqXn2UMZlH9R2jNn/K2F96jvuTxV8izxZPJM+bgKce+mmfCi9EhsS9G7fAtS0Mg1cRFs= 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:7zg0I4Wo28kkWpoLnHo5VmHKMC0IuFYYJf/eXB8n?= =?us-ascii?Q?0jWxAXIdpHiYw88sDTLyVXOcx7FuIctFSRQyFac9RrXYzDvYBtBOxcN279+7?= =?us-ascii?Q?lNHhTzdt2svdV2jaHn0QL4wWsu6mO9/rQNtb6xhva1M+rC1fLXXDSUkXffJf?= =?us-ascii?Q?PTs6CDbPlejVIsXujBFTy9XgRFnz5U5oMUIGXRxAM8b2yGIQwzB+Zfy5dLI3?= =?us-ascii?Q?Bt98832zxJBtV5fCeHxwpkRR/cF0w+VLs4M2ANH9lwULTSpZ+uzahUbuXcLg?= =?us-ascii?Q?1Zc89OMWVV/OYeTazn8v7WRCYRspqJjXYE7vF5Mw64T66YAue7w/BljSwHpv?= =?us-ascii?Q?2IP59LPA2LQd5oROb/e/NYnBlDdWMC6gvEVPqGCSU12BVJ1W5bmS2GazUU5Y?= =?us-ascii?Q?/ZDeGarCjpeJdn931yT3I3yRptDZrU5a2PIS5FLge+LSQG0T7GR+GRdiqE+Y?= =?us-ascii?Q?s2uKv6JxWbnlz0KyvS60RupbuXTAkb0epFD2bF7xWpZZwKjitqttZx5Pydc3?= =?us-ascii?Q?H5PkYS3MuA0qrNtLeTTXF8g1EvdgiOFcmm3r8sJfVOxet7a/4M2pFPsOtTMv?= =?us-ascii?Q?yi2OXICyosuYVleiG8lexhMGGhilFioNNbFtgHSyg5BuK1fSZSA0uOFD8QB1?= =?us-ascii?Q?gCNnotGdpnVcdvVh8QTIlYkJoIud3KDuDrGo1zdWicUXm4FC4jSvRBbKGrmt?= =?us-ascii?Q?BufQG3DMDQzeEu0HvVPdloat1i850imnuOQGIL0SXMuXs/FKQ0I1+QeMib9z?= =?us-ascii?Q?7aVW6NpgL3vVFWu7W2f98iKeMc/D+BtNAxwh/QnVHkirFqzuZ062c44J+De4?= =?us-ascii?Q?B9zI/sxFzd2iSk4FLELYWAR8yfKtCz+3TC5jTuYpJITvfIoNcdjufyovbAOD?= =?us-ascii?Q?VLv7gmurBzry9Il6MZV8ggMIkjfPnzB0nMwye0HKl7NYiNw59xaBWwW/Zn//?= =?us-ascii?Q?jTxVfC4BWnWCnu+EZMLfnWj2S58infV7am0FA6tgcpJCF/ucCtg6dW9pmxrL?= =?us-ascii?Q?ipfhrNFsXbowLl8ts6nwx2+Ao0q/A8wOBYlYTg3cxD+KA383WfxbY38sdMFk?= =?us-ascii?Q?/6PSlphvMpZY0pdL2F+DSVNqfpIaeW+Zuz2oYYNQTvy4b3UCcVbkKkpP7EVs?= =?us-ascii?Q?nB9ViaMwLZ9GmCzduw6FYBkfuv4aYFDa?= 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)(54906002)(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:81KrmPaeS3ga7qiCvaLhH4f9jJi4ufwfuzrHofj?= =?us-ascii?Q?5dTLLmCJXIx7PebTCJPhAuPW41fhON3snCUbJU6VhX98qp1u5PGLgIU1VWyC?= =?us-ascii?Q?hvJW5BpSPJlT3hlxEYbxWSog0FTlSCQRdK7pJeLjJqXd7njFKKhZINgLJzuj?= =?us-ascii?Q?YkyX41+wqCe0y34UM3y/gwXTSYlf/BxdhmJZrfp86N/2GQPWO7Y11l73GAxA?= =?us-ascii?Q?Jw3p1cISIYDhyC3yj2W1M32d/kgQxTiFi09ii1XpnwNsH+RjBZLVKLqqBVDo?= =?us-ascii?Q?/RD+sheTr/RyGRtmkR/nbpJ1X4vd8mwCEW9N7bf3HS+7mNvzl6+/cAfuBArq?= =?us-ascii?Q?90Y6WRrHNYMwoDEv5HTm9qY082g/2wHhrToRt4Vop1xZLLwqZfU7Are/hj54?= =?us-ascii?Q?65ycPDYNi6747M/IYGCQBc2StUHoI/0aQLYHpka1mh9OttQtRzQg6i0T62Ss?= =?us-ascii?Q?a2yL277uAoJCi0lxPGKcsrd6WmEusU/+2fH5Tk/YCSGWcTQHrmZTigQcnACF?= =?us-ascii?Q?Fb/UwyC8Qt6u91aoubugniO9D5e0JfXhzOjckHx09nQQONG9abL640HOZiVL?= =?us-ascii?Q?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hbo0B9upBZNm4HQKwIgngMOUMxVT6WER3luyqfg8ATi?= =?us-ascii?Q?UZ0=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 5:/ryyvCZLNjKMt6vgEmqz9ByLr17LGPEQ7JSAUoFy22XttoAyQMXLemkI90OlIkrkiJfI8noPe4QUSNn50EZ+HAgRIkkvMp1ZboC5KiHQc1F3g1nX0sgkXnMD9Z2CZbOF7BEKjORIBAw4Q4NL47RsnNELzT+De+yy764PJll+DaHVI0fWAgS/rbL/eKhKkK/+SPGUY1rmlkO3/KyJdB9rBHCZRt5dso4PmPFXpoBPtiLtbf7h8sc7awPSCFXw4TdVfbvZHpY01DiTFlOAfxC78cV+WVIOOSS990DE1T3kaVoN4LJ2MnrrkAbBc+88eMros6lXXm5kTXnTbA5H0dJfiY825mJG1sMfGobSkFM670gO9fhqBpZqWKNbavAzPjBijxaGbykJtFoz6jk/0fKD0/wEuIbGl2Mc2g+hqFFVb/wZ0PoS4gyZY//3jSFK9gz+tbqwJVLhMjVqPjGlfeLtXfg99wu8WjBJZCQxKQhNWLdNSka52vb3/qODRvfgTSbM; 24:SJ+kqMuqjcaQK9z7HdJ4tI4DRh2BhIc64JuW0QSYtei37IZcnwyQInKPdwLqZIQ9EN6xR8u6FeVg+wTtUap77RI+gr3HsqgmXwTcZ9e7Akg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 7:IJkY2AHcNyxXZm89+2eSHz8Ev1qxQ9ASi0TxzEacM6zwJJRNMGWtRB4vHM6MQ7+4kgZFQuK6kRI8Pn7mSwkCH+K6Ilc9zeQr24yHldAZfk0dCtR2Qnt3aRQu7YQsOgeWzImjd/wrEL24dQpHvB8jkt4r9St9imd5c0XuoqiNProPW3goWMZ8DfvGBnUEl5u/gOvQDedas4cMNZl6C/ln4FMzY7ZUOKv3M1nOVE1lsR5TH++sykicoSfQ6HfPrwZFRYU71pMDfwFare6eqLqiUeSdhC/Y5AuymabnJCn+ViWM1JeVIrZebcJ16QNKoHjKn0JWnGWVESJ+IMQ/aWzfFLP7yjZMp6a1AWLVBM4IN/rE+LqMduYrTcx84lyBfCQRZvVaJCrhfxp7XA8A1m+eCg9P5lbM8AhlxNkhyaYYb0GbLejje6JZXxoJ7b1tzJiUsJkW2erHfmwo524YK5kWzr2qoHhW7rA5yMVv1uRK4qQE3JT9oE6mdycnAMFvMTNhsPSkvamyyIBgEIHOQxSuNtGxUI4BcjQs06DbmFTMHcXzpD9GX6nNgcgbIGIEyNFdHlzQ2ivnoxITj0ygKxReQWy+PJhw5dPDn9YyOBec9Cc+EQcIqKZiugI4jz9t/WrutFGNmCCXZ66r7B4x5UDshl5RijpCyOmW/TfIv/vRJU/BpcB83FQH+AQSvZhK6oQ7rwkpsPsGSJdof3UhYXFjWWtyemgdUs6I/LePWXrVDe6KTeVsPLUxjXNX56AYxYONLG/tGz8FkIwBAolkRWY8PQvB/MX9fz7BF3vKml+oPXY= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:6bv2vTH3TtxvyPgkCNo02hbqOTkNzbxn1g8N7Ajl9nyFW/JBC2ePzqbynjNqVD8ZNucp+5TG5cNWizBYmUQm1hR/ADPcnHhGzZSXBkoKvA9JeannFWtvSPJvDiRN7YqRMw+/WB7hX005XVBkBjDqP0163OhOiTHW32FXemflY4Y= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 16:22:28.9530 (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.104 Subject: [Qemu-devel] [PATCH v3 05/13] 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 d7c600b..1939d9b 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); @@ -1895,6 +1909,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) @@ -1979,24 +2030,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 746b5fa..ac29f74 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: