From patchwork Mon Jul 31 16:21:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9872415 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 95BBC602F0 for ; Mon, 31 Jul 2017 16:24:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 859722808F for ; Mon, 31 Jul 2017 16:24:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A25428111; Mon, 31 Jul 2017 16:24:02 +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 91D01283BD for ; Mon, 31 Jul 2017 16:24:01 +0000 (UTC) Received: from localhost ([::1]:60511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDU8-0004oN-7U for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 12:24:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDSj-0004np-BB for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcDSh-0005OA-2o for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:33 -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 1dcDSg-0005Kw-PW; Mon, 31 Jul 2017 12:22: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=s9GzfeNaaCNtDts8jHkUz+YDa0JtBOo5mdDGVLf7VIw=; b=bJuArUFZB2D1D4iK9dGpZE5lkSBQTHNVhe3N0j+JqK/Ybzhj9a0j3UDBLnyXWUKSHKzrwQ6EmYzDmVhc6YdH0gwIkeVL5kgDbNTDQEAYjca/iRr+zgpFR7G97H/T0BBtjZYLV0YdfcUxyOruBy1+2xMqnUrQ9pzxY39LIYdfOAU= 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:25 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 31 Jul 2017 19:21:54 +0300 Message-Id: <1501518125-29851-3-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: e55b605a-9615-40f8-ec92-08d4d8305523 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:mEjzuZfIZCY9KQQXPPqVP8oU+Odc5WF+1EbdeR20gLVRLtyVoA7LUjx1oQxlIHherRsUp5ixbSw4Un1A6EBDuRuyS/ijTNJuEA3QTF+F2lCsTWJf7l8E8uQ8OX9IDBqTkNcq8mqSWZXiNGwi0g/SpA2zDTy+yUtrPapN/rtc0RkBc5oKdzmvFlXvfLVvS3/ypNa8GQsdv3kqkoZsQGX4joAa2hIT7m1c8TU4QQagnmHc1QvKs7cd3BAxClfHr326VWiqhCb0xvTo5Xvld9acXurgyWjV0zRajgrp3Q6eWzrryFgQZzCGIs7jAq3D74+eZQKEDRS1kdAFBzRtXgnfuAe/hWiMjSwKhs9UW+Lez4bChTrGB/4q5nC+3DikNW4juwLisGOorP204TdpyaqGkwijMn3S2TOFwIggLKD51Lrg2Chq2VKhe4v58zbXJOG8ZdVZ5FdipS/8LzPChfCyjr2Galv0nZ4VfX4P2Ufnh65sAbAvKcAUtk2jAiLIPF8yweoO2edpkk9LkvXAO4YkEEyBNiDnEHTS+nmTBKcLwgONQKNbb1meCOvdGQt9lGVuV0Ow+EV6bKQzY+/PPR/GnfRXgppzxEo1tegje+luYJh/c4IHvrgciEo2CTUmVLKWZOBD/eAaJVlufvNi9hNxj9vDWyS6seqf8yabqn/hdRZplNAxa2mfSmUsZRiwKm3Hghfqc/lKcEl805qrrnAffbgB0BbgkmfGYaLxfcjBz5hGNVWZgldW9EEbHmGrqTV92nOCTpP9L1nMnOWpeVyDdbaPZCEBOLWH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E7ffo/JqNMWPKuj16+VHtfccGxN+4q+ZUSJHQSBLorEYfoS30Mz2zE0X2zUNLkIws4k4YM9Uz3ME5K1HrpU= 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:Isbt/i2efOrjdWwJhOJvAeLMREdFy2nZhEYtfPkp?= =?us-ascii?Q?N54DPoGyKlM47rKbBIJbkIG7iZaf/HRotTpbF0/eoc1YSiOpKAlnaXjtbnl0?= =?us-ascii?Q?C598SUb0cV3wPGMJtIumbgKX7vtNFXeJjI3QeYilHeCehYFhJQ3rm2Vudkt3?= =?us-ascii?Q?8f8U8K2kninDuUH5XxNVZRrOOPbLvv0YFPLtAuhBW/xjR3ZMNwBwxV3UVS5B?= =?us-ascii?Q?evQWTo3RJFsbkGTOaAXrbJWDUJhLKmuYOWSeIdXj9Q8H2yhPIVZ9fibtBUhN?= =?us-ascii?Q?WPd5gGsyXN2nqy0zCPEqXnnk30Zpaqnl5LH6vC06hd47eh1PGxB+e0BtuXTS?= =?us-ascii?Q?/wmfV0v6rV7CRMbA0NW/hvUllAMtRKClz4BXX7UITSJ4zX+S3DOJ5mQWw76B?= =?us-ascii?Q?37oNI2gXcHfx86UBvxzaJsjntoZBZiXZXFLy7lM3zwlWm/QK7L7GbqrX0md3?= =?us-ascii?Q?c4Q+n9XTfkHDECiUKYs3BKYvzYJJjefOwmZ87+Quq8co1JaeiGpVcj6QFXCd?= =?us-ascii?Q?KUVh/n2ko8dkggqUTMaNSr2Qo13dycZWDBjcCMzf6eMd0IBsvPtR1/77euaX?= =?us-ascii?Q?BpbjVIbYlKVqUkiSxBJTsIdsmSzrrsEJrUvju1H99nkBkjoLr/YADocZjSK3?= =?us-ascii?Q?Plb7LYHvciAl8jBZr/EpD2//aS/KLDRBqoscOvOrWWVIDsalwJcxiNSna26+?= =?us-ascii?Q?LGVd8M7IOZ1n7wH7oahhLDwJthvrLonV9Vmp+JAcp+dK/Er9xDujbVbCI7Q4?= =?us-ascii?Q?MBBkhJ3GQx0h1GCaIxBE8s4DZ2YH0YQ2YMGvi9jEVeW10shJo5Cplq3XTZx7?= =?us-ascii?Q?yIEBL3bHpO5jHNbbiQOchAfBFqUnFEnHIOwH54e7K2YRcgBPZNu74ZFD9BY4?= =?us-ascii?Q?GN41e64y4hUlU5+FMYa3Ai7tK4kugovF6bGhMb3KO8pB+50MBtHXEVQYwBEF?= =?us-ascii?Q?samUkEg5MKkY0KQBHqfhTytJV+URGAW8E6ggEhUl20JiL74MGLRJTszkHwPQ?= =?us-ascii?Q?f9vKtSVQ5HmXZSUl6ARR8i1AUzcl9kQrdFEtcszI084jFS16ZmfBCTDlqnbu?= =?us-ascii?Q?T0zQHJg3c8858tWNXu+1SsD7Wyf+nW2PYyw1H+87Z5RzacMC/DJBiliqe7vI?= =?us-ascii?Q?GIsiEzwMSTI6/Phv7UcV99/6s9gAzbTo?= 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:/SKLkUcrCnfSWWRmquwZ2PSe+P5TXChm3CFWcDi?= =?us-ascii?Q?Ilusj5xg/ExVYaRkDFo+yIgHFBI5Fr3yO+RtoOLYmsxJl9FsMB+MVqAz92vk?= =?us-ascii?Q?VJnJV91MuWIX+/F8VcnyeirD95g//uWw/xt53LFzeIptJxWu1Fwil7g748b+?= =?us-ascii?Q?doExNi99OENS8hK9QrX0etzZWGiI1Np4JHEq4+mjEcf1AlWw2kE1YCV9RRXt?= =?us-ascii?Q?qO6HagR+8A4xS9E3P9S09YUeqeIgoFbF91lf4UB6c/cEv0VjVG/NRTw9lzLq?= =?us-ascii?Q?uzp8cjvkT/h0ywOcbbq9v1WUgYC6rETPQh5tYJQO6mys/YnuGOpsDdlbDPdQ?= =?us-ascii?Q?q0pvYVRTK1opbQLB2kLeU1680zHQFilBuCBszsEpZxAsdlhOo+8AgnfTuPW7?= =?us-ascii?Q?tIBtosBzLmiLJrKyxIMIM6Vxmu+BRo2FP01U493dMN40Ih84YcToPMYs15jR?= =?us-ascii?Q?mcH+Zh180YtUowOGec7cAp3qkVQyReXvXb5JICE/tYOY16m0ySLztfWeghiD?= =?us-ascii?Q?IBFCTKLbxcdj8s9Uofa3acjoOfttlBr5WzIr5IiiFAlo8Ohd/cVs2xSMUpxO?= =?us-ascii?Q?N8+Ar6CTLwV8wNR6ElD8QtUN2kHHVkeZItFKRrGOgGTdfwsImFBNpnKo+i94?= =?us-ascii?Q?S5wB2KMYN74kdiPlXokKqG/SHpUOHt3KEzHbNECJ6ZE0t3OLnpYTZq2XodZs?= =?us-ascii?Q?AjTQ859zep/4kVTjdr0U6Ir0jKMr4nWd8RgcQcHcdBLFM8RSDJkvRO4fO52l?= =?us-ascii?Q?64YEyFMpD83FuOH4bAb4fv5Z0HerapuENxz1dMbEHVbksGpOsYPlQyR8NLkr?= =?us-ascii?Q?kwEHuxrfls20J9isOEgJ34tw6sTNm+JRj0zB0drvnRxyxaRDUJq+vd5MgsK2?= =?us-ascii?Q?PAmeQGtp5u1tnhmSVJT+zTix50c1jJJC3lVSxL0/2py5lSL6PWbLGFx3M4/m?= =?us-ascii?Q?OjwiYte3wkpvG8kf5zDQkam3jw+7aArqO7WTwD8Zj+Ld2+yllCZ1CKAH8NO0?= =?us-ascii?Q?3oor7gL8KCyktp8wdIL4dQepoCuttVCLlBiWsxmAY7XvQ+0EqVUwz9vFA+eM?= =?us-ascii?Q?/7rRz88vrCe+ucAIX5CFCO2NO293fDRVy9n4fpDajs5eeCinlJ1bbW3h698u?= =?us-ascii?Q?KVQ62f5S2z83uCLdqS2YPTgurkjfJn8hljd8vRi+wLH2pAhyJFXIn7OVI/2q?= =?us-ascii?Q?iHs0cgdPzqFmetDuJY3oHf7bzv5x73/YANreijRR/3GXxxtVINUtHuU+Jx/Z?= =?us-ascii?Q?Y2xjjwIV/x5GNRhT3eReJMg3089h1SMxi0F/bvFa1sD8fNZCgjNIk0yWWlgD?= =?us-ascii?Q?VAUsBBz8sRtBlDRvRYwg/CV0=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1987; 6:Z9sFA1n7w+fAPzvRXvLqmw6YYiWTjQSAgSgRTFKI?= =?us-ascii?Q?OCCGNs8hZ167WEGONQQAuEPUxG8m9gXrsz6oWci3GIoSZG2My+mp5BqLMpG7?= =?us-ascii?Q?k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EL6?= =?us-ascii?Q?z2Q=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 5:GqyO8uXF8PddPVUYbMC7Weq7lgAv7+6d3bsdv3tgXfan2IrbbwyX5kh04zQvA42AeVNSqiXwZaDPToI8IVrIiJEk40Jk26TEjKdMLQMWJJ5XOXeZXJa9n2FHNFf8WETJAYfxYr8HocnQUkYQMrEUwmapuDZymesPaDZI4oA8z8p/0PZLpYGyT6esarf1TrDtPwj1AjD2r2PRiefIacvXznb0bSi/tq4/4VI/FSMlM6bqPSCZ475EKohrZ3ZVcP/jejqeIjUFB+9FlbjIi5Tr85hAeusjv/8r1mQ/x7dF0mvgYwxH3nQhA2NEIsoq/WZ4APm7KvUGSTVlkR0i4NoNdOgBpvEwrTCE5jXSLeWfPcP1PqbPOGkRlB28QaVvSoGsyFol96b6DQbQQ6N4/vR1vKc9jmap8kffay4W0Tnxopsx/QG2H18AZab5XBdfsPwDz9iCkj+LI2UHpgCUFYNNUuPJYUmqt7EjEQxAbSjty+NxybER2m0wSpznC+hpigJo; 24:bgoASXUTLVv2J9WBGJbNvbpbyr5EmnMbu2+5ImvpKvDlYCsSYduoiZ0lKXKnoyr3VWzWnjLIg8AidT3impfUJkLgl4l7BqicYaWX1OS4MSM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 7:tpS+0xwOCZstMUalJS9VRUByXgn8YP6weUaTexjvhk2eAmkhY13dxF1G83hC5/jaJWXJJRateOfLmxXNedTudh4qY+3oTx2SvAzwi8HlJlbZRpckEQp/VGS9MdUeseDI1Kd1Mlao+w/yXuE7USprUIb7uCnuSfuegKvz6zWnOiuuro3V/XNOBQ67znRfA4KEA6lY6om2b7Dsi5FG7H+Cgv+bIcinIrg8QSKrxiieDJXlelwRxQWIRKegJlHYMGxd8Sd6vG4pjZ3f+fbl0tKwwkNqdZ+ZK4UK1zMtz3BuOJZWcBomav9GnDuppyKcKAyUkwc7m15qMN26zcorIfRPJDrWLloAVOb2knitFeFevbzNjHshUIEearueUA2E6LDC94aF5+bulqnoPDD5dm2tlZUEGKe/Ml1cq86/7QzWgIk1z0Sa+OPIFcEC0tDOyF9fVLRmPdtykuLtGQDG9uPMZLVDfxQap7I3NqERcWaF5z7f9hK0Z2fHu+2h64nv6xAUyaFuJsV5pW4K5lHJaLd02tqJJ2uxVNuCEO75YLPAerK0Hn53vzkGgdL1xPA/nYPc8J2TalnBl5YkEnpyBsesmhECxXhZUqoAlbTDUlc9PLWRDvuBX5yGi9xUcJiNAzG5aMjgrs0rVEDOGPlMwJVyfMALec5SufHFbd23wU5Kqw3iNR6mfk1krvMo7aCoW/14rC+bQ3pZRLhk++osi9RmCPpFKLa44iP1VKwkRuBK2lh/koqhz3otBhw+gisYfAIVeUz1PbVhSjKDFNFl3WxcZZGTT74nW3lzCYEYlD+jpew= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:rA1aNsDXNGnE3Uc8pjFAjO0GgL9QKAj7NwtEdlA7FgRbm7N6u3FBkFtkdVBkFNrMphrHVzYPRK4zUo1CQq/TmmHqOrXAA/NbIHSZJX8wVjYDLukUjHhWOVLEifKRG7JqUI9A2erpHxscktM4vz73PYYFI+NfyXxZLjJ/ywC91w0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 16:22:25.5623 (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 02/13] block: treat BDRV_REQ_ALLOCATE as serialising 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 idea is that ALLOCATE requests may overlap with other requests. Reuse the existing block layer infrastructure for serialising requests. Use the following approach: - mark ALLOCATE serialising, so subsequent requests to the area wait - ALLOCATE request itself must never wait if another request is in flight already. Return EAGAIN, let the caller reconsider. Signed-off-by: Anton Nefedov --- block/io.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/block/io.c b/block/io.c index b3f9d61..1b935d8 100644 --- a/block/io.c +++ b/block/io.c @@ -512,7 +512,8 @@ void bdrv_dec_in_flight(BlockDriverState *bs) bdrv_wakeup(bs); } -static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self) +static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self, + bool nowait) { BlockDriverState *bs = self->bs; BdrvTrackedRequest *req; @@ -543,11 +544,14 @@ static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self) * will wait for us as soon as it wakes up, then just go on * (instead of producing a deadlock in the former case). */ if (!req->waiting_for) { + waited = true; + if (nowait) { + break; + } self->waiting_for = req; qemu_co_queue_wait(&req->wait_queue, &bs->reqs_lock); self->waiting_for = NULL; retry = true; - waited = true; break; } } @@ -1053,7 +1057,7 @@ static int coroutine_fn bdrv_aligned_preadv(BdrvChild *child, } if (!(flags & BDRV_REQ_NO_SERIALISING)) { - wait_serialising_requests(req); + wait_serialising_requests(req, false); } if (flags & BDRV_REQ_COPY_ON_READ) { @@ -1352,7 +1356,10 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child, max_transfer = QEMU_ALIGN_DOWN(MIN_NON_ZERO(bs->bl.max_transfer, INT_MAX), align); - waited = wait_serialising_requests(req); + waited = wait_serialising_requests(req, flags & BDRV_REQ_ALLOCATE); + if (waited && flags & BDRV_REQ_ALLOCATE) { + return -EAGAIN; + } assert(!waited || !req->serialising); assert(req->overlap_offset <= offset); assert(offset + bytes <= req->overlap_offset + req->overlap_bytes); @@ -1456,7 +1463,7 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, /* RMW the unaligned part before head. */ mark_request_serialising(req, align); - wait_serialising_requests(req); + wait_serialising_requests(req, false); bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_HEAD); ret = bdrv_aligned_preadv(child, req, offset & ~(align - 1), align, align, &local_qiov, 0); @@ -1476,6 +1483,10 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, bytes -= zero_bytes; } + if (flags & BDRV_REQ_ALLOCATE) { + mark_request_serialising(req, align); + } + assert(!bytes || (offset & (align - 1)) == 0); if (bytes >= align) { /* Write the aligned part in the middle. */ @@ -1494,7 +1505,7 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, assert(align == tail_padding_bytes + bytes); /* RMW the unaligned part after tail. */ mark_request_serialising(req, align); - wait_serialising_requests(req); + wait_serialising_requests(req, false); bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_TAIL); ret = bdrv_aligned_preadv(child, req, offset, align, align, &local_qiov, 0); @@ -1563,7 +1574,7 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child, struct iovec head_iov; mark_request_serialising(&req, align); - wait_serialising_requests(&req); + wait_serialising_requests(&req, false); head_buf = qemu_blockalign(bs, align); head_iov = (struct iovec) { @@ -1604,7 +1615,7 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child, bool waited; mark_request_serialising(&req, align); - waited = wait_serialising_requests(&req); + waited = wait_serialising_requests(&req, false); assert(!waited || !use_local_qiov); tail_buf = qemu_blockalign(bs, align);