From patchwork Mon Nov 20 16:51:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10066761 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 7263F603FA for ; Mon, 20 Nov 2017 16:53:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64AB52940B for ; Mon, 20 Nov 2017 16:53:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5955B29419; Mon, 20 Nov 2017 16:53: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 BA72429413 for ; Mon, 20 Nov 2017 16:53:13 +0000 (UTC) Received: from localhost ([::1]:58238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGpJo-0002rR-TP for patchwork-qemu-devel@patchwork.kernel.org; Mon, 20 Nov 2017 11:53:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGpIA-0002jV-Kc for qemu-devel@nongnu.org; Mon, 20 Nov 2017 11:51:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGpI5-0003tR-Vu for qemu-devel@nongnu.org; Mon, 20 Nov 2017 11:51:30 -0500 Received: from mail-eopbgr20101.outbound.protection.outlook.com ([40.107.2.101]:47470 helo=EUR02-VE1-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 1eGpI5-0003sX-Dy; Mon, 20 Nov 2017 11:51:25 -0500 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=KH0oW/MRjNRIrkkfPV6PS+iLpOiHS7QujG3aExCr2q8=; b=Ty7XHpNuSEFhAp63e2NvjcU7h9NKJCu/Lec1qfrDx1T/vw8RO6ZaQAonFk8BXgre27de2szsQ8eTrp9Ym6pQjnkHJuwPBWroC1cp9gJaNh6nvgpwcmjsSm6ff7mkdZ1QzgMGQTDYpDuworb3KIWA8n9WlZkKbO6l4uWp2EFml7w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM5PR0801MB1988.eurprd08.prod.outlook.com (2603:10a6:203:4b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Mon, 20 Nov 2017 16:51:22 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org, qemu-block@nongnu.org Date: Mon, 20 Nov 2017 19:51:04 +0300 Message-Id: <1511196664-85304-8-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511196664-85304-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1511196664-85304-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0202CA0042.eurprd02.prod.outlook.com (2603:10a6:3:e4::28) To AM5PR0801MB1988.eurprd08.prod.outlook.com (2603:10a6:203:4b::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fea8934d-dadf-4707-b17d-08d53036ee92 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(2017052603258); SRVR:AM5PR0801MB1988; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 3:Fn0q9L2txh6/yvpzz0CF6AS4XXDtOitV4UhHFrxL4578Gm/jYmXxnaWVUxNyf8GwDMBe5vjc03rwYlWgJu0o7AjkXU3QvsHqZ+ocLIpsX4chuSUT3F6pt1eseyIE3klAh1VVCKAjI3prqrjmLClQsoHzxPEgD/slspi+ax28PqsTZ44pFEm2pyIGavupIKGzytVwJxvwToyitzIj0m/gxY/Cz+nsc4Ghf0jFLzw3t5iRqya1PZxH2hbFchyjF4lc; 25:M2MTi5FcNhJRHUhYz+oiurXkqoQtYh5fa6IQFOEKyWgzgNZG8VZNURQIwkXGPJyiFhdgvURhFK/7OkyH5mw3+/0sbPaCXv6kf4ZbIUNrmZwO+qDDBRi6guZCwutWt6a7/yA6M9PMA8mnKUVZ1gY+ZuppLUW8HmpCk835lkFpNr6jh5xhvU5d841ZoTorU6pmm4TWH7rQPkAjvC1KoB/QoNmRHBZpUPxM+Fa3y/OIh1lI1F5fEjFpk0o+tI3BgJPXqtMTtDn+N802RJB0ANTBx21FEU5m+T/ps+3eDKXhtj0mlYNMVoNUHfL45xwh8ax2fS6cm13Slb4XkkBuoC6CqQ==; 31:3yXPeGMoJWJuoQKoQjwc9Y/QJl2y0SNzr5emXVskzRbhL9NnMcBtYauVGKTjybsKKq6dTjss9DQOv3k8uK/BWuxGRUe9irZBR7UkdCVeStSpqyHnBwP+OyceHnnC6Pe7Fx8cP7OWRA23igYQYamV7MNrhv5wXGLd4y3u81YI5jzXmZwOoIJmtxvoeD2GRvS5lz4sxiB3Ci/Flxx+KGT7SK/5CI2lmTkl25CUeO1VA1Q= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1988: X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 20:or5oA59Qp5xgFhXvOSEAM5QYAULf6iIHY8pzAofIhAfoooXk7OYO+Mb5aOKhJtrhd2ZSg5K9jCZzmo3fCnOQDokU3fX50YZ25AN41wsxaI3VSikIIBCeecXjIqVLxKPie2oEWv/A7XTyQKLo+TL3U1Qko8tnSKUTRaCQF+OTjV6asMt/lVxerOGNcSrUCbF5mP2wXiwEod9PT7k7NwetICHKqd7MVVWc9RbeAxrHdJkreKvMaFtuZBgIhsjJkGwZTf1p2gWCckaGyPwvgUDBUSq/PH7A3ZY0iMmWVSym3HIh7vJyKGhSNF33+P622rFY9HjcrgKJ4um/fDjelEUHR0OnQtxTJRQTAiaH2vwTowAeiOxe2KtCON7JydKRQjObXBLSM0WIORkP66iNiNIi7QTzhp6cGC4+Cd3XoaXlUFA=; 4:CXHM1xdBOvs3STYKvBpHpW4rda1pMOmlHOM+UCCOWBBsITUrgifYWD3iJ+FC/a3zla51BxiRE+2++fRrSRr1aQk8PRetVwNGh9iw9Qm7yJZKvNLJE4M3QRajFMa6pyL0m9RbQYiqdB7QfGpndapMZ8Ww9MgoPthaOThx9z4cWEtS8aJEPYsDSd8iv9/Ee4YcoPJyA8I3JVNCH7pGyxLvt3iERMAtERDlxdZkbM91OwhMHx/NOafAYf/PktpT0yei4pv4X0Y0sZcuBZ5QWbuvD2e4MzH7AHeNBIAbk8qXDfey+Rt8Iw8NtAukDGvHSguv X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(3231022)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM5PR0801MB1988; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM5PR0801MB1988; X-Forefront-PRVS: 04976078F0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(376002)(346002)(189002)(199003)(6506006)(6486002)(25786009)(189998001)(6512007)(16586007)(86362001)(50226002)(478600001)(316002)(68736007)(8936002)(69596002)(16526018)(50986999)(55236003)(76176999)(47776003)(5003940100001)(48376002)(50466002)(7736002)(305945005)(106356001)(101416001)(105586002)(66066001)(2906002)(3846002)(2950100002)(6666003)(53416004)(97736004)(5660300001)(107886003)(8676002)(81166006)(6116002)(33646002)(4326008)(81156014)(36756003)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1988; 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; AM5PR0801MB1988; 23:BMmafwlgEiDvWZKobIsQIoKTWCMtvwKsF4R/sUa?= =?us-ascii?Q?+zXY3rOon9WMv2OXqLmkw8u70UW9ZWp/zUODzYPg1m1slOXANX81hd/V+BbI?= =?us-ascii?Q?L+46uMOqj0u7gGecMHdi2i2Ce01Z0yBI1BvvUwDA6nX0a9C7QUFbxQByZ0mV?= =?us-ascii?Q?AvP6HAbgzB6/qXM2uszVHCAwcadYY8eZ+CTDA8dZVjAwVZz4n/ubg2GGrrBs?= =?us-ascii?Q?Hty3i1x426RFc36w47v0PbOCNEwoaYFv/tByVzNrL5FgcMJoVl2xaF77GJIC?= =?us-ascii?Q?qh4SWE5aYquRNTHf6c6MJVGBknKscrPCK9iQFvCxBgRwzphd+Y3gjRKdedat?= =?us-ascii?Q?2bkNWp5ztwdF+XpPVmvQPEMDws5LaKYd5ka7TvGtzBf4SKRb/LJY72C1vFzB?= =?us-ascii?Q?juMXrN6idi8EZaA86gYt047pBIFDRn8Erotxb5qzSkoN2By7osvuf1oJSed5?= =?us-ascii?Q?gp8lH4SIyakwlfjuQT/8ZwNw2l+aoT5Sv2w6G/dH0EZ78uOlVKiFmFdQY0Zt?= =?us-ascii?Q?ToDkVgcWerWQjpES7E5MnBdHrvMG5f0PUzNEUUR/AXIi93ZBt0/kfZcyQzgN?= =?us-ascii?Q?QbdiRsv3kyZ/fW5HOXhtNvZzVc2bMYmvL8DGR3bQ+tBWmrwqoFxDq1VdLe3E?= =?us-ascii?Q?Zq2S1GBpO7RDVUSMv8lzh4HB4t4IYwL/MDyeMEACN2b9c7cpj/casNHYL2ov?= =?us-ascii?Q?tSvFQSl0VU/Lp+xrTWt7ceFhLt7x7zS7YMn1vgV/Ok8XSfjlTZLf6442Xvof?= =?us-ascii?Q?AiGVae9EdzEzPoWG+PI2osXWGIgwHa7oJRBcG5T8XB07S8TxGHSxcZkN7nKe?= =?us-ascii?Q?3zrCYvPTzdfr17ZwTuXhAG2vegh0DL68jPVDcYeJNZIum4yuTbBqw10w5tDM?= =?us-ascii?Q?7jXVSqsBFY/44JD6lNEHRY6gtZBf9r0pkqUiaS9m3/ts+l1OoBxqzs3FHSav?= =?us-ascii?Q?/GlU4txs4tXUmNNlkPKRFzuShjyZ71ZxazjZJVf8Iz78k3goHHofR74YLprh?= =?us-ascii?Q?v+L29jUv7VnF0ar9GoKmM235VE7oWC0zEgfBdcKJUTtWFcY6SghMyS/YL7IB?= =?us-ascii?Q?5TD0TJ041o+ozcoBbwqdAci3OgTcD1SMx6k2fnJy7N5nQDWaB6b1lOzY+7Yc?= =?us-ascii?Q?gUgI0wYihQUc=3D?= X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 6:4FxnfPV5cSO8N1QkgLqhUTTja4NawtX8F6t3LiPA5PpWObzM7+KbTNv/Gx03nAOR27H6AR6hQmRcflc0PNNdv++Nr1Mqyx7ACsBjwWtOKLtt9RstDj/n7GLuX6+CroVKjqMsnSwKqHKaYUDsrjjZUJc9DF27tF/e/vpcOuZrFLyHnOP/POC5l/TqMEG/XncjNtMeNBbl3GmkobyfUATEoFw93E9cwwvho1HLP55QA+4IDptlStGe+ZX9bMqahlpSbJTVb9rP7L0W9JgqEvNMAByDNMj1lDJa7d5984aNpqN+nCCH/7PdkDsKHt6dmongwcZDg1+P4JHZcEiTk0c44VQRwdjDRbzotwbIudO9bs8=; 5:aY8473/vRppJclnqnhWVA2KRP/7qrCz9AS1UcAkmGLrubu9EcBub4Wuz4fUA48bf3YJfBXWczpjvPbH069GiX7tFql9yA+xn3TZl3qGLElyoBFWILFcUqSKmnoxPnv2I11ljdFx7gQ1yXN5prOE8SUM1e4iqP0MDDFaKGcjKXJo=; 24:OORVIRGav6qNrL8yOevkXI6LsPwMiKj6ht2AWvXo3kNx1JsD6XQcoM2Blbjay8EGg/y+1P3yH4FPGquYBjeB47kI3fEuWXOPW5m+uCNsgTE=; 7:7plD/KWicFUMSmqTrmYqo1Csu84ze5uTIh7cGz/tvS9rozzLJOTKjcjm25JBRb33mjYTL1aqoRT5aMpCKf4pckWVd1Kv1BbItH9KLYpElH6osSge+D99fKmbZlNlA3OrVWggIyTFVsQVuZQ34uhl40vtWttPDm+NjUmpmzVp/RI4gv/mRBHrXlAS5j9el38ze1Q90ify6lkd2QFe+jWMbVATLM8H2NdwGusoFA3STERqMd2mlMiYuWrGK0Q06qCf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1988; 20:Sl8paRK9ciNb3A5TJgGPRm4W0q1+cM8kQLfgTDkrnrEm7c1XIandS88mzLi3QDxAHEqrsXlzgh8ZWVLa1e8efZR+/CwDsBPTI4nSxUyknUU/STCQsSGCw2oiExuzd1QV+QruaE8KsTQA43u5kisa2wkEgFfDvyhPJYFGH2Ft2mE= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2017 16:51:22.4876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fea8934d-dadf-4707-b17d-08d53036ee92 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1988 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.2.101 Subject: [Qemu-devel] [PATCH 7/7] qapi: query-blockstat: add driver specific file-posix stats 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, armbru@redhat.com, mreitz@redhat.com, pbonzini@redhat.com, jsnow@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP A block driver can provide a callback to report driver-specific statistics. file-posix driver now reports discard statistics Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 37 +++++++++++++++++++++++++++++++++++++ include/block/block.h | 1 + include/block/block_int.h | 1 + block.c | 9 +++++++++ block/file-posix.c | 21 +++++++++++++++++++++ block/qapi.c | 5 +++++ 6 files changed, 74 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index ba2705d..aefccf6 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -765,6 +765,40 @@ 'timed_stats': ['BlockDeviceTimedStats'] } } ## +# @BlockDriverStatsFile: +# +# File driver statistics +# +# @discard_nb_ok: The number of succeeded discard operations performed by +# the driver. +# +# @discard_nb_failed: The number of failed discard operations performed by +# the driver. +# +# @discard_bytes_ok: The number of bytes discarded by the driver. +# +# Since 2.12 +## +{ 'struct': 'BlockDriverStatsFile', + 'data': { + 'discard_nb_ok': 'int', + 'discard_nb_failed': 'int', + 'discard_bytes_ok': 'int' + } } + +## +# @BlockDriverStats: +# +# Statistics of a block driver (driver-specific) +# +# Since: 2.12 +## +{ 'union': 'BlockDriverStats', + 'data': { + 'file': 'BlockDriverStatsFile' + } } + +## # @BlockStats: # # Statistics of a virtual block device or a block backing device. @@ -776,6 +810,8 @@ # # @stats: A @BlockDeviceStats for the device. # +# @driver-stats: Optional driver-specific statistics. (Since 2.12) +# # @parent: This describes the file block device if it has one. # Contains recursively the statistics of the underlying # protocol (e.g. the host file for a qcow2 image). If there is @@ -789,6 +825,7 @@ { 'struct': 'BlockStats', 'data': {'*device': 'str', '*node-name': 'str', 'stats': 'BlockDeviceStats', + '*driver-stats': 'BlockDriverStats', '*parent': 'BlockStats', '*backing': 'BlockStats'} } diff --git a/include/block/block.h b/include/block/block.h index c05cac5..e6baead 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -473,6 +473,7 @@ const char *bdrv_get_device_or_node_name(const BlockDriverState *bs); int bdrv_get_flags(BlockDriverState *bs); int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs); +BlockDriverStats *bdrv_get_driver_stats(BlockDriverState *bs); void bdrv_round_to_clusters(BlockDriverState *bs, int64_t offset, int64_t bytes, int64_t *cluster_offset, diff --git a/include/block/block_int.h b/include/block/block_int.h index a548277..a127861 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -269,6 +269,7 @@ struct BlockDriver { Error **errp); int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi); ImageInfoSpecific *(*bdrv_get_specific_info)(BlockDriverState *bs); + BlockDriverStats *(*bdrv_get_stats)(BlockDriverState *bs); int coroutine_fn (*bdrv_save_vmstate)(BlockDriverState *bs, QEMUIOVector *qiov, diff --git a/block.c b/block.c index 6c8ef98..7e5822f 100644 --- a/block.c +++ b/block.c @@ -4016,6 +4016,15 @@ ImageInfoSpecific *bdrv_get_specific_info(BlockDriverState *bs) return NULL; } +BlockDriverStats *bdrv_get_driver_stats(BlockDriverState *bs) +{ + BlockDriver *drv = bs->drv; + if (!drv || !drv->bdrv_get_stats) { + return NULL; + } + return drv->bdrv_get_stats(bs); +} + void bdrv_debug_event(BlockDriverState *bs, BlkdebugEvent event) { if (!bs || !bs->drv || !bs->drv->bdrv_debug_event) { diff --git a/block/file-posix.c b/block/file-posix.c index 544ae58..3ab92e6 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2240,6 +2240,25 @@ static int raw_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) return 0; } +static BlockDriverStats *raw_get_stats(BlockDriverState *bs) +{ + BDRVRawState *s = bs->opaque; + BlockDriverStats *stats = g_new(BlockDriverStats, 1); + + *stats = (BlockDriverStats){ + .type = BLOCK_DRIVER_STATS_KIND_FILE, + .u.file.data = g_new(BlockDriverStatsFile, 1), + }; + + *stats->u.file.data = (BlockDriverStatsFile){ + .discard_nb_ok = s->stats.discard_nb_ok, + .discard_nb_failed = s->stats.discard_nb_failed, + .discard_bytes_ok = s->stats.discard_bytes_ok, + }; + + return stats; +} + static QemuOptsList raw_create_opts = { .name = "raw-create-opts", .head = QTAILQ_HEAD_INITIALIZER(raw_create_opts.head), @@ -2312,6 +2331,7 @@ BlockDriver bdrv_file = { .bdrv_get_info = raw_get_info, .bdrv_get_allocated_file_size = raw_get_allocated_file_size, + .bdrv_get_stats = raw_get_stats, .bdrv_check_perm = raw_check_perm, .bdrv_set_perm = raw_set_perm, .bdrv_abort_perm_update = raw_abort_perm_update, @@ -2790,6 +2810,7 @@ static BlockDriver bdrv_host_device = { .bdrv_get_info = raw_get_info, .bdrv_get_allocated_file_size = raw_get_allocated_file_size, + .bdrv_get_stats = raw_get_stats, .bdrv_check_perm = raw_check_perm, .bdrv_set_perm = raw_set_perm, .bdrv_abort_perm_update = raw_abort_perm_update, diff --git a/block/qapi.c b/block/qapi.c index 6e110f2..4191e6c 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -489,6 +489,11 @@ static BlockStats *bdrv_query_bds_stats(BlockDriverState *bs, s->stats->wr_highest_offset = stat64_get(&bs->wr_highest_offset); + s->driver_stats = bdrv_get_driver_stats(bs); + if (s->driver_stats) { + s->has_driver_stats = true; + } + if (bs->file) { s->has_parent = true; s->parent = bdrv_query_bds_stats(bs->file->bs, blk_level);