From patchwork Tue Jul 11 12:40:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Butsykin X-Patchwork-Id: 9834665 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 1D5B460363 for ; Tue, 11 Jul 2017 12:51:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C5EC27FB7 for ; Tue, 11 Jul 2017 12:51:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 004AA28458; Tue, 11 Jul 2017 12:51:14 +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 1C5D328462 for ; Tue, 11 Jul 2017 12:51:13 +0000 (UTC) Received: from localhost ([::1]:46180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUudF-0002Bi-2V for patchwork-qemu-devel@patchwork.kernel.org; Tue, 11 Jul 2017 08:51:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUuXY-0006N7-Kv for qemu-devel@nongnu.org; Tue, 11 Jul 2017 08:45:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUuXX-0005mV-LE for qemu-devel@nongnu.org; Tue, 11 Jul 2017 08:45:20 -0400 Received: from mail-eopbgr30108.outbound.protection.outlook.com ([40.107.3.108]:53030 helo=EUR03-AM5-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 1dUuXS-0005jN-Q2; Tue, 11 Jul 2017 08:45:14 -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=PuY4510fCSWr1kxNa6/8Gpwhx9obY0+R6GTikA5PEVo=; b=he+Hxnh8/HQpJMpeD392K5z4Z2qm1/hNkE9VFDBzK35pcO4a3tRERqFT/UZalFExQO1wADqloK8T14+ngHu2p3gmyO/K3L/l6mcRroz/1j/IxU+4VIy6Au3kixeTud07xKZ4yW2BNLqAgUBpcoRCJ8OAaXU0TYQborf4Gq41r7E= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none; nongnu.org; dmarc=none action=none header.from=virtuozzo.com; Received: from pavelb-Z68P-DS3.sw.ru (195.214.232.6) by HE1PR0802MB2555.eurprd08.prod.outlook.com (2603:10a6:3:e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1240.13; Tue, 11 Jul 2017 12:45:12 +0000 From: Pavel Butsykin To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Tue, 11 Jul 2017 15:40:22 +0300 Message-Id: <20170711124024.1396-3-pbutsykin@virtuozzo.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170711124024.1396-1-pbutsykin@virtuozzo.com> References: <20170711124024.1396-1-pbutsykin@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: AM4PR05CA0001.eurprd05.prod.outlook.com (2603:10a6:205::14) To HE1PR0802MB2555.eurprd08.prod.outlook.com (2603:10a6:3:e1::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b30217d9-02e1-4e89-12c9-08d4c85aac7c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR0802MB2555; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2555; 3:uebAV3nkZWYYHCdttcVQKyGqcnHL1mS6WX9ALyv4ocK5LJrMP6GZFGKNw6mUMT4CETW5XylgrJxClL9qvHigjt/JB/y2M2KWOSVQ4qzVkX6Qx7R4a2ZB5rmZkOiAsC0db/I+5qihkWnSyFIdrCQgC+9Y/Grh2MbO5oNNrY5DJZH2wF/MAOiqTAjZGPSpbI1H8n6LclIgihqzpUObNFP02XGLqItKdLknkhIvFxI0BR78RyrBA3IJA6Rr2m560UZfNKcLI+pHiRazLolQ0dU2dSmNVMhkIK4yQEDedAf0hQU+VAMjZR5FoiiSLtOfhn8044vExpSawEx+wEsbDMY+oCgmemTlC7hPP+uPhPJC2D0KGTsN+Q8CxR1zrqo74HZn0fQhhxvAlvpxEhEsHlFqiE/jQfBSNFH/If0SXqDW20krmbD7iW0ha6HRwmrXCv7j1fTuuMrX6WEoIDgW3fxljE2Nd/mpZT3Ec54EujifzHeFkru6XVV/foOIPqJ6iQ0QsfNFsligGHSR+IkPnyFuM9hnyitJXP26PUrmScGHoSLvLBR+ldBR9J76rv6Fu+wvP4W75e3ZNLcwSx9nhvCcrpnfnbTccRmQpiqU0FbgcZNNl4iNlwnpwedQi3kU0Ofqbb9ow9yL/GxSeewjUptgxKUInPJdIVxJeTcLCN7pyYv6IzO7JKpV42AwiHrzUmXmo00SdWJVHtw3M1MuHUPUmYwdgN9eHk62iVeXIROZB+4= X-MS-TrafficTypeDiagnostic: HE1PR0802MB2555: X-Microsoft-Exchange-Diagnostics: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VS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123555025)(20161123560025)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0802MB2555; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0802MB2555; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2555; 4:1CgpcBHWCB1V3gICfVPUXx51FRKZkV3Nlr/pQ7kb?= =?us-ascii?Q?hQkEk/p49nkCsERtmn2Lx9ZWxmy0q4UcyVzY9y++rgrgpog0Gf+6P8NWZzKI?= =?us-ascii?Q?lV+nBn9NqLnY2HM6TuVjXZzj6PRHSWDjEE6d8ShdsW9NXhT1XNp4l8FsKhxp?= =?us-ascii?Q?3QtN8XDI0/ggm99wsnh7IB3L7ykIX1l1kohpiXEhHjGYsCExTssArXnhyqbk?= =?us-ascii?Q?8F1tEIrnz4srCXR40oJ+rnbPOPF0V0lIdFxvjwy5Bq+iQw7eZm91nPB35kD/?= =?us-ascii?Q?T3hg9GF0P5+/hMmmM7AFQm30q+mCvocR5DCSY5JW6wVMeyg/xEuNTXiY7LMz?= =?us-ascii?Q?DDa1Nc8uZNGvovO3ddRSz295AodI3S2SzSNiI5e8A5IjSvpopiUkJk3nW1rm?= =?us-ascii?Q?w1XZLN1AuThWagALTLHxqEHltPZl65H7r/0VU+EhiM2dgtlM3uWO1EBzDIqI?= =?us-ascii?Q?jLaYzEx6CItTSUiMPo/TxOIsoCLE9CHcE44H5bc2Wh0ew7dHJwn3lgKvQTf/?= =?us-ascii?Q?R37bfhWy2rL6dtcsSFMBYDY+V/QqThhFMFgTliZPWnWcHp+th38/Z/mNTSy6?= =?us-ascii?Q?c7A4OL8vM9YR82rk+cyY/WDQf1znxVtVhtFn1xUcpSlLdGtVH+lObvWmr4Hw?= =?us-ascii?Q?Hzh8qF1aBYcgtBQS/fb+7CdbnsZItyqSHGx3z/OPk6jLrt5sHc/zzxshsiwD?= =?us-ascii?Q?dtBGTP4opWOGDE7++eGjuFuQaQ/X0aWwT0kGa7iAzHn6GoS2ziZ+wNeeGnbn?= =?us-ascii?Q?lg0CMp44mOeXb4qJWy4hmJ15aYVgteMFr3yFKyJuQ9lP8nQ2qxDbCDh/NbKQ?= =?us-ascii?Q?eWMcEFvDkmXn4/cP1rvA/Uyk/7ejxbmgYlGqcz/dfWv04Vqzd5VDPfj5D8SL?= =?us-ascii?Q?6QAT2O7cbOBDXCdNGtQU1F+xAVB7VkkC9D8PEKXNK6e2u16EU9jcrZCWHPwX?= =?us-ascii?Q?l6q/vlAokLoki9+QG/Zqp4OkD4Dhajf+zRaSfI9n6mN15e2MD1o1W/4ZrS6V?= =?us-ascii?Q?DziFlUYcA9rkyIp8isrDlRNzUDJgzAAu/YcskZ1t5SbgWEJTtYPk12wJHlBj?= =?us-ascii?Q?Bh5Do8XfZswaAZrT+V5I2/mQ6Fr31ziEs4kKaxBZWJhtMV1WthlRi4JtBckM?= =?us-ascii?Q?oSwI0+/hc5H45ZspDHn+92dyEGsCeUSa9GZy7VIYI1kZ9X4JuRA/9a3WNZuN?= =?us-ascii?Q?9K/nTRYheNiHLlF5ljAnUfMmL5GsJcRZPcs7QoJ2s7eFM3oeJRxSfDO2Q3Vx?= =?us-ascii?Q?CYxmWqpU08T+d7AWM4g=3D?= X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(7370300001)(6009001)(39450400003)(39830400002)(39400400002)(39410400002)(6666003)(2906002)(478600001)(5003940100001)(86362001)(5660300001)(2950100002)(36756003)(8676002)(50226002)(1076002)(50466002)(6506006)(6512007)(53936002)(6486002)(50986999)(48376002)(76176999)(7736002)(6116002)(305945005)(53416004)(3846002)(42186005)(33646002)(81166006)(7350300001)(4326008)(25786009)(110136004)(38730400002)(189998001)(66066001)(47776003)(107886003)(15760500002); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0802MB2555; H:pavelb-Z68P-DS3.sw.ru; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2555; 23:35KKNuMnrsMo4BydL6+vsyDmeJ2yEL5c9cLjfsC?= =?us-ascii?Q?b6NZpALPKJvzi2F+sruRXUrk5DV7Uhu24+5hhRACEhxSZ7xh00pMGRJdki6h?= =?us-ascii?Q?6FelY/1Ur/0VTAMDLhfPn/fGfNDQH0QyCvosrfkSNYFOA7RNzdS08Z0E1h2g?= =?us-ascii?Q?1OdGhiNwwTqajBCujN89rG8g73KFbhJ/K6ZHLLtZBWKRiN5AVTqmAH7WBYqz?= =?us-ascii?Q?FwqZE38dYqrRIPnnzA3PcbEsEj2m6gRoUfq/hYoy3z3zLuer7kzhxHpSlZkL?= =?us-ascii?Q?U921VEx2GkTzbT+xIWIxA9ptnpQsjbRQc50rqNVv7UFyIWVTgZKlMJRIypRv?= =?us-ascii?Q?9Krnm/KYJZ/QREe4lzUBRNRxlsLpqcL5IcYt8w8nwl7hBArSGdxP7XSLqGQQ?= =?us-ascii?Q?XlKv8E9iQiI4acV5/JFXmNLZNSxLFW+pD4KHga8+HdcdR6u6kZrY6IriD6j0?= =?us-ascii?Q?0/sNjyjgoZMqSfPzkByDez3Oj4aPNkAMvypJu14+CG6NMBUndRMIPyQBPBdh?= =?us-ascii?Q?KKH/lKrjBoXJs9btWPTsz1TqAkk0g0z5pUVBZCqzFKBnWXTrRxp8s3aPPFfJ?= =?us-ascii?Q?TgnPP6pyadWtrIyNLexum9CMlChcdKuXWL78IJtrRZiudQwHQ3OXbowGd+RM?= =?us-ascii?Q?TuSbTR4iiPOqPvc9bWweY06pJh9EN/BzYiTlZcCLRyHeIyuJjjL+oFdlHAeO?= =?us-ascii?Q?Fr2LigZOsrDKwseL2eSiOfU6p8ecPi8OS/51//9uFIThszJROkkrD/GisUzY?= =?us-ascii?Q?bqayHeSmB3yYPpw3eReUhQhqeDts+oXw0Vj1iVBMWd8YqY2Go+Fkm9oH+8oX?= =?us-ascii?Q?o9By3jIRbRAsmrPL5TxGaKWkWCjGwxH69q8DUWwNS3erXE6teC0shb3UPEKr?= =?us-ascii?Q?luy6/HnPkoN0h489qvbExpJK/uyHc8uYqVRYCKebODOwwIyV8cgNww/mI0Ju?= =?us-ascii?Q?Cli58JCku7tTV5u7yv0ctnaDGQX65e0TED3fQZ0flvxP0vkCYwCBluPqDGsP?= =?us-ascii?Q?/xMRxaxvcw/H1VkAcrOY1Ve36WuLYeE3boY2I7j4xrkIm1SGC2knllglk0EL?= =?us-ascii?Q?Z0p6r1HwdZ4gkTojRwzSZ5A6jSjkI+BlQXp0gWdhqK0Kma46eNHEUh5Npkol?= =?us-ascii?Q?SyiMPQ2G1B4k=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0802MB2555; 6:6C4Xr19U6AeCPnu1IietClo3WPe9qW8Rr/7lTaUF?= =?us-ascii?Q?rmLcPlF4P7MeltmDdX5gXXxKwHAj5+Pr230eF8qC2YdHtoUtcTLxjB0R9Xvy?= =?us-ascii?Q?rqObXa9aN+FgS7Tgz/G+QojIo1uRAqp2Sbua3I/va1NQha8os/xjAN8EJ0qz?= =?us-ascii?Q?QMymcUOBPlZKrXCnwczvAy7Vc67umcLinA2nwdMAs3cSLWHjIOQD8DjEXJoQ?= =?us-ascii?Q?PZYjpr5gtJNVMjcFk6/AJ+HPw7v0N8QvuQfcCGugcF9AuadMX8iWMYZ8FNy0?= =?us-ascii?Q?5g+64txvlOqbcZZUqzKKRkJTxPfBqRASYp6E8xrPhQWIvQKgwzFGfXfPVwuZ?= =?us-ascii?Q?SntrraQFkB+G3txRU8jqszXcBm6nTxOb+3PrlnlLaD3CnpNsO497v1F2kqY6?= =?us-ascii?Q?ugoJi305NzWWOwZnQqMCA+VvNwmFk+ovFFjlVkLvZJythZj+QK6LpykISZaG?= =?us-ascii?Q?gCV7molA1QPM78sENqORXfw5vxm90UMII+1nleETAFVL7Bal6YhlgwfT9Te5?= =?us-ascii?Q?sHFdCU9YV/RuSiQoKHldE1nbgUmyq2XkrWTjJhsIjDYuFVQgTQnMTQGjM/Yc?= =?us-ascii?Q?Ys1a14RpWLVk7TOdCfRT2/8uTR1XXoD6kMBLXo+/sOg8GmJnXMqXf1l6xic5?= =?us-ascii?Q?8yQQazDL4iuq/h0tvCqag26OMgt30T514tDnrEGB353uWxIOCHtbWOyptxte?= =?us-ascii?Q?b+bkN9/3VEcy364nHwq6/V5wuxPEEDoXahB7aNHfU9MgM9ISTRG3dJP4PbQO?= =?us-ascii?Q?y8h61BPLuisvfprtVDleCyEqC9eaS4TEaY1r4z3VFyKFj8c85e9Vjvl60X8F?= =?us-ascii?Q?lyrv1iaD+93Slkqco2xqhS87no+spVToegCR6vECBS2TevrsZXCs5cbqUnuJ?= =?us-ascii?Q?izt5hbZt3lQzijn/t0aoDVuCw5aOVDVKjej/fWnEf87uzddLvhGlxiLnl0Lb?= =?us-ascii?Q?Qhaal1SeH6U1x3B41FSE1Z4noVQrANT6wUIU8lkIs2w59efWYM1qj6uKbxxU?= =?us-ascii?Q?5n4=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2555; 5:5TTWnDslYIE4epCuFrl8xmTg41JQdP3Iv7cSRW22EPWyTz92TYv5BSeMvFK93b2UQRrBH8uDTY48d3OePXdBR4AWyCxmxruPtylL0bWW6/xxypPixcBHmRc3qOeY8fXfNTGAOe/hvfMltmvtKDOUB2o2Mqyk7eZx4fby05lyVNd4Awo0azV5ZpHms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CLhYbZgBYU43jK7QCKluLaeKqNwZMp3zQaKQayPMrocMrR0qWpB2El0dpWxcb0NxKTS6bq1ga6VzQp7E0xIv+22FQ5JUXosytbefQtLvPQ5yw1DBlgPLVdXBeZGHACh/xet0JZc+XvA7Id/IpXaTUoOpV+AaA2ZOp5S6k7jYIxEDk5MbNmCorsfQnREU6Jz6+r44iIEP9tyWC8eHmpyXRpUzb6MXQ/TKA7tZhwEGYywn9tapfghbNG/q9/OWHJs= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0802MB2555; 20:uG/POCyIXd/GrV08QgB8t5oIc7dZBxJk991IFAy9IztoCJ81hVXxP0DmdBUbSbwY0Fd3I1qYSNK8lysmdwQue4ZHcZ+cCpweveYrAs+yMTzMgm9DCFlZv2+u8CyuuaVhoEKnuALDG3KI3vH29UjAGYg2QPy+GoIsO7D9pGFhyj4= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2017 12:45:12.3600 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2555 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.3.108 Subject: [Qemu-devel] [PATCH v4 2/4] qcow2: add qcow2_cache_discard 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, pbutsykin@virtuozzo.com, armbru@redhat.com, mreitz@redhat.com, den@openvz.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Whenever l2/refcount table clusters are discarded from the file we can automatically drop unnecessary content of the cache tables. This reduces the chance of eviction useful cache data and eliminates inconsistent data in the cache with the data in the file. Signed-off-by: Pavel Butsykin Reviewed-by: Max Reitz --- block/qcow2-cache.c | 26 ++++++++++++++++++++++++++ block/qcow2-refcount.c | 14 ++++++++++++++ block/qcow2.h | 3 +++ 3 files changed, 43 insertions(+) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 1d25147392..75746a7f43 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -411,3 +411,29 @@ void qcow2_cache_entry_mark_dirty(BlockDriverState *bs, Qcow2Cache *c, assert(c->entries[i].offset != 0); c->entries[i].dirty = true; } + +void *qcow2_cache_is_table_offset(BlockDriverState *bs, Qcow2Cache *c, + uint64_t offset) +{ + int i; + + for (i = 0; i < c->size; i++) { + if (c->entries[i].offset == offset) { + return qcow2_cache_get_table_addr(bs, c, i); + } + } + return NULL; +} + +void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cache *c, void *table) +{ + int i = qcow2_cache_get_table_idx(bs, c, table); + + assert(c->entries[i].ref == 0); + + c->entries[i].offset = 0; + c->entries[i].lru_counter = 0; + c->entries[i].dirty = false; + + qcow2_cache_table_release(bs, c, i, 1); +} diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 7c06061aae..0141c9cbe7 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -767,6 +767,20 @@ static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, s->set_refcount(refcount_block, block_index, refcount); if (refcount == 0 && s->discard_passthrough[type]) { + void *table; + + table = qcow2_cache_is_table_offset(bs, s->refcount_block_cache, + offset); + if (table != NULL) { + qcow2_cache_put(bs, s->refcount_block_cache, &refcount_block); + qcow2_cache_discard(bs, s->refcount_block_cache, table); + } + + table = qcow2_cache_is_table_offset(bs, s->l2_table_cache, offset); + if (table != NULL) { + qcow2_cache_discard(bs, s->l2_table_cache, table); + } + update_refcount_discard(bs, cluster_offset, s->cluster_size); } } diff --git a/block/qcow2.h b/block/qcow2.h index 87b15eb4aa..bf6691dbd0 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -604,5 +604,8 @@ int qcow2_cache_get(BlockDriverState *bs, Qcow2Cache *c, uint64_t offset, int qcow2_cache_get_empty(BlockDriverState *bs, Qcow2Cache *c, uint64_t offset, void **table); void qcow2_cache_put(BlockDriverState *bs, Qcow2Cache *c, void **table); +void *qcow2_cache_is_table_offset(BlockDriverState *bs, Qcow2Cache *c, + uint64_t offset); +void qcow2_cache_discard(BlockDriverState *bs, Qcow2Cache *c, void *table); #endif