From patchwork Mon Jul 31 16:21:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 9872433 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 006C9602F0 for ; Mon, 31 Jul 2017 16:26:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0BA328068 for ; Mon, 31 Jul 2017 16:26:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D57AF2808F; Mon, 31 Jul 2017 16:26: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 E3F0D2810E for ; Mon, 31 Jul 2017 16:26:46 +0000 (UTC) Received: from localhost ([::1]:60528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDWo-0007J9-3Y for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 12:26:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcDSl-0004oC-Bf 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 1dcDSk-0005Qo-Cy for qemu-devel@nongnu.org; Mon, 31 Jul 2017 12:22:35 -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 1dcDSj-0005Kw-R4; Mon, 31 Jul 2017 12:22:34 -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=19svwzNLvNrPW703QH0/6a3fFsRh7gJ0RLeECMtqxbY=; b=Ls58sDza/SSMvwLWjk6kQQdKbx8kU0ZW6bK3YkAkaAN1CYene6OJqtncmGWle1z3cVMXxSZGvxJMQtIsX/lqz1uABaU6uTmQ5Ao8jV/hPGPDOrubIL2uTmlpdQy4Zn6yFUCDIOBvg33gVnhlR23KApOV4S1keekv7+S6Ae+Ceeo= 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:31 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Mon, 31 Jul 2017 19:21:59 +0300 Message-Id: <1501518125-29851-8-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: 82578ac0-221b-486e-9efd-08d4d8305880 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:oJFcf79zumzzq2jQshWaLyvxNU0FGnXNOBUg041viSUl03eFR5viasK4LhgMo87se+qzsw/sC4tTgWnRrUYmOZtoqcRyHbVrbYpZn4L/gaibzqsiEgPGkz2Gqn8Q1Yeg/a/RenJF6GPr9QIdz8aXLs6sLaQzELcOx4kA5PHy9sZMCLIHgHeUKfnDyDOFpB/ZsABbcR5on+eZXMpN8Zgb+PM08pZ/APCNJzvCi/I4vB71L47ejXhtHQqhQx07pLqkaKlql533ndY/q7gzw2ieq0FCtUqB96zjivYzdWDQ8AYzBSn9Utoq1zoxnHrz5p3TNxS8crj89zZSJrNqSUzMkH2lDNkQwwv9JaqggTKtAW7khZfDrFbRz6y7hPq+ukyjr68Mj0DCE8PPKhJr4jMCMvcF82LHnrw0yDtDnvIQQ7DQeXMIFSd4QrRKLT945l2YifUbOPiSe2+xbJz70tl6eAi0t2xhz9mj9+wyGamAJnhKHw3EvN25mHFodGuZdenw51t73YXjqmmnCKd+qu2FaF/Ie015S5Valpab8H9tmlxnVE58l22UeUopQau9qoJrEl66Q8RZhjto45SZQKRRfZe1DSKw8JjR1OH0EVyqk0xJObyjJDQE+XrRjMnpD3EUpDyUfuDNj7Wue2iLkdD1m3LT/xpNArEcZENQZc9VKKwb9yb4iQ9PXrEqKnBVjIAtB1FeroCt9bt2NiGojmZ3SvqT4BwoapYBA0nAeC2jz84Fpp/LVSx/pGHJUEDAwUR8yVb2XRtMlm826F9tt5vb/DOl2jeKT9aE0cr9sNLXWp04guHJpN4NuSQt+cOan/i2 X-MS-TrafficTypeDiagnostic: AM5PR0801MB1987: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 25:Fp/T0xQwgAnWY/AVbVXyVbJhg/NUV3/dl4SHP2kscMqxrjz68IsjFVL31qwRU8jN8skhplkaiAn2Jh4QpueiZiwZzZIb/fKiJ3bXXtBBntlOO3ORdscrev+q/4Lud+2v2xifDDqCxkCoJBtgvvzrrmXWxU6r5XKAZYkcLrwGIhgmGTSqYjISG4nRuq+Ha0+tLZ1qwDWlosbOTQ9RLAJ7Q+K7bndghZ7a0YkO08L9SDTP6eCIzrlSxmdQoWTDt7j8lKacoqn2YwslitfImns/9Cj7ui4GxiwGT++1wrOO7FWbdLyugWTfUTvI68W8E8mrGlpb1hg6jVgoZM1Tb77QTDYuQZweOrN9/ZGiAxGxEGbBXQDI41jnCdPRoar4zUUiJfgaJY01o+UnF/TmQBUP359kY0cLV3WoWnI4BcLOzp8yvLtsTXnTjOi1IP1az+QYscobDjrbRLa2XReB2dHfBaawVH36C9E7AYqx0C4wAuRlrgUbytmyqK5mQxIEt5ICDJnmmbwQjuRnhW6i7AkPbVfKP2ia4fiag9FRiY4jZ/pejzbmO76Tii0HobELATw9s/y5m8fHqGwqdlwc0LIJmp5WYhba+JyIO6vGks5fEJMm7e63XpIosmgN9EeKlBbbyM+O0qHKLXPScfuQiSWuzUj5Jz6JTy9bhiIF95dD7ldOYdERQMyqcFksrSTMX19X98Hg47yCm6LTeV7VFWFmfgKLgGpIlperMebhpXoGwfoXSFXr/3LX4fMRXhfuE69zLqfzxjh8UaWJA4xjKAFQFL+RfAY1EqDY1SgxSGaPJOgDJitIDJkYUtaLcpsRZpLG0b5oqFnHx0Z9XO0VY+xTQgL9bTaDfMDwWpewkiBZsZB6zcdlX3A9VRxgqhowMLRG+ZxVjMQ8GFCCebPoc7du2WEKkoXfWJuxMCz685kEfqw= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 31:ga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4zKSV/gmZU9XTLO4CXPR1TlUtNWra4hmnYGIIJ/dKefUxpEHTJjV/E9ueTQfaJvTsXc/O+wANAA7gp+5wY2J2kkkwkoxL9AlifgPqsF5L+JuV/m4aqHmviWr0X0g= 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:xhCLkSMIBAj44zdMYUmtg6xPrU4Yetq+l87zmbun?= =?us-ascii?Q?R5DmSGz3Ng8ldHNNg1qRh1EzaLs6EBeQ08wNxGw4FEKkRHHM4ux9aRk17bC4?= =?us-ascii?Q?Eq9EV/ht8y0hlOX4Owi/cc9BnfqbvUQ0HUuwTLYSOPCcDm504bO/Lu9MY5Z+?= =?us-ascii?Q?wO4ieCvQ191M1AdBQ6PD1LiQyPR0V4DjLtVZfK86kxFReJ+p35c2LnY1FCrv?= =?us-ascii?Q?xyK32SrLGdZ4NJHPtJWd6TUPV/nHdAQUJMHb5S9ppqnTgpaL5iMXgctZhRPj?= =?us-ascii?Q?OszvArRnhLX21W3qUcpnS/Jewo2tJl0yltUO6eDgcgkLBE1TKSKxIbY4QUz1?= =?us-ascii?Q?JZfTUu+YyCWepPjKitZTvleBMj2DzFX4zx7PgcycBocI0QV1zozHxCRAq6bY?= =?us-ascii?Q?vAubjXX7jteM4986EeZSYFv3qETMbltMKBlcAbTQ3cFYjAbO53m+WUCS2SWX?= =?us-ascii?Q?u7XMYsN7kiEZEFKoB7A4/iEmYaWWhJXikV5cnYfM0WTjKCpdj9hIrT5hHvme?= =?us-ascii?Q?VfU2HyclNBrdvl+vE2ZIgw0LKVFJEGvSzEgVd9wla+fof/VsHknhxF3oiBX7?= =?us-ascii?Q?fBxkOAAV67mhSDCysEvLWRLGEccnhsMwitp4FZoI/9r4vYyC1xLJejCqz9kJ?= =?us-ascii?Q?tnXcWzst3NPuebSEvYk64lI0RXRKGIfAGjy2C2LQiZrHdUtNLpQOzWVyahzf?= =?us-ascii?Q?szgsorugGZYQEv/J7nPgZ9ZiyuaKbF7UeLURuUtJ4f71c7u5wirwlVvOeROq?= =?us-ascii?Q?otL0T9A8f7TgMLLVNbwhiwoO4cgy9n1256nJyGzi8joWLsyuD7328rZ/a4Hl?= =?us-ascii?Q?7EaGe1IDoC5ijEhCugbSPwMYcqpO0UFNSlc+bVPQVaSXAigD5/e4DyUI/K6Z?= =?us-ascii?Q?yTEOj8NYAOcqXZ02cQrUpc1HqZ5hu6ssY1eBGqg4/D52nkbzDEm6yA2Ze7Na?= =?us-ascii?Q?LIr9Exb57e47yALJ6RKVwCoXzVhmhAgNc9U8/IZvpn5Kwc8pMPaIx0N5R6Wi?= =?us-ascii?Q?rhSh/w84EYYtbZVk/uiiimdIc9mmok/RRK8nvWhyplVmMmEpyE9ycdmEDINE?= =?us-ascii?Q?6ZOJg3aqWvwhnF6ED2zZoWY3xcW3ytsI5mvoxn+FyYA+mwWGJXvrgyTHoti8?= =?us-ascii?Q?l3vKLpy/JuDBOqDBdBGnFzNgVFniXNG6?= 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:na4rXlfRXKf7sseFNGklqV2Oh3WSBg5jyW/rwWE?= =?us-ascii?Q?6hv7Bbaua7cKUpWXGz1ykhdE+GTepCXDn/kSzQcG8cQoRCp4/kjwUIHgj+XI?= =?us-ascii?Q?94XlMnegEiKbzKHTRR6C0yc/PiujcILTorlFqFfYr/wzLygVQAqhr/JsXXrQ?= =?us-ascii?Q?YxrxBSrkwVlRNiolx/IWqz5MIDhIwS4C7qxBgsLZ8UsmVO88SvDhiHBUhPfL?= =?us-ascii?Q?WZdKum8XA5aBsMiK/l7LU7/itIq/DwQ++venLrTwHtiwQzNLjD45Tih2plWK?= =?us-ascii?Q?x0Fx2mCeR0AFoeb18Q00uZ99snc7CHUIwc1nXLkuTfXoksfzhqeIgcb6Qf8C?= =?us-ascii?Q?qBnbE26zCWXtWrOPSGPuXtyNbH5AVCbTroCm+ZdsqknS7xRpWyNJt7nN7FTH?= =?us-ascii?Q?91tGt++tW2vAxNUaBimpEB/SgIHxzE7sryWQgJUf71K93BYz7vyddFepMCBO?= =?us-ascii?Q?zNHHcAVVWCdZ1ZDKEvYsqjapJu0vKFRV0ChaoGJQ7LBAuv10tx0fBmmjXEW6?= =?us-ascii?Q?k9zamrCTybIsN/mmF4XEBuoR6RPzVYEJzygtd3YilW/mGZ75nsjh/l/2gVeQ?= =?us-ascii?Q?BPMGAREoechrYsd7uUXTLrLSujz2UGBzrp51danZEcKCLmBskXKRifEI7YnR?= =?us-ascii?Q?yw4bBUa2u0x+fOM+1jR2yiOzf8A8u/PgzXUXRd3xoyG9DyPQZ3wIvLg3ESMF?= =?us-ascii?Q?T4Q9VeTMjnUW6VoLY2id69IO+urkceqBbTmBilfXIdT25OR6LiwZSZE9QY3m?= =?us-ascii?Q?uZC8DpBc7/GhWJ3dy5BeKGDWNqgAk/up+akBgPPHwy//f37d8G4f992qf0/I?= =?us-ascii?Q?G6Gnt7p4W4N0u8st+xJWqEpJ5cNPzkXIbNzRuzaHZez2UA1Rgtr6sVAj2116?= =?us-ascii?Q?kuqJj+vmgmS9p8OQi8x3yNiA23NEd136Aeh/L1oebj8k4Z9W3pgi6r0fJPvf?= =?us-ascii?Q?JjwlIH4O0tPDWHANHZvvvB8bmMUUZSfi23rmueZh+t3a6vztAy37x179lGzA?= =?us-ascii?Q?XaRdGGmNciH1O6FdrYBRgflx/C5mDStjLBFL9Df5NBxE2eYY2s1FUqNFVdiS?= =?us-ascii?Q?JpsUP3D6stDw2hAglsmefQXzcppR6M/eijFc6IDfWoaTVeM9tKI15k+XBfQW?= =?us-ascii?Q?Jx2LgmVTQb3MvMaNo8EcCXL5KW/dDNeTNdw8c5VVkpC5VGKXgp2+jtt7hbcW?= =?us-ascii?Q?3cOFDe3yakkXbCmb0jkfJ7wfpF+TFpCo+ZLW3bnJtXN/qDLv7wRZT5msGs1S?= =?us-ascii?Q?MX188378WXlwzKfO+RFQ8BEvVnAwsGzJzp0VtNPuPMhNwLZEKuMJpyACg0Ol?= =?us-ascii?Q?HsALzJXAXidVjH4MSh9IDFwfY+USD9rBYe7w2JpzaXaBB?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1987; 6:DKz8+6HHAeBUI6yZwNGqG9pPjM3Vy8wquhiRju2m?= =?us-ascii?Q?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Ua2Zha0uLsmP+EhYtca7Ac6Hvu7zQ9yRY?= =?us-ascii?Q?5gtdNV8HlsY7HsybjG+34esUgdBMOOUAIBRgQTsLjzb52tAoEv7NvNpM7xN9?= =?us-ascii?Q?cNc=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 5:OF6iYv7U5DgvD11nwcRozV+SZQB9reDHQW6YbPJSJI91UwSTPT+keytu+z+lvUdeuy/glZmGsVKYReTIgaRVbH3DUEjKJLWid1GEqCFwPtdOlcX1LakQqsdLCltjXifYTDjNrKOpiwf+HIPmBPF4UuALbjHHz+7jp6Zbw99wfzLQV3irqxjYTY1iq35UGNR+ObnlUUkxOUrBnYE6hTnJXb4pl6a5ogC8AayTCnY4rOmgYiddZDG1eIBoC2GsjMP9CPl06dZgphgiFLUkY0HE/fNnR0smfEAchRln2UA6rbXoiBJ4Q/HAmXCn/HYvfmql65iA0sVP1esH3jw3BC/y4dcQaeN6wEOEEZOenRXOq/p9pW55NT6d9l6RoH6xgdZn8pEYBOdh7NGCYgROZ9mGR2QqD9aeQaRjSZbFV2VcT9sllSB7qogFlgLiSJQZ8clMFFlFzyJavQDrv7h4Q1PfKWtyzjpn9pN+fOg2SQz6L8yPu4xHlJHaT+FKxqTTvObd; 24:RyWgI1FzJ9MMSRAASTk4sIEOrJy9fu2CO5F8vfMeYkanHZ036fyP7bZZQNxgy9sNgBnnY9Kp68TJu/qnedKBioX/irq3Mvzbwti4FjXcNAk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 7:iLzEbqfAEwHPnoYmXSc12iWScShO9Mi03zpUmVfYTKd9ily/KF+bqxhbtX7/tpgOpsX6Wh3UirQK7w/2YLqCMCw8/OWZ+GL8FmvjSTBP6OImUUxp9eom6aImXTYG56aPImsyha4ieZ7UP/0JUlqLdbWTzD3c0hPpzpzwnd6Wpwt3ZnKf/iAf7rkbF0qSRfoGW9anuVRpsYFYfs73diyr2/7cecSTj/h77ImVYWzkVseg9zqbIkR2+auYtd3D1JDenFY7DmCWcyc5GYA7thrd3n/HsQ4OFkfbVKmDuNptDuF7ivOPH8oKRZHWF98nYA1FgLf0HgvNM0k2HyMhc4QxgefFTJTO9eaT/iNOFtuDVz5VDoZpdHKE4BzsCJwrXm2mc9TxnXLhP4auMN5ahMLklGnL9fdcRamOlpKusOFPwoseUmUV6brI+c8iQW4O1B2dMXQa/MlV4LMKahKDO9vHQxgWsvoQluP4te5J1om0d7Yo29YNh6u/AY1aixIvgPnUXObg0nEMCKJVR7p77IHay81VWlzhhtEOOy/PFevlWF1rH/Dze6Jjk7koui5U1Y6pE/NKhhHJErGj3D9hMUoly2YV5n2EU5KkA8/9ZQSeymqUpW+SJBRkHntIdLj7FiDwwK9JeStI0M6l3wr3U4o1DFgUGLXg/73JExhlKt300iVFQiPuwYLtK+B7W5V0bs2Aq9q6L1dsGLciNAv4FT+xzpOyE/6arxdDbd2in2NE1hWtpnHoxaLWakgNwZB0A/lq6ShjN/YnpPdj4WZZDXr/7RZ4Q/B9l7o+v88dwix8DZ0= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1987; 20:xVxrGt64rt/aK3/FodFbzdFlAvT1019rMRP3Co09HmJzOS1t0aa9A2FRTdhhWkXQHRllteG6ZsF49CvBYhJtUlNB78UMo5+gUjJZ83cHogAbqUZVJlZASjRVzrKYqU5KC9O8dKlerSOX0G11pHhsgNWFxjNgF+07XjTtA2V+YB0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 16:22:31.2655 (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 07/13] qcow2: truncate preallocated space 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 could be done after calculation of the end of data and metadata in the qcow2 image. Signed-off-by: Denis V. Lunev Signed-off-by: Anton Nefedov --- block/qcow2.h | 3 +++ block/qcow2-cluster.c | 9 +++++++++ block/qcow2-refcount.c | 7 +++++++ block/qcow2.c | 7 +++++++ 4 files changed, 26 insertions(+) diff --git a/block/qcow2.h b/block/qcow2.h index ebbb9cf..595ed9c 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -330,6 +330,7 @@ typedef struct BDRVQcow2State { char *image_backing_format; uint64_t prealloc_size; + uint64_t data_end; } BDRVQcow2State; typedef struct Qcow2COWRegion { @@ -669,4 +670,6 @@ void qcow2_remove_persistent_dirty_bitmap(BlockDriverState *bs, const char *name, Error **errp); +void qcow2_update_data_end(BlockDriverState *bs, uint64_t off); + #endif diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index f06c08f..f274daa 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -2014,3 +2014,12 @@ fail: g_free(l1_table); return ret; } + +void qcow2_update_data_end(BlockDriverState *bs, uint64_t off) +{ + BDRVQcow2State *s = bs->opaque; + + if (s->data_end < off) { + s->data_end = off; + } +} diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 168fc32..69d2893 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -833,6 +833,9 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, ret = alloc_refcount_block(bs, cluster_index, &refcount_block); if (ret < 0) { goto fail; + } else { + qcow2_update_data_end(bs, s->refcount_table_offset + + s->refcount_table_size * sizeof(uint64_t)); } } old_table_index = table_index; @@ -954,6 +957,8 @@ retry: s->free_cluster_index - 1 > (INT64_MAX >> s->cluster_bits)) { return -EFBIG; + } else { + qcow2_update_data_end(bs, s->free_cluster_index << s->cluster_bits); } #ifdef DEBUG_ALLOC2 @@ -1018,6 +1023,8 @@ int64_t qcow2_alloc_clusters_at(BlockDriverState *bs, uint64_t offset, if (ret < 0) { return ret; + } else { + qcow2_update_data_end(bs, offset + (nb_clusters << s->cluster_bits)); } return i; diff --git a/block/qcow2.c b/block/qcow2.c index b11dc48..4eb17d3 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1498,6 +1498,8 @@ static int qcow2_do_open(BlockDriverState *bs, QDict *options, int flags, } } + s->data_end = bdrv_getlength(bs->file->bs); + #ifdef DEBUG_ALLOC { BdrvCheckResult result = {0}; @@ -2135,6 +2137,11 @@ static int qcow2_inactivate(BlockDriverState *bs) if (result == 0) { qcow2_mark_clean(bs); + + /* truncate preallocated space */ + if (!bs->read_only && s->data_end < bdrv_getlength(bs->file->bs)) { + bdrv_truncate(bs->file, s->data_end, PREALLOC_MODE_OFF, NULL); + } s->flags |= BDRV_O_INACTIVE; }