From patchwork Mon Jul 31 16:22:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9872443 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 2AF53602F0 for ; Mon, 31 Jul 2017 16:30:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16BB12808F for ; Mon, 31 Jul 2017 16:30:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B7F728521; Mon, 31 Jul 2017 16:30:22 +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 217AA2808F for ; Mon, 31 Jul 2017 16:30:20 +0000 (UTC) Received: from localhost ([::1]:60546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDaG-0001zS-4A for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 12:30:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDSs-0004xH-PS for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcDSp-0005VQ-BO for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:42 -0400 Received: from mail-eopbgr10091.outbound.protection.outlook.com ([40.107.1.91]:58624 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 1dcDSp-0005RO-1s; Mon, 31 Jul 2017 12:22:39 -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=70DJ0ivqeZnqLivNaENxUQZ0MWFHS/csJzAhOnyjvTc=; b=AENtLJLW46ko3RXJGT2jfGeqmEoFkyaGjKmzpJBdsUeQcHTVqs1pD9sWNhcLVKCqWrnct6IWMsD0epnyM9xpC4FUZOmq8DQn/Gz09vFWRTO/RS1QUnRaV4XQVO5VfELzNk/4ipgF7nrEWWf1F8ennRPuc6bnRIkwtg0i752dz0g= 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:35 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 31 Jul 2017 19:22:03 +0300 Message-Id: <1501518125-29851-12-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: 512aeaeb-153c-451f-0a27-08d4d8305b34 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:LRCVKdvdlq2/yDCzjo340F9F+sREQwcBnKR7A4NTIJehjfTePnn+4g2MzuBhI2vbHeD3fyYKy0XIx7DhIJFGOf9hUd7mKMDe2YzK6X03OuMxKrmugCU/fWrzVXeETqD3OjdBfBbq5nx+JPK1sWCTXO1Ai2TpkAkKTycbRyE9mYNoK84SVtWCxAuhMO8NbfVBGNL7KyNxzkR9xKts0U6v8SHEYktKmfq/B20E+bczuDobOTWt5mo9sjbzUkMEJUTyx2bj5vJ9YfzSPcAHjdnhN8yD42KwhoS8l8Twuhfb/1Z0JdTgOycVPpzj6O1wjRo/ln6lrybuBJHRze4BqN8mLDnOrjPmWkDqUbhQ6u0MY3JuLGylayJDPuyCUVAhf6fXIOoUQKOBmpDesNPgf5KoW1otHKETDcMZMa6JU908QZvkT6kyMUlHlagRIz5rbH78P6cAZyLjvwTxw8URFvgoJAlyccEJbr8FTb/Fau5Ze/lq8aLn5a7YYoy1vAOLtJdLKzx0VgrGySdBMapyZiHrghcat5fPyg1wIVjBFSsHp3QTUb18qXvJouei9Autd9PrAp9qUF8DIsfsNzJZB0bMS+eW8qNWyqSbqd4X7sM6ABSvYhThKvFV8WrW5+LnbQM1loiCtgWWY2jEm09y/33ZmlkBJqrWLDYQO+Fo9VWuNUQOA460+oFgpjgJeefY7NjBN1kCJ61WK3fm8MQm1P4jqdkHaNWFnqnvKDjnF3kn8RsPEig3Zu2/xhsGm1nP/4gI1PEeKUo/EcyLAmJ7yXpyM2B3FHS1i6uwtJ6+Lw9YJ2w650BbiiB//LEM4bBWG6+p X-MS-TrafficTypeDiagnostic: AM5PR0801MB1987: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 25:2664Y4ZV9gHYka8xCF+pGTuuScvb4sTPjNRWSQSEjb/WrhGIil+aYISXQi0S2hs5F2bcCMZFUlEsT1fCddgy01ize/GSFIPgBHoktqbIvURjAVXdN1knNfEWlUNiekpmdcLsE3xBKNmLBS/JgHHHq9Ok9cXZJA/kVyKhzKcM6vmB0ZTIVs3aw+UMxCMHKIWau5LRiHkWhNwm9yA+M4JaiiRlW26ENK1IJqImmQq1ER3k62cC83/0Ne9/eyNzMIiJNCVOPm+ZilJZxQKVTUUsIrZtyZoba0gibazZK/MIuNlJtShkEeZLD0PD1zVgyT/M9Cd7oqQOaGJt7VvV6tzuYOWjMg8afTGjq9Z0kGNI+uA520zLTnFKaDmke2cnfVPdSIpVXCZgA/vO+iwrxtKr8MWhSkiHs7xPzfkXtQUjGy2P5hYM7uB68Kl2BqpeEEEJwqrMesqBAcAnyFaeBPNNSf/VI2Rz2Mx4n9suqJUb/H9VSLvV82NR5XmR+hxUKS9/ULb50PssVbv8IvTMnWGhvs+urcwDKcG67g/UaHvPPLRt/9+phjdESGAMFInUPvbpSRtmTTMeNUxlDOByvY8t4gNmzw6VWWMNkSGIBb2kuIRCY4bdIlTsjfMNTgdifKKM/hQtA6K40aIUwejD3lMSjm0z6m1itjxpF3FLXmhmmt0SxmG6nruPsHTOx02Kdm5NkarDSvt0xWKendVINSqnFqfEm2Mq+4Zd23mm2bTdUXRaSuDHAH1zAqclUwwkc8KTFOVaSq5AwT5p7aGPI1vALquWOpZ/UqdmsLfwcStop5hcvwcdytefNUV3D3lQyawAZRoOUUPmbe3++FFq8IlPzYMCuE5DituaLFchu/TBmpbrVOENUYrMK+azzOba/diZ0CMS3quSsKpaxdgeb7PVr70xcwXA+WZyhqYVBn0lC2A= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987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655AqPoG/nAj/VWATKjrJv4Zo/MyfUfJjHqwXX3nr/hUp4RCMogfBHvNjiBH/5BULd9OFzdkwU= 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:RPBmJF5UhJLEXdhei0ACH/RxAJBIdIA0e989CPK9?= =?us-ascii?Q?8MicxtsfRsX3Jp9SHic51rfHyrBwseGDeulBZa/Z7Pgdx5xkn3cWaqKRIkPE?= =?us-ascii?Q?VSw/3Fj8S9HiAbm1MZZH0pQTRbcxQ0yzyvGCVqRUabPYzQy7fUOeXVWU8Set?= =?us-ascii?Q?7FcY+sSwq4ypONnvuP3gpcdept+szlwB2adhehT2Gpf6ghfLQjoxHByuZA0a?= =?us-ascii?Q?Iq3OkFGwK0oP+om1EPGospP43Rnx9h7gnxxrGLCbiBTE+VrrQyHkwPn6guaw?= =?us-ascii?Q?7wfh0+ttqGLT7vGGJdlk06eks0ukM0/bi3xveTIATI4RRItyxdpT3vYFbBxt?= =?us-ascii?Q?E2qkpl8lPuNxNgBUTP8ePcjWgWw5PFbddWK+6fUQXCY1921acYx58xw3eTYD?= =?us-ascii?Q?GkR6cy+iCe4atyEFZpaKLoccYCA6wyjQ22VHkBT5hcEj9cY4ikpEcXyvdmFd?= =?us-ascii?Q?HAdHKtuE+F9UDoD4hmd5XG2cHJxn7JzfV5WdWnvNh2NgYSDyNXksSFX1tCZT?= =?us-ascii?Q?OEAmPxA9doMhTvvZIkkFCfASPGoWkvicVH0kL+ROaH1gbbqEwMfNkwQds9Pd?= =?us-ascii?Q?RPqVhYoK58J/UItuXcCmBRr9BKligQxujD5imrb02IXF3v/ty/rLklcUdK5V?= =?us-ascii?Q?Xl1ym+7ePVUO/9IaeSv1IPONOjl1Tr0D6heFWwAMf+FjtOyMOF63+XXgsrhj?= =?us-ascii?Q?8qkwxiKQSZc4rfr+qDnVrqQvL+p/DZpCar3ywwXtQncc9Y6moX6J3C9ttK1y?= =?us-ascii?Q?jUAesLMHkZVp9MzJ9H6xXttB/aHDFB67jPQe/ORhxvkRUWLl6g1ynesXH2Mu?= =?us-ascii?Q?DisIFMDXppBxRiOXCg/ANJM0b2Gq8SMFV95bZg4WD4wsmTmNVvG8RpPfAtbT?= =?us-ascii?Q?o53QnUZXUhHUqAohxKsceretuuqvcyDe/VcjHe8maTE9aVoUDMHY1py3uQS5?= =?us-ascii?Q?AfX5sjEvmh65hZ2ONtjDx8PHqBFfoqDJBTA4eZ0jP3yzWQ8BIX6PGNmX2ROT?= =?us-ascii?Q?ystY/+KPwQtGJPkIddu6383fWLQApPRKB6IKc9hLiOtq5JtcCaEPc2F+PXgn?= =?us-ascii?Q?fKu+k/bDqyevJfqBwauOnEyUdev1hSwKa1tQjmTQ1m6+EpUXFfRSbnPbFgKX?= =?us-ascii?Q?XSJJ40r68BW0Zat68pA8JooucwIbypbW?= 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)(575784001)(50226002)(107886003)(110136004)(38730400002)(105586002)(25786009)(106356001)(53416004)(478600001)(6916009)(68736007)(2351001)(42186005)(2361001)(86362001)(7736002)(33646002)(76176999)(50986999)(3846002)(6116002)(5660300001)(6512007)(21314002); 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:RyLfvu+X1DGzLIgDM6MFNMil3f+ZGGgp9L4H+SS?= =?us-ascii?Q?++xuIdVuLthNAdOwtqoevTsYlMdKdJaX9VCiN7B4yP2kAiBGVEYG0lmzNsEO?= =?us-ascii?Q?0R0mUobUNNkGS990HvJSsIfh11A1t3KbeFp+QCYaBfoPwaiK378NgXPivMP9?= =?us-ascii?Q?EwIEhNZj+kz2N5FcNKZ/8w8GYmynPYlQThdrR7+DINPckBhvWQ7IRzsPTmct?= =?us-ascii?Q?9lF211yIAezZCBcYsT7dhDy0cUqCwybTDOPFS+XHx4Q2LxgQT1+5l9t7RG1z?= =?us-ascii?Q?B5DZzKWl+p3uaBANsqZZa53XXvSkt5BpBnS+DN2SfeUmg+iDvAoP2ns9Nf3w?= =?us-ascii?Q?OXkWdWJX+3cCtj5fspxcUD/FKmgxfgjfPGYkarFlOKzEAdg3OZYkv+BwoM2B?= =?us-ascii?Q?0AMQZUNWVda610wdVqN4d9zUqg/lS8uWwEf5iKVGBvOZCA/k18JQyb2vd05f?= =?us-ascii?Q?Shsy6M95Nuuef3g3iq8CjyTRc92t64gnyaQ74swejZ/++nFrFqJ26hmy+QVw?= =?us-ascii?Q?IUljYiu3TTeGiyfuE+SAtnwCb1tb3JCwmrZZ4HztX2zGZajMsIx6MZW70RtX?= =?us-ascii?Q?w20T42DsJpXttDWOogfZGAiC3Ps5yzFob5iNqDFehRXTO1BpUVjudJ437ujy?= =?us-ascii?Q?utWW285sVPjiu6KZHBZZzt8W4gS2GwbZm8OPJfyL6oRsBhxh3emm/CixlqGY?= =?us-ascii?Q?qs/uLjsHsIfWKR9r7DlHAafks06eOBUp+W8kY3WfZYcD0oHl1h2TVoGq8Gnh?= =?us-ascii?Q?Nqyj1I8izhFqz+qaZSmjxsgRW3tTfoceU8GM50wFhXVEPPzntpzwBL1OPy2I?= =?us-ascii?Q?bWerL60YWoy/DiH0ZKdYOv+DOsqiaSzAb5yv9hCbSC0KBxFjSoEEl5Ei1/ID?= =?us-ascii?Q?im4cwRFMXIZ0gJykOQtaQBFScZJh/g3b49PED0DnevkO5yQlYDy0rOQxwaS1?= =?us-ascii?Q?rhQC6RbveExCYCmADPcqUR0hiaCrzHhoju0sdbW7igFpTFFKHJLH0V+XkN/5?= =?us-ascii?Q?Hfc9gdjEHjn/URZqZP21kPq5lMpXGRq8/4LU+tw2u3ajLBblGvBHF5YlU0ly?= =?us-ascii?Q?P18j/2US9dG+34o8Dgll5+sgp1RUT6MApYm/z+o8nvW9K5O9Oq3quskbR/Gd?= =?us-ascii?Q?MRgOV67Z9gIWx3kG1QqiScG1sqZPxpzJkUW7UMGKWQxHXnRtCrfNeUafvEhB?= =?us-ascii?Q?+cOJGsqtrDvlpd2grao+lFlJfhElVmJCZ8wThhigD4ToR27J6qXEaEVCnbP8?= =?us-ascii?Q?IT8NPI1PDt4O7zO1gVKmwMWSwyKNKP+R9bOT+v9Fg9zaK3430LaVf5zYjeFF?= =?us-ascii?Q?Kf0lTg70kXtvwzDNJsSQ9kjNTJYibQrjfnlcFQladGnSfnYpfI/j/1ZSpjE/?= =?us-ascii?Q?l29VeKg=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1987; 6:E1L77iwqfipgi/vjcbh4XV+x2i2uRIrWLZ3H7gE/?= =?us-ascii?Q?uHIozvY5N6oNzZh79bdevmyLKDE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DG?= =?us-ascii?Q?eow0DGHjDO8WH92VkZjuvMHnKPi+Ajrygp/B0A5xfm5LS00Hpm+ZKAjNamSc?= =?us-ascii?Q?i4Q=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 5:lkU7AxOeHYG7oNIL5BPIGsS2LkvafIOY+LzKXYQ7AwhxwfIsmRTI7LZJnHurx47gxA8VQXS9uCSEVDNIREBCYvxwyPf6pzdp1SihvXSW0VJvpBYqOWEbXDNM1bNOrVpAvPwAH9xwSLmEiJ0a9EQfhKTh8FKLeF/rTNsN/5bQcF1/F1p1iq2exuNX/0i6YuneBAr4RCI5vBLhLqp1axGgcicmTl60SUlBh9x0t68b6vAVUZUqrnpm/PXehrqV/XNFIQI1EzXXAq0Xujz3YnOMYqfqmiXXI++uwNJAbQQFu5dHvGNxuruM+bhTX9QhJWDgVnjHPyBatGn6g8Supbh76EJJ6ZIEmp2+BTOveQjtSw+7L1Uzpov+Gvpth1qCJroC/6ewZDBY9HxktZFNRa2E/OajJuIOgT5PNULcSXCOGRghmcBTE+I82Ngfk2cMtOu5AVm+5PVahzNLQ6AU/kpj63qE75GCOcBrMxMmBmcmxwpfHhy6CH8khf9ybeq9+k/I; 24:k1tj8LCoJiRUefuTds59WHMP8/g4LvLglADiaYlf6AP+SnoxsVPMggUKkk1UGYUmOSU+UCgXJ059kCCh6bgbsbzsORL5tyHWwbeFxjic1vo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 7:btAawYBRIzsvHRchfpZ17x/RU3hioY8NFwG2TE2wH/PY/aiDUftDYoqLZr6Iw8TKpRq7oMlnEa4izrq/DgowaiTO/c1E3QPOaiLmUF7Urq3wsYOs/70f9qEz2r7R0cBCYzFbsgHa7YUDHApMC+0I2JtuF+DGI5VSSqqNSQRxN3qLcHsBYOlRDVuM+CgCsHKixB1b8WALVPnIV4Zs5r2RpxKrYcOHNRZ/sOss/o4aBHEf+vPt0ITqa3EKU1+UPhsWpr/7oTjc2oEuGw4+ZeLqoa/IG8PEyJ9kInnxqkurE5A26Ck7WWenRTgvFf02sthl+e/+4u1vjGCoWRGjqVIgUAMSQPKjRoH/uJWVmQ+QmpdzdJJG9aZ9ffl798jzkDWjRVhMuY658Kev4sylH33ozVB3lSVwAejLqLezm13PdpAY/Xx98gbsNOrrNT7KsKZLmgrXPwH1psZwDbdwDqODL9D02Xwd3QW9vcBoJrQq4ksJwO7Y0rtJmrl7Lp2xvqr3Cr0JzqBHBqZA5bppxiLR5KgovmQPv3VT6cUl3++BYpJA7Mgfb9VP7FxB9T3QuNwZW9WOT6RJSqy8Fi9p7uiCHfwbWL3vSR4SVwUyT6upX2/6VU0F6/crg1USABWtOfFN7v0us3O/DfWDdqDMTrM/yLD2kzuh4DCH0ZZefWSG0bCXXNWhF/wfyS/uxPQF2E3xWt7PmEeclDienHx1ZEQaw2MY9XYlwY/92ixR8/V1RKaEZkUF5D4G5h5J0r4HpK/ml+/Zrs/GFyww2gpj4wouoq9CIA4OJutB3y05bwoU/Ao= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:0uQG5cz66+zoaU+MKIvizxKxOjH1cU4uAk7dW3x6NALy5HJ1nfS9umATgXV2+kHxA69wbkqRNtO0t5jvt2RsTaM3rea1f8icaIR8Xt/N6070DKqIQJp5o6tZW6Eps7hz3tQXyjMwDEHHJbUa4WbwWGEP9yaMVkvij80Q1ZIZ8dI= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 16:22:35.8905 (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.91 Subject: [Qemu-devel] [PATCH v3 11/13] qcow2: allocate image space by-cluster 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 If COW areas of the newly allocated clusters are zeroes on the backing image: (even if preallocation feature is not used or it cannot detect if the image already reads as zeroes, e.g. writing to a hole / preallocated zero cluster) efficient bdrv_write_zeroes(flags=BDRV_REQ_ALLOCATE) can be used on the whole cluster instead of writing explicit zero buffers later in perform_cow(). iotest 060: write to the discarded cluster does not trigger COW anymore. so, break on write_aio event instead, will work for the test (but write won't fail anymore, so update reference output) iotest 066: cluster-alignment areas that were not really COWed are now detected as zeroes, hence the initial write has to be exactly the same size for the maps to match Signed-off-by: Anton Nefedov --- block/qcow2.c | 22 +++++++++++++++++----- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/060.out | 3 ++- tests/qemu-iotests/066 | 2 +- tests/qemu-iotests/066.out | 4 ++-- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 38aee65..852b3d6 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2037,13 +2037,25 @@ static void handle_alloc_space(BlockDriverState *bs, QCowL2Meta *l2meta) QCowL2Meta *m; for (m = l2meta; m != NULL; m = m->next) { - if (s->prealloc_size && handle_prealloc(bs, m)) { - if (check_zero_cow(bs, m)) { - trace_qcow2_skip_cow(qemu_coroutine_self(), m->offset, - m->nb_clusters); - m->zero_cow = true; + bool preallocated_zeroes = s->prealloc_size && handle_prealloc(bs, m); + + if (!check_zero_cow(bs, m)) { + continue; + } + + if (!preallocated_zeroes && + (m->cow_start.nb_bytes != 0 || m->cow_end.nb_bytes != 0)) + { + if (bdrv_co_pwrite_zeroes(bs->file, m->alloc_offset, + m->nb_clusters * s->cluster_size, + BDRV_REQ_ALLOCATE) != 0) + { + continue; } } + + trace_qcow2_skip_cow(qemu_coroutine_self(), m->offset, m->nb_clusters); + m->zero_cow = true; } } diff --git a/tests/qemu-iotests/060 b/tests/qemu-iotests/060 index 8e95c45..3a0f096 100755 --- a/tests/qemu-iotests/060 +++ b/tests/qemu-iotests/060 @@ -160,7 +160,7 @@ poke_file "$TEST_IMG" '131084' "\x00\x00" # 0x2000c # any unallocated cluster, leading to an attempt to overwrite the second L2 # table. Finally, resume the COW write and see it fail (but not crash). echo "open -o file.driver=blkdebug $TEST_IMG -break cow_read 0 +break write_aio 0 aio_write 0k 1k wait_break 0 write 64k 64k diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out index a20e267..290ccec 100644 --- a/tests/qemu-iotests/060.out +++ b/tests/qemu-iotests/060.out @@ -114,7 +114,8 @@ qcow2: Marking image as corrupt: Preventing invalid write on metadata (overlaps blkdebug: Suspended request '0' write failed: Input/output error blkdebug: Resuming request '0' -aio_write failed: No medium found +wrote 1024/1024 bytes at offset 0 +1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) === Testing unallocated image header === diff --git a/tests/qemu-iotests/066 b/tests/qemu-iotests/066 index 8638217..3c216a1 100755 --- a/tests/qemu-iotests/066 +++ b/tests/qemu-iotests/066 @@ -71,7 +71,7 @@ echo _make_test_img $IMG_SIZE # Create data clusters (not aligned to an L2 table) -$QEMU_IO -c 'write -P 42 1M 256k' "$TEST_IMG" | _filter_qemu_io +$QEMU_IO -c "write -P 42 $(((1024 + 32) * 1024)) 192k" "$TEST_IMG" | _filter_qemu_io orig_map=$($QEMU_IMG map --output=json "$TEST_IMG") # Convert the data clusters to preallocated zero clusters diff --git a/tests/qemu-iotests/066.out b/tests/qemu-iotests/066.out index f94aa5c..81ef795 100644 --- a/tests/qemu-iotests/066.out +++ b/tests/qemu-iotests/066.out @@ -22,8 +22,8 @@ Offset Length Mapped to File === Writing to preallocated zero clusters === Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67109376 -wrote 262144/262144 bytes at offset 1048576 -256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +wrote 196608/196608 bytes at offset 1081344 +192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 262144/262144 bytes at offset 1048576 256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 196608/196608 bytes at offset 1081344