From patchwork Tue Aug 1 14:19:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9874739 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 1F11160361 for ; Tue, 1 Aug 2017 14:21:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08513223A5 for ; Tue, 1 Aug 2017 14:21:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F140D286DD; Tue, 1 Aug 2017 14:21:04 +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 974B3223A5 for ; Tue, 1 Aug 2017 14:21:02 +0000 (UTC) Received: from localhost ([::1]:42838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY2f-0000Oz-16 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 01 Aug 2017 10:21:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcY1F-0000NF-EZ for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcY1E-0002Pp-ES for qemu-devel@nongnu.org; Tue, 01 Aug 2017 10:19:33 -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 1dcY1E-0002MM-7R; Tue, 01 Aug 2017 10:19: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=CqOMLrrmxGX7H4FCaSwyhtfu4YLsL+/IkPdIIhFZNW4=; b=MQ5epNCA9w+oF4csVaOqf4WDEmpNg4I0EuvBFRTIO1JKUjbuea76AflSLn63ExGtEtyYjXVdmC2dwT1h51WXYooPzHez/g2okSFhd5CYi8mHa6xa5r4lwfJ+DfwJHrtkakJDFgQe3OmY81vz0Qic6K6LWoBlAX0AeyWYBFvAH6k= 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:27 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Tue, 1 Aug 2017 17:19:01 +0300 Message-Id: <1501597152-25342-5-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: 7d4e459d-4064-472b-2214-08d4d8e851ce 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:pc2VYHCstzAdmJbiLafjdaZBLGHWfmuVwyeKO7SzrXfEC2GSuV6ThzYPmlQnBIyoQEW1mZUmtmHd7kqSWQXGjZDxyuXD9uh9xJXmd62DEaLhA9wa0gRGbPzqvKGYDebc6rk+fBnVjl/tdM1U5pc7+2Ve3bE3ak9TBX7E8ykZkQaq3yuyu1WR3Nri+PkOQTqwsTEiuT60GBANmER3rVIToieRr51/rvrbVjsosPGBIW3BfGbyblBodD3f2ODwj2BL7ASQWem+uC3w9w1jMDIfIzfMRNDIVa/BPqeTveFdBFAScvaKrVqSW8h0ckK4x/6vPGShlTj5abduOVkal/6LSR+44to+YDu/+1BGgWY5KZjLayses3YaoxulVa5gbbRv/7nApxshIsb3hblrYvHV2FL01WYC3p3EzPtN/c6ymdAQuNO36GG7sZE3nM+kZf/uy6vb3K20xKIMbgoQqQPYCNC7c/eozSlHYFrjmV6YlS2aoTYaVl9ecSeif5tcmRR5Dbdt6U+4ktTR/f6XGnkdEQS7RIUGr9r2flyOY4D3Gg5UJVZOdid4Z0Rk6zUxJ74eU5/bgguxJnHA/nxjOzcHR7X6RhuogJtTWWvJmG9/gF/z30F23iozYEqGhxeMVPYWGq514A90UY8Dqr0WyKj0gcahMhIblCIHDJsxLD1q7t05Af6u4jiTD6XEd7YUwtKLGWUjsgc6vOXCna4G/ny7HhIb1VqvZ7aLWCvhc5gdarOvCGbGMQe06c67tIdYIwMr8bi0kuFeLlfMgt2I2Vduy1kG4suJJgw7TLYDuCfWXum7n4NCmYIiKu0cYL3hlUWc X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1PR0801MB1996: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 25:xoQYWlK4hGgtN5hyZymT1jbJUVLGGETBZ9FhUNoTvNe3mkEaAjJft+eg6xQW0vrYRCjGRftPNzEcHg0Qe7EsE1U1C0Q6Kr4QKTQ1zV0Bx3MgXwNvCqeyXLSYP3nA3spoMjPTIZMHQC3dFhAjAvG3ZYqgxhSamaCKfFSiQLwk1L2jDwfnGG9qukwgBBLyiSjaYgl8jr8lhjRUxHB5OCqkP3QRoALp398caBtjN+iiFACdmQSwl31/yqmUIkK/KUBdl1UOBYBbibxL3A5R1HixDNRshJSF3wtqADQeOc8rkpzuB79V1Ijyon3PTGNlLBqNBu8aOBvUsc54DiRPTbRGfKRD54Uthz8ziIOPUPLxXRkMVZ3em9FEgteCWzou7dhNpA4OTytknUTVUatvPRXmTUB/YPZTfIghSghLdqAftOxlkZYq9U7NMCD0QNIEX6QJyctPKiKiUF5h3xvt9MUBFCj4mb7O2Nd620GFw1oHBM0qhSGES6QgVFa5ljSyiKykv2tmiphlo4UNY8Dmi9CZuoSbyro5phpRDZz8TR7RXmRYXks9k+LrOQovgXmmzqqB9kQjXINm1TnvpbFlVtrehyNmSdW91S+sJBR5HBy+miO29HrgP0cazcJtQG4FbUhTJ1NXpU5deTkunr0zTY7EJL2iifZLg/E4XT16338waRxVnd9ixbMa0IcKVjTuuVMfYWn7XZeVJ3Ju7ExUryKnq/0SGhiGGwrJR1MjByE/PVl27oLidLgSoAwQsNLtexxbShicOYlofJZVxv4sjzbCcbtUo6mkd/aCOKTWK2lPKmdB1f2ISltgs7+xMWCP3BlPRMibPe0Hm5231PCPmJYBOfId4/NQAHwsv6YM+6ZCCRxCSKrnA0BCeTJnW3/2BRBs6uUIL41iCI7KjrS7w7694L+BVb8LZccewX/3JlRnokA= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 31:fSDl8vLGZ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1pUTakYFB8iwpAQc3G2n0lOrajJSiWCJeOHk346SUqh9jJUWpXS2yw7td8= 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:aJsXUEbBgzXt9tlD7ibGa92ECM8bM6gXP9LxEtWt?= =?us-ascii?Q?fb+nOPB4lJenxFJHUqDxX/9tMhMY1GCV0GwbH754aUBFW5eXxYwzoQo9BU9Y?= =?us-ascii?Q?I8Rifs/6QryXT6r+ZzFMF0rGBxVzJ37sz1en+asn61gWkllyJSgaACMrAUOm?= =?us-ascii?Q?x9vjuBtI3lqugVAvfBAt1NqFq4zgZGOaFR+dKBVp09xgB6rXEEbB8YneaBQW?= =?us-ascii?Q?+tXQWi6eQ9OLBeFqFPYF9H0pssb9kRrStSh/4HNzqbTd3aRqOSeNGezyWsoZ?= =?us-ascii?Q?sDp9bW0MfZiKoeAgSpjCsulb1+TB6F+zdhwNTGYlKKZf9cbvJc3L9Pmv1U1+?= =?us-ascii?Q?3Dut73K4orXEswWCZALekpxxq9n6l/Aq9mhcCdH9E4/+RgETSBbHDVDf3EnG?= =?us-ascii?Q?iznOPL1Rzyx37sR7fCuQU85W5tmx6WQ+eLXhCOSo5YkIS/WBie7igsu1cMN4?= =?us-ascii?Q?gffnsTcKkhm2NLde42QTWEwrh70YxUOP6panKdflOuiOKXWd+K59yyffNy4n?= =?us-ascii?Q?VJZgryCRA2DOwMdv6YjahyoXFiHO3PqYFQgENTLYtgCDvBMd4dwOpso7FwAH?= =?us-ascii?Q?kijrrqL63tMD5GxG6NRDQD1EoahKfFCNyXQk1y3RkpQDGqkd4EtoqPmVadgK?= =?us-ascii?Q?aTQbCEASrC+Nb8tTWQ5JvLA90qiDN0ERaC24u7PFJkL845eUfEG/I1nD2Sdj?= =?us-ascii?Q?y5pAVLTzVhSxFAPrB6j9GnG0S0J6HXpWebPKdmfuU+cJySVm5MYvBWZdKOsz?= =?us-ascii?Q?8gIhqHVSeCEdDQ4NNoAX7+VMv4u1fyIJsaVypgelij9z2GYUOdgnN2qYUKhI?= =?us-ascii?Q?j9d8vzpRvS+PCqiv5C7RKNJsFtLYnwwV7nNpisxyh8L0xr8+fdsXq3EfuRVB?= =?us-ascii?Q?l+QWKnC4uBMmQKS580xudQfA8u6bHTL+gmJZHeg1sH6zuZuXlevUVM+av9Br?= =?us-ascii?Q?U8NYuu+ama2gdmVKj0I1UzFFUCir9+8AHqkVuydg7GBKDYx1OZg5GXe0Kh14?= =?us-ascii?Q?aassrbaQx55wZZowIkUhqTRxG4KJrvedJ7R1hKWXT3nkK21ICYF2H25U3abF?= =?us-ascii?Q?eY6HOCkObiDHLZW5OSzqKTtc2fy6S/pA+4GSusMNzLwlI2n9MmYP3BI8XZqL?= =?us-ascii?Q?rPe76QSbwfrOyO2dYbevdATpMbIHL7gq?= X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(7370300001)(979002)(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)(969003)(989001)(999001)(1009001)(1019001); 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:JOq4upTXATLt7KEQsS+Nb5ZCCDuLIKY/aY1X3o4?= =?us-ascii?Q?qH3qyUtccnyqrLVYaMpyOKnoU11u+qFg5M3Vf/qEpzzIIOeNpjHTJ7AsueAf?= =?us-ascii?Q?5+9ONvqcfRUctW8iYWS2cUuYxiquYxUAtgvlJnKgvT+Jfl54XLZkddBkoTE0?= =?us-ascii?Q?iDtunedIxORVqGA8N8lW+wKCWQOV4mNp2jSk+aaXZ6YKMuTfVt74BKgOnh/s?= =?us-ascii?Q?gDwcK9bZhWJ3n1e7xX6nDP/veQ9vRpEZPt0y5ndY92vEDwo/97I8EfcJZyrU?= =?us-ascii?Q?2YT1l8IkI2CcoIrV8khyLyR+26zgPYLVI95DOD5YIaDRsGDrkxm82cYhUDbi?= =?us-ascii?Q?EIXxzVr7J7UlqEpPWCgTcgijaiK4I2RHznOP8r/QwBYbgtl66WLVSo4CBNR1?= =?us-ascii?Q?TJZ2IRfNkMGBwIgDRJBCvA/aMnT36ciNCz5B8hOU0BxUd8Q3BxTJeT7ATXo1?= =?us-ascii?Q?nOaE8FADTXCPz/DzSamE3x++WSYTaMSx2/9njTJZAV5Uj3hQ0QCMTJVqlNH8?= =?us-ascii?Q?59KQrkdJKeX8cTx+WAucpLmtTbxCyffUu5JtvekAsN6m7o4O4WG2p4EtaZxw?= =?us-ascii?Q?BDSBEygIdN6hmTBhNF0mhQcpyMzeC2fZ4XcMxtCKfSsZU02VLHJ34gc8jdnS?= =?us-ascii?Q?iKzXyWgpf+GKE9sH259DM7W9cFgF8JqlbG3QE26sV8rZQk4veG42a6hol3tc?= =?us-ascii?Q?CqY58/yixUy7GtP1NHkKSbM93oGzYesFKagcmk0wTyl0p3SNUOndWrlhHXDd?= =?us-ascii?Q?g20bdm09fvY6ypNy98FD6zVbI7GAAO55LHayFWpBhmV9aV9DKZx3i4ofZNhT?= =?us-ascii?Q?OHzvSXa8ADBnznvxhFUEfV1yNIJQeSV7Jlqc/AIPE7SEwm+yJy4talDyETAP?= =?us-ascii?Q?xTdLU21tt+R5DIb43QRmZ4jt2SPW3IifUSqi8BXai6swux6WhFEvR3MTmJ3c?= =?us-ascii?Q?/mBuG66W4BShe9cu48uMl+R4gKwYuVSssXfx6RoMpwyoE+bYDjGzGXcD1wzE?= =?us-ascii?Q?mQLxCsB/D0E3Y8ULH78E3GG54+BaI1lrmq7fSQnOhyvcC/rUfZClQjO7BaaX?= =?us-ascii?Q?6OiRa4SGdZhiL9xKvbCxte4fiMZJWgDxL1g7L368bqsYVAWV5XG25bK9M4+2?= =?us-ascii?Q?bWIU4ahtEW23qzL8C75aGdyuLW6OPdEu1Ip+6MBtSpPODNcJlud0gGJ5E7pe?= =?us-ascii?Q?+Rf2HEZkpQtYXOaJxBQKKV/yPQLS0HrbXLUi8EYCEsPvB3bf/4DhKeumhlvB?= =?us-ascii?Q?iwPLCFoVTrClrT5rZx1fw7LEQeUYMsBIiYqT6U/5SdbI9WzaWVq5QimLNvER?= =?us-ascii?Q?O/AuoASiIbZyYr38ivXdc3pL9S58vjS2iBS7WDL0D3l8zE+9/0U93nd4TjuR?= =?us-ascii?Q?1CCFM7ArdBKLZNAG5uN5ko8kQFL3q+evuPeAjk6blQrN3ZUECXo6iHv3zcvg?= =?us-ascii?Q?lHvalTQRW4w=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0801M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ii?Q?r5JY0DDEUg8b1eg4l7EM28Mea+K9/Mapr7rVY1AB6LytphzCtKp/6gJoFg02?= =?us-ascii?Q?JqX7/t/DrQ2gFA8sUd3PbmW2f7jjYGPSajlME7kQNYipT0WdiddiW+mAWyPQ?= =?us-ascii?Q?/TY=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 5:6xCd9kyYPjgastGcQsMimuwp4KxGJrYiil7WLKWdqfFZMaNwQm3cYcsnscZ9QmLJGgEVYEb22r5C2WlkpNVAq5RukWtMB+Zxsw40JCCrMJiVro3PH5aQho43DuTGShwKc6ajmzyrIlRRIriI+EefCr715H/eGGY8nwFWDuNBJzZRk5zi2FiwyIUE/zxUSHd05ejvZrQxu3extc057Pd/BEujAHFEOcfzgqKWzfjJkYO0snNOBR/y/sBQ08WW3HLlOW3oCBW7Kieqru9s4L/PO5OflmqDdTTLr9wkTaUp5tzCE86kkUW083Yh4j9iLneBsx2qHBH1ibCgg7bRp9zds7if+Hw15GGxWt09ZjytguzQ0ndP2ZTnQ50GhI9KzzwB32hkT04FK8s6UnNMKrFPv3WperPafTdTaNQVso1LaO1g3deQeTBuXSCIByco9dveu7WZZz36ZsF1xeFBMVXueYarnXAp3j6QWgmqCkjRb9aPRcOybZNd9cvqbP6pjx/V; 24:FFeP9VXVaznA48gQzgNmWBXlcESZDpx1n/SWn4qf9l1wverodVPdumSqgXjQJ2ZOG572UE9Dey4aHL6Yx9UMIVyDdn6R9+kzNOBZYIr/+O4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 7:rgTc7IvFzWfojAHJEB4hc/eLRW5bGRtwkhaYXD62ztdUZhK+9zmDRu1WcegAxeTRH6VFjFfb6yAu3S0mo2pq2qKAHDI97YBamH+TzDQ51fa1/o+LAlco17vuIqh2l2/vJMFUqoGME4UHHLxwzU+LIJudiO4J5l6ok75rfR0B+Kt5+zKvboAAZ3u/sbYh44bsM8aChnrYsBfjNZuQY01uUGTTYnvtDoFEnO/U96w2UbXSCNFl0zKCalRgriG/Jpb7KDUbZVc4EP8zSvo3D++EDQ2tlsIKxPkpIDsp8RtWJUDmDsdrKgTvASqw4C3hyGdowVKtUMO1iJMjD0xxZ40imc6eONYSceD6hq4shkkqhwR38PuIzmJ1U4gtE2eGZFhP7TMG14F/LK7xceKrmgzymzbQ54ssOfPPg8fZV4eR8G3RplelXc5Gi3fYgU2Wo7dN5Y8kiBFGCSyXozSf7z0FUCXGYbVv2VNrbZzIWyQGx0qEdX1ZIDrBPAgV5eE0jLyliDHxBr6SscM7eoVFVGkveDEOMwmDo19Qhqh/CuJOJCC+z9nOLnFEFHLKg2/zn322hIYMZ599ObZJTD1QTwNpsOWVicIKxxt8ymwojHO3MdxS+prvzBS/MJTaW2TbeE8evFsmUSC3W3Z4ohPe4bvA/M8HLGTKM8p2D8CYztm7LU1HevZLB+hzC4D4rnMpp8HF7kr1d3/e473l0nHAIOf4lU4mQ1OgHXovXoar+JGXCA8fBZUbwWvOVbUsw8DxR35uLXJ3yf40msFz8FhzCWN9Ksk0W0ZQhGVZ93vsA97A8jU= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1996; 20:xXq0K/JhcMxIUAXkPtHyRMGndMmVIZVTeuFem3gRvfuwsh8VTX68rc/G/nvb/bgo9K7440FChbzTbEPZJXV4zxzLZqBo0issYOoYBwWZ81vLo7s/4nbac7G4T/q6GV62X5tKPpBNd8b6zcrJj6YUIBKfbFkoQSgq+3MxP17kRS0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2017 14:19:27.7870 (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 04/15] 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 04d495e..0a7a372 100644 --- a/block/io.c +++ b/block/io.c @@ -488,7 +488,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; @@ -519,11 +520,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; } } @@ -1027,7 +1031,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) { @@ -1321,7 +1325,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); @@ -1425,7 +1432,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); @@ -1445,6 +1452,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. */ @@ -1463,7 +1474,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); @@ -1532,7 +1543,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) { @@ -1573,7 +1584,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);