From patchwork Tue Aug 1 14:19:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9874767 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 7829460361 for ; Tue, 1 Aug 2017 14:28:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A4B41FFB7 for ; Tue, 1 Aug 2017 14:28:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F03020602; Tue, 1 Aug 2017 14:28:47 +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 BA4D61FFB7 for ; Tue, 1 Aug 2017 14:28:46 +0000 (UTC) Received: from localhost ([::1]:42889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcYAA-00089r-1R for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Aug 2017 10:28:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY1J-0000Q6-6p for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcY1E-0002PM-0A for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:37 -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 1dcY1D-0002MM-NZ; Tue, 01 Aug 2017 10:19:31 -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=DHJHJOCp/210lfXwANbdSj6PDJhyROaLpJfM0U2habk=; b=Vi2funt2PBE87fX1O3EijgcQbVJyl6cNmSQBTxy0bzmaAiYQLzGCwzB+YOwAex3fAKUXhDPlhjNpmrf7PqA4H9/P7f/XP4ZLOsyGOLtkn5K2gBWsWJXp1TkT/de3lAlpQnSBsVg758hvGd6jwCT7Sn6CTa0Gv4sCnXFhUhAeuV4= 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:26 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 1 Aug 2017 17:19:00 +0300 Message-Id: <1501597152-25342-4-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: bf2fdcd7-6a04-49cf-c544-08d4d8e8514f 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:H2QPQG2krZOUnF+laxNldHf4gjelVzOO5M1c5obuyCRGVOHQ9F5oP1zULFr/D9qRktiNEi4zjr/hYjiJqjNZ1+Qbo4k2H5Kv2aavUiuQdQpfLj6eH36x4OpqpQfI/YG7tm7gE7YiSEHeXt87sZigDSgTYLNLW4g26Tt0bgNhz5hJV2UwUUl+5lXRAs4/j/XpqsYLdWA+yqN/K/MZQiAMveKiVFzeQXDXrsqkg+qK27ER7fQQ3HB4h9MxIDScbhvTGulxeWRtuuB9pbdm/NDThN9IkM7p/rAeM0cCQzK5KTJ3SiRYwkrxLqma0HLlAgXZV88TWhwEv3TB59A8iw0p16GJIpIYJbnCwnyVCG4N8sYRSqKRlt2KjdSStYht8Vqdxay8N0V7wxM52scowOUyNcvQxxON928Ve9bVfQNbVXxcpV1uwx/3ToPdf56cRFFRiZE6yJiRg19VD7VJQnrGAEFETlIbO4LI7+OCNrk4YC+RpK1Z5N3+DlG582kUaV1vdnRioIYoHVF/vvuu3MZX99v/0eeMW+/rKWwSdI+iAuMOjrp+6619+o0ImOP/NJQSuK0oU9zvD0cGHp1vp6jcelOL/bhErdOFfGNXYlpZwSARgoKQBDQTFMqsPrQ7564Yeed4iVDr2vTMzxlUnDLs6IuCoMEO0WddmVAGVifmh58tiQ0JP4qiAIqpxhUrbZYEdKDUm7d/nSE2f+4POkjfcTSXZboBPwsA/WrqyHx1gZ/6DXxyjMYkDrJPg73ow2pi66d+FHS4MZJFCshN+qM4lDk+X0IzS36kRXRzbNHO0LA7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90bjWBgK7+ZyWw4Q0XqO8EUJy5ZYXFMWIH6TdBvqlchT59HBRRCrw0cMxUd1kVopoVDwNKr4vZUBgPny6yF9+W1gN1A2XU+GoY= 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:D44TXIYlMfbE1V6C3t1UlgD+Zx8ZPusZF8lKWJED?= =?us-ascii?Q?EwOoel4jDwFILmmvY057RgatgxETYd/5Q+aJL2ldvkVhGcXamJcmgb3HtMl5?= =?us-ascii?Q?K9KGeQG0BFfbYNpl6X34wFp6DsWkwhgjv9PShEwMblLIrOHkl7fVS2207DRi?= =?us-ascii?Q?yC3Hl8c7BAC8g8/fEi+vCqtvWwFTAI7kILql9c+7mQvPEwoNu6oT5Wjd+PN9?= =?us-ascii?Q?wr6HF1wShCrDFdvRN9MHvxqidePVNLZoo0nsaLLCAxLj8X8qryIqFJJ8/ZxW?= =?us-ascii?Q?K9c7lWfeiwcOF4ofvgAglIceuVsXZL0OxV25W0jH/O6oF0lhSLQWNJ91B7Lp?= =?us-ascii?Q?Z3vsIkfz8Rlb/RLB3H4Bwucfibwq7cuF5jwSKrqX++EEbAYUWGsvNb+s/CU5?= =?us-ascii?Q?8b4gfc9+Q+btWOqAz+ToO1lTZYUWnTNJqK0mtbfEjlhfzebSeZzWLfHDjF2h?= =?us-ascii?Q?eLBePl7TYK5ubDcuOpgo2fMGmL1rZtooFnThxV/ZxEjM6nSwTcN0fgI9Qvom?= =?us-ascii?Q?kaVfQfDzFXySxrXg82O2vGG+umTtZGzSa6Kd/fDpAywF14RrOAi50y8yQsg3?= =?us-ascii?Q?v2NKLY1/lFtlFilKYRoFF7kN+Vl8o9DtnsV49FRraCBlJYcSBya4gHTXeCVA?= =?us-ascii?Q?bYDD9Kk2oBD+e16tF2wo3+pp/Iv80lR3PbHD3BnIVrneKlU2GnZmCA4GSfBP?= =?us-ascii?Q?PDUJX2n3Yz+ZJhGYfwslkUUWPChRIWik2+lliYKrQ+RMq6qfn/vZL99JjGWR?= =?us-ascii?Q?2drUfhyTvA9ytgn/m3CGjOLC1ygGmDOmefOiFlB3ZTtdKMCiE9KOqH7dmz2w?= =?us-ascii?Q?TS/9aPqSQuya+sjA2kz7EqdnEZj/rpOu9R8zLqgLh55DDkRtzx9180my4qQ8?= =?us-ascii?Q?QSJTFdWISJCzjDgikY+l3SU3P5JcG9wtXRCCDiy8HP4KIAeqSE4C2qqHJtUK?= =?us-ascii?Q?jHXtCabGEVTN6p2FqzMEozX0nq0ITtzsuxH3mxVatFkRyhI4M9aYHx1HKiFA?= =?us-ascii?Q?O43E3oBmdCJsqpcHtaYFRdmViR8WLHA75lU5mIL50UJfsMtNIRE3dTHKDqaT?= =?us-ascii?Q?DxN2Fv2b9KbvAgr7EYBMwtimgsrpERENx+iAexzzJOahmalpEoL/+qHahjyZ?= =?us-ascii?Q?5RWtVhAzMr53etQehfB28wVsF4wG33Wt?= 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:iGlft/HhmVaTHtA0E6eOYE+oCfGtSkTvUINxS84?= =?us-ascii?Q?x3JECoTdQuGJRwkXjf8R6R8wmGBSjH6Wpsdxnl9dnyZGacZ4i+gf7rSN9q7u?= =?us-ascii?Q?o3VWOdwkcQuq8vW6TP1k40sW5nPCi7iyZUDgZ6r5lKB0bdIrMWxY4UvU0b5x?= =?us-ascii?Q?sFXTu1O2xaDUjd/ugcMP0SxjXhZQc4JSvQ0BhBCgBskurzw8u5o+nXrsrGPx?= =?us-ascii?Q?kTHk13aVUxeeoXJJDwbFeY1lzcCx/Lhlpc7+jpt8VLUg7oYHtUHmik6MnK63?= =?us-ascii?Q?VEy3P7zJz9QlG4/od7w+oj1AAfH1NclGosObb+N0Qtj0/8pevLTZj2v6+OSt?= =?us-ascii?Q?ydNmRI6Qh2NRa4pkXPlgTNTB760OSB91pv3YeQHmTXn4KEOZ/AuSLcmjMO0P?= =?us-ascii?Q?0fA0yLQmYS2K3HDKW3B8XYMRHIpUbGcswLMNyynN/Nhuf2kek8XrLZOXXfE+?= =?us-ascii?Q?Fpby3ELxCqok4b5c69mPdiexN8sdD+th0nSNq0f4QgJRR9jSM3Ql5ICH1wDJ?= =?us-ascii?Q?D0qjvpkM9gCAHCkMQSpuhIjsJOxPtUDsRCSD95QaXnjneIgwSC4kNJzIangK?= =?us-ascii?Q?rR0CxLsX6J05HRZFxt3adC/4LX5KSFZIAzLESEUSv7DpoNmrWxSuGfxxFnYC?= =?us-ascii?Q?/cvplWhjIZyrBvEOF9oYzNB7stxMcobd6APQC3Rk+5+jqDlYm9dKQrSbNYkH?= =?us-ascii?Q?Fg85NANFx3qlFsb9IOuWbCNbjbZvQiWkp+YYG2OI4MFRbJaKkBFXePz+NJKz?= =?us-ascii?Q?gCpPkxK0v2NqVAWNQznZYIbriad8fpWH7Yu8tUwVcufOEyFT6pXWEfGMbt3P?= =?us-ascii?Q?vC04TyoNVDAzcS72/nEoJn5vzxCiPSygFY0vKcMGESSO+f2VyxqJPNkwVIWr?= =?us-ascii?Q?YC+2dFP25PKOBnrrGXHMQ9RcYix2bT1SSUqPXMjwnMwJQnLKK24GHfkAwyu5?= =?us-ascii?Q?M5Tw+cqmIfouc2ilpR3VsLhpLj7+m+2MRwbsmsJIIPAUIZTX+txcKc21jpGm?= =?us-ascii?Q?xwwbMY8bQMXAf6/Ai2/IIt/JPujR3WI/qryMAqMVhs7NQHAjrtFnNl33nre1?= =?us-ascii?Q?J0qNI0PXtoCgtbQ1k97ouHTQDusU5bEHfjPlMwZXx96XMjE1lQkZDJON25Np?= =?us-ascii?Q?o+v8+2wmq4UNh6/ydwbke2lfSPLJp63cMDDQMKd2NgFhEWy/ZhXyv2fEvUq1?= =?us-ascii?Q?dU8hjP9gfWxvIKm8q90QXojTVujJu7lzmMHIJJU88C4WzHT/9iGnOfcAsL3V?= =?us-ascii?Q?lT2wg1GZwMpFifcRtf9FPGzSE6pP3acyfyesIzqINis81HaazN6FPCEGRO43?= =?us-ascii?Q?jMSXAYwfLO3oLNr0zBp3ZXGU=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801MB1996; 6:QToFk6OnF4cLmTfE3p/hBgCOKMAobKY/ApfuH8b8?= =?us-ascii?Q?Ky1LzXE9MtZHwaqCdf5TINO5DHAUvFuRKFL8OCCz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agEindqjZTEZd63QbtsWhDPpIk4bOCmHM3gWS83z/hEBIUNYO5lGtw7HtlfVBNtbXbuob+XrkR/b8/LGyxKZPe4LmHqBBJyzmDQZiOTgYKwVy0OkvTmuAvhYfwO2NtqIdJj3LZLfvhP+1CRVPZTG3KCQuFc9snJg5TwMbyDijnUiRDARYPnJPMvredXRq2o4D/OBnbVuky2PYRv0v/t39pj98AlcG2hj8/29oLk8iiIqGp79aovO0lsiiJzIut06JIj1p/5RrZVtS0n3cYqcX/H1Fw5K/QJ4vyqWOvk+z8ODkIXj5fy1oIPILs8+0D1CtTZc7zX1bAAtxFVweQAv1cp+pbsLNym9ZNQ10ao6zge6l5i4xExpQuURjdV13B0Ogdj2I65YAy5/CfQWfOurrxet+9DODOBfTP0XpT5rsljzjkKYmfKAjrUyYLQ0mYy/dNMyai/u1opdHjS/nvBFCYH/jgONT8PGxZPpoO5CSc3zxR9M0M+/cObQueHj2gCik4yDv+lpEnVR495lyBN153UaDRUp6V/8laHXDdBGi7cW/biA= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:j2jsTLFYUI4J5VrZ+GbAIOsRYg6DE98KNEnKCN+k9k9DkZYDmOY3/QDE+QHiu5vm0tdulHMwQSGQUFOaMSQ8X/hL0e+8IClppWkMnQZkpnKo2N98o2hLOzr351EgLfPNtYAOLW3VvwJPZYQMjsaShrba2JsKqNJueHlFjpETWnM= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2017 14:19:26.8339 (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 03/15] block: introduce BDRV_REQ_ALLOCATE flag 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 The flag is supposed to indicate that the region of the disk image has to be sufficiently allocated so it reads as zeroes. The call with the flag set has to return -ENOTSUP if allocation cannot be done efficiently (i.e. without falling back to writing actual buffers) Signed-off-by: Anton Nefedov Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- include/block/block.h | 6 +++++- include/block/block_int.h | 2 +- block/io.c | 20 +++++++++++++++++--- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/include/block/block.h b/include/block/block.h index 7fe0125..828da67 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -65,9 +65,13 @@ typedef enum { BDRV_REQ_NO_SERIALISING = 0x8, BDRV_REQ_FUA = 0x10, BDRV_REQ_WRITE_COMPRESSED = 0x20, + /* The BDRV_REQ_ALLOCATE flag is used to indicate that the driver has to + * efficiently allocate the space so it reads as zeroes, or return an error. + */ + BDRV_REQ_ALLOCATE = 0x40, /* Mask of valid flags */ - BDRV_REQ_MASK = 0x3f, + BDRV_REQ_MASK = 0x7f, } BdrvRequestFlags; typedef struct BlockSizes { diff --git a/include/block/block_int.h b/include/block/block_int.h index 9b94b32..9b64411 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -585,7 +585,7 @@ struct BlockDriverState { /* Flags honored during pwrite (so far: BDRV_REQ_FUA) */ unsigned int supported_write_flags; /* Flags honored during pwrite_zeroes (so far: BDRV_REQ_FUA, - * BDRV_REQ_MAY_UNMAP) */ + * BDRV_REQ_MAY_UNMAP, BDRV_REQ_ALLOCATE) */ unsigned int supported_zero_flags; /* the following member gives a name to every node on the bs graph. */ diff --git a/block/io.c b/block/io.c index 375fc66..04d495e 100644 --- a/block/io.c +++ b/block/io.c @@ -1245,7 +1245,7 @@ static int coroutine_fn bdrv_co_do_pwrite_zeroes(BlockDriverState *bs, assert(!bs->supported_zero_flags); } - if (ret == -ENOTSUP) { + if (ret == -ENOTSUP && !(flags & BDRV_REQ_ALLOCATE)) { /* Fall back to bounce buffer if write zeroes is unsupported */ BdrvRequestFlags write_flags = flags & ~BDRV_REQ_ZERO_WRITE; @@ -1331,8 +1331,8 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child, ret = notifier_with_return_list_notify(&bs->before_write_notifiers, req); if (!ret && bs->detect_zeroes != BLOCKDEV_DETECT_ZEROES_OPTIONS_OFF && - !(flags & BDRV_REQ_ZERO_WRITE) && drv->bdrv_co_pwrite_zeroes && - qemu_iovec_is_zero(qiov)) { + !(flags & BDRV_REQ_ZERO_WRITE) && !(flags & BDRV_REQ_ALLOCATE) && + drv->bdrv_co_pwrite_zeroes && qemu_iovec_is_zero(qiov)) { flags |= BDRV_REQ_ZERO_WRITE; if (bs->detect_zeroes == BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP) { flags |= BDRV_REQ_MAY_UNMAP; @@ -1410,6 +1410,9 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, assert(flags & BDRV_REQ_ZERO_WRITE); if (head_padding_bytes || tail_padding_bytes) { + if (flags & BDRV_REQ_ALLOCATE) { + return -ENOTSUP; + } buf = qemu_blockalign(bs, align); iov = (struct iovec) { .iov_base = buf, @@ -1508,6 +1511,9 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child, return ret; } + /* allocation request with qiov provided doesn't make much sense */ + assert(!(qiov && flags & BDRV_REQ_ALLOCATE)); + bdrv_inc_in_flight(bs); /* * Align write if necessary by performing a read-modify-write cycle. @@ -1639,6 +1645,14 @@ int coroutine_fn bdrv_co_pwrite_zeroes(BdrvChild *child, int64_t offset, { trace_bdrv_co_pwrite_zeroes(child->bs, offset, bytes, flags); + assert(!(flags & BDRV_REQ_MAY_UNMAP && flags & BDRV_REQ_ALLOCATE)); + + if (flags & BDRV_REQ_ALLOCATE && + !(child->bs->supported_zero_flags & BDRV_REQ_ALLOCATE)) + { + return -ENOTSUP; + } + if (!(child->bs->open_flags & BDRV_O_UNMAP)) { flags &= ~BDRV_REQ_MAY_UNMAP; }