From patchwork Wed Jun 13 17:44:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Nefedov X-Patchwork-Id: 10462749 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 4F374603B4 for ; Wed, 13 Jun 2018 17:48:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33EE52872E for ; Wed, 13 Jun 2018 17:48:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4AB8828F23; Wed, 13 Jun 2018 17:48:01 +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=-7.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, 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 A85BB28FAF for ; Wed, 13 Jun 2018 17:46:27 +0000 (UTC) Received: from localhost ([::1]:35964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT9ql-0004iG-0G for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Jun 2018 13:46:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fT9pF-0003LB-H0 for qemu-devel@nongnu.org; Wed, 13 Jun 2018 13:44:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fT9pD-00072p-Ck for qemu-devel@nongnu.org; Wed, 13 Jun 2018 13:44:53 -0400 Received: from mail-eopbgr10138.outbound.protection.outlook.com ([40.107.1.138]:47432 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 1fT9pD-0006sA-3r; Wed, 13 Jun 2018 13:44:51 -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:X-MS-Exchange-SenderADCheck; bh=xmjpw0G5D3kJrGf3ph9RRRxc6y8GvKqIw8JHxR0Xqj0=; b=c+u7n1qUvcW0gJdmkZmSXVGjSZOa0gURKwryRqsG8VJDLZp5/TNPQZa4jHfxIcwQlHhazE/HLxvR0LRS+rSNfeF4Vc8K1LuSGPiVi+Nn31CffAgwA+pJ0SHzcnsGAi5Fo1Mr5W17c2dmdY7vf2bPGTXXcijiv1jTK+2jqHgkBy8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=anton.nefedov@virtuozzo.com; Received: from xantnef-ws.sw.ru (195.214.232.6) by AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Wed, 13 Jun 2018 17:44:47 +0000 From: Anton Nefedov To: qemu-devel@nongnu.org Date: Wed, 13 Jun 2018 20:44:20 +0300 Message-Id: <1528911866-37489-3-git-send-email-anton.nefedov@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528911866-37489-1-git-send-email-anton.nefedov@virtuozzo.com> References: <1528911866-37489-1-git-send-email-anton.nefedov@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: HE1PR0902CA0023.eurprd09.prod.outlook.com (2603:10a6:3:e5::33) To AM0PR08MB3347.eurprd08.prod.outlook.com (2603:10a6:208:5f::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bd894ac0-963b-4987-c460-08d5d1555b7a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3347; X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 3:MO/UeT5U6vCX6CsEz1b5+hDTfYRHeMKBYY2YVcATZDIwIgis7Q6mdCL9tJLrbDPcXhPj1KYbmZ70eiVHjxox9lmB2IvoIdtZ8JqX7fcuAij15S+subnA5BTBExTeKLFj5yeT8OU9HDWPPpj+jd6W4ZdoK4Qsf8rWQFNuc7XaZkhHi2S/5j3vegKIDouZmehw+KgnYXzSuZR/+KBpWJuOG0tox1AEwdk9FIdSuHpHO2Sg6EEsGvYXx1F04M5XDAVw; 25:xJkKj1SvCE/HvHY9q1nJKD4IIepCejmz76dlWg8B0EV30Vuqkr5a98JvsLDNiJodDWJw8TB6fUsvMxHr2KrAqm4AVlVUkWRvcA0VWQLlhRFE2PDWvIM0Dyna87eDO4Anf5R8UIUv8oKoT9FgaQkVJ08aTx6VgiNk035D5+RIeGGYeQkDQ72uZikyxPx+fr5cr1m7Iv+KsS2uZUa4M/Pt1osR0IieKq/4g6YQGBrc/ZXQIK7NVrQEIoQQ5pZyt+fsnSQkqzE/arAbJO5QUJ9E7i1TDi92JxvYssr8jBIn5sVtZI1eLzbQqUn9u2/quXrXqTx+F0BPdI0p1eCGBZ4kSw==; 31:PsZyBr9oxVf6wLNb6EXkBiYxDlStRde9t8VZkLhK8Yb+VyOIYQolYKABov0CHxaE8idEY1/30Ud5oetTXEXgq0maXXWmfMuRiFlY21BEssSREAGdhIEkBcrJwgirOUQuuG2vRa/3v17pVqTOo0dI1fQV+BykyuN+S3zlsIfK5/Wk+HMlv45szuPMyT5FEP6MqJsV1RdB9quBMZCqR+i3gyHj0S1e224ESMnlTCpf9Kg= X-MS-TrafficTypeDiagnostic: AM0PR08MB3347: X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 20:oJE1Te5UhLBAtYlH9uZBoLTwX2uxH6sOfqtrDzF45VZeH9ahSbM1M/fjvwWOD3tflwePAWCMFirQLPQ7ChLr45nFeBCxmZgDoSy2o5DYMLX07PZt+mfsvqmh2CKgggtN/FN6LuZOFpd1qbq4TCYwR7Pibi4js2advxuSrJta17ke3J1L5AQT2G9VpjqArsjJMOD6k3iNm4GTcDfbNXZRFuBAN/wuOfeU2bAIDgMwE4gvTQt4LD/Ou0eIH7vryW1HNah4ibk5XZkjXa9jkOUJzbAQ4Id9pQMvYbj6GdlFpFMBRIEJ9iwl/oCcnPrUsF5P0kmDk3FYV9n0RbbpBLTvEMhAsiuEVRlTeMr9RBCHX+hLbSL6dX3iOSC4AaqXNTImt1zQ5KwSHZA3aPflChmioGorYNjo6r7ogxIzTwmVNUL/lvd+IaRxU9LtcM1dkZ9GI+UGzVkTM8y/m0LhBAvzcltiWyK1w42U7NZA5tR7P3HKaVi0uZYe85MUz4e1RXe1; 4:HkfMIB4faU8L8AnBGq/yh51Jptp6SZawzE/LZCfvKkGO/U0L4Zy9Ad9mY2ARd1sRRv0tEQqm268AtTl7Oo9zy71S0sulO/PiwwKvB/OFWY8yYHzaZpDm3u061zqqgKUGORscu5Xib+CbWmleNFhLmJnIqLq9EhrdeY5rmNe+mccCz1WF6U6Zziltyy3H1bG0hpXAmWyYCP+NolhBjYkC67oJWML5w+/MXY8f2lDVPDO35ZNPgi8JhWLSS8pBZOsQ1ng2zQmOeqhAhupXJuB+GA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:AM0PR08MB3347; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB3347; X-Forefront-PRVS: 07025866F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(396003)(346002)(376002)(39850400004)(366004)(39380400002)(199004)(189003)(50466002)(2351001)(386003)(4326008)(2361001)(59450400001)(6512007)(52116002)(105586002)(486006)(478600001)(106356001)(44832011)(53416004)(107886003)(51416003)(53936002)(76176011)(11346002)(956004)(446003)(2616005)(476003)(69596002)(6486002)(48376002)(16526019)(6506007)(7736002)(97736004)(186003)(5660300001)(6666003)(25786009)(6916009)(305945005)(8936002)(6116002)(3846002)(50226002)(66066001)(36756003)(8676002)(86362001)(47776003)(55236004)(68736007)(316002)(2906002)(16586007)(81166006)(26005)(81156014); DIR:OUT; SFP:1102; SCL:1; SRVR:AM0PR08MB3347; H:xantnef-ws.sw.ru; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR08MB3347; 23:A8QOml+PrSCGynIKhywfU7QXZ7MxMM1kFwd+vY0GJ?= =?us-ascii?Q?omZ2O1gMgIDn+1RKkhUIkohGoeMgQyjXloqy4JgbVTKHQ1XJtZSHp+A7lcy0?= =?us-ascii?Q?YjFUemyW7khUYVage2aandCsghfQd32zPVwQ8FbjkdlMne82v28y7y+QxbVS?= =?us-ascii?Q?zK//avdYF1bfhhtrgwHxXvGV7zbOdUxY1yQEEWRDHc2smROsd+5EH4ZnQ44d?= =?us-ascii?Q?Ayk62TCHcHVqJP6izHgTeo7pXQl9zLrUsoi1P6b1S/RKGSoC0vXVo/WXG+Ad?= =?us-ascii?Q?68YluSuQdoQnuQ/T8dmXozFfpC/8h9UalsQuMMwz/X2/kvvfg00GSldSFjSr?= =?us-ascii?Q?+Qd3WplFBliw3fJabxA30Hd5uRVSUT9kUxhYsI6Yjp8RYGITH3EOTFQeRYyZ?= =?us-ascii?Q?hh7t8WJ13JQSPImLMNkQc5EHv0wWvawVP1ftgD2GahuX7mIy0ly/NVyy/Lcf?= =?us-ascii?Q?d00wRXedCPWpWLGPN3mkM77CwZacypfizFuPtDpvL+nYHa111PkDKh5YYfYU?= =?us-ascii?Q?hEL4JJbnqrFvBCpwhldcsvgq7cCtHV0WH3ceJIPpiD23mSh6pavNJtuxsiUS?= =?us-ascii?Q?8vet34Sh0j6lxPhwvI3VObn4aKgpDURLqDdasCQPWKV4ngyM241v2TRRgrTL?= =?us-ascii?Q?HctZInnoB0FQOS958VSdqeGW/4Hb2LI4PwK9hiZC2CrVAi8TpTqjC0h/zn2R?= =?us-ascii?Q?3yPNKO2Z2wFcGr8jUm29vnuwlHIFB25cywHCg9VFQhyY7Rsc1BiXaABDdESQ?= =?us-ascii?Q?uw/PQ7qPUTdMiopiOPgBZj1QzVoZX7LOJo8n2oWxeaHmmf/yxzW107RC9v/R?= =?us-ascii?Q?k3TgQza9rT5VS3MyQMPajee+akBY+nrMGoa5RUWSz8ZDnZ5XMjmPsiZ1bBgb?= =?us-ascii?Q?mqYUIxRzmBUitqIjJem3EBCLVEXqhDXKFo3X9kBhkY6nQlfuRyJ0HGMfyyPd?= =?us-ascii?Q?6As9OTZ1re+783xhivivjnZTHsgfZ7/nvNDqv1IfRsdTvOYddO/bYXBOQVHG?= =?us-ascii?Q?KT8LCiNb3tiNGY7TmQjkfgPoUswE35OmK2PKgUq8CbEsBL1En5ZBxC83HhpU?= =?us-ascii?Q?XXE/1KE7VDbDo0cVLnngFvhiVs7TVEQNY/j/fmO6p6V2D8XTqPQ32IQPbaGW?= =?us-ascii?Q?ZSA2r+5fLFhjiKaH4DwS+ySS0KOETL26gO8ID4WsT51BZ4rZDxBcSZCqZsWC?= =?us-ascii?Q?CsuDCaiJMXGlO6JiDzshwPX4QEgt8H/c3tr/qoWpW952jRDcQCSvyplYNgvO?= =?us-ascii?Q?s6YNEd046XXbGb7uy9Y4EmbAY7V6I7SKs9PQMeTGI1sTggg6MynFBO6sD9zl?= =?us-ascii?Q?0Ye8wywuU4l2Y5Dy26KDowxYj9yx5nsYg1FnXEFwCUeBblz+V5oFLCL2SqDW?= =?us-ascii?Q?27CyA=3D=3D?= X-Microsoft-Antispam-Message-Info: fdoCDE4+R737t59Thd5jWlu6IxBKaApF1U4Sn24eZVA/Z1WlX0/0kZU71hXg9SZwJYrKXh3prRxHZnnTl9gkRYZ8ft430UBPhsZioYXFauAI9W4+XoNC128prdGrey989UhQP/8IHGOqcJvZFyu8OuCnKd13+7t/s0cpVqTu8Mvqybnr6H9yCCRL6pWWmMyI X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 6:Mx35fNXY8SFoOMZsJdeAAiEwcRNK7RQ75yxCCszl2tfrSzuvGAaOrHNeH2vC4270Y6A3t5lcz7Z7LgJu2cQIxGXjIe5TczAWh5DuvJUHivMQnXFKYW97dnzlzjd/saAlCl5azQH2Jg/JiNFRzZHChO37zZkfFUnIRNDFc25cvoVwCX23BBURbRQbgUUQEg72C72A0uVGoNWbPj4pvXyXAekAt+MJlseoM/yB4wxahPUlPLxtbDOI3OiJHBBCYyQI1IBpmo0Dvna91MlPat8FlwgsOFIkfsvvIEObnZQN03nGIP62tkXdtfBVryXVv+dg/t5aGodt28JElkrTGJQSPa8Rc8xvBwgVqOP+r6k71YlvllpgsM0nPnW/aBEP2dmklfEpPyiWUfQD+00bTywl8vquc2uxu0QCUFVJdUOUU79Gr2DIeLjVWqpbDkc9USC5LQ5evCFbjXC+/MyO2q6whQ==; 5:6oiMwVvnyq6XlfpcX5KusB6SD1NrwJNlhzgWrOKANOuUOyumOvjhHHskvzgoqO9+cn3+SCWQR0CJw3Ny38TV5/m6FxxBjP+w1rL3ekRFe5m3cqyywYCipHgw67vVIZi/gyM/W0Kz2nQKcOklPbub7O4dZfS38AIZJ+Ioy2yhhaw=; 24:G+R2+9HQuxejgAqLqkOJaH73vPtYcHGa/ZHtG4CLaD03pyo5ABIMiPwq8Yo19B+wr6Z1zuzMyYM6mgj8BYyJCU5p9gNE70MdQimHwLMlWIw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3347; 7:IyiJak2G8iQ64/KE6XOWyvfAIiPOmuwnOiLBBf5jCyIRYX6qVHoArSq2YTYi+zFjoMMV5IV0Zq8f3eu7HtxGRP4N4wklHG/sZA3mddrL8fwVudymz73tcjhEruddON3ppu3Eh50hHyHp3xj3HLPat1zojutOvYycNOdupOgAQozaYXFN9+DkEI9ik6mH7BTnNpDQDjcfAKdRLYcoPUSrnrAxdBtfR6v0JqwFBmNWDUig08wJo8r09zrbymUE4VeV; 20:/8AC1givde1FiW8X1EWshtU/WzFz9UBfVSdzOO0Ae1gP4Dd3iiojV+pmyRUy3LapmVRIa1dlpIy9DYOYuBuioQNR3dj2piwVuRMERdEtVdsMj5Lq1SbJ0fWNWo+bG7ThnERttBL5L+QOxNmOKt75dKnUfNEU/EbmGUvTo5tznt0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2018 17:44:47.2475 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bd894ac0-963b-4987-c460-08d5d1555b7a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3347 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.1.138 Subject: [Qemu-devel] [PATCH v3 2/8] qapi: add unmap to BlockDeviceStats 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 , berto@igalia.com, den@virtuozzo.com, qemu-block@nongnu.org, 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 Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake --- qapi/block-core.json | 29 +++++++++++++++++++++++------ include/block/accounting.h | 1 + block/qapi.c | 6 ++++++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index ee75aef..a859011 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -777,6 +777,8 @@ # # @wr_bytes: The number of bytes written by the device. # +# @unmap_bytes: The number of bytes unmapped by the device (Since 3.0) +# # @rd_operations: The number of read operations performed by the device. # # @wr_operations: The number of write operations performed by the device. @@ -784,6 +786,9 @@ # @flush_operations: The number of cache flush operations performed by the # device (since 0.15.0) # +# @unmap_operations: The number of unmap operations performed by the device +# (Since 3.0) +# # @rd_total_time_ns: Total time spent on reads in nanoseconds (since 0.15.0). # # @wr_total_time_ns: Total time spent on writes in nanoseconds (since 0.15.0). @@ -791,6 +796,9 @@ # @flush_total_time_ns: Total time spent on cache flushes in nanoseconds # (since 0.15.0). # +# @unmap_total_time_ns: Total time spent on unmap operations in nanoseconds +# (Since 3.0) +# # @wr_highest_offset: The offset after the greatest byte written to the # device. The intended use of this information is for # growable sparse files (like qcow2) that are used on top @@ -802,6 +810,9 @@ # @wr_merged: Number of write requests that have been merged into another # request (Since 2.3). # +# @unmap_merged: Number of unmap requests that have been merged into another +# request (Since 3.0) +# # @idle_time_ns: Time since the last I/O operation, in # nanoseconds. If the field is absent it means that # there haven't been any operations yet (Since 2.5). @@ -815,6 +826,9 @@ # @failed_flush_operations: The number of failed flush operations # performed by the device (Since 2.5) # +# @failed_unmap_operations: The number of failed unmap operations performed +# by the device (Since 3.0) +# # @invalid_rd_operations: The number of invalid read operations # performed by the device (Since 2.5) # @@ -824,6 +838,9 @@ # @invalid_flush_operations: The number of invalid flush operations # performed by the device (Since 2.5) # +# @invalid_unmap_operations: The number of invalid unmap operations performed +# by the device (Since 3.0) +# # @account_invalid: Whether invalid operations are included in the # last access statistics (Since 2.5) # @@ -842,25 +859,25 @@ # Since: 0.14.0 ## { 'struct': 'BlockDeviceStats', - 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', + 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'unmap_bytes' : 'int', 'rd_operations': 'int', 'wr_operations': 'int', - 'flush_operations': 'int', + 'flush_operations': 'int', 'unmap_operations': 'int', 'rd_total_time_ns': 'int', 'wr_total_time_ns': 'int', - 'flush_total_time_ns': 'int', + 'flush_total_time_ns': 'int', 'unmap_total_time_ns': 'int', 'wr_highest_offset': 'int', - 'rd_merged': 'int', 'wr_merged': 'int', + 'rd_merged': 'int', 'wr_merged': 'int', 'unmap_merged': 'int', '*idle_time_ns': 'int', 'failed_rd_operations': 'int', 'failed_wr_operations': 'int', - 'failed_flush_operations': 'int', + 'failed_flush_operations': 'int', 'failed_unmap_operations': 'int', 'invalid_rd_operations': 'int', 'invalid_wr_operations': 'int', - 'invalid_flush_operations': 'int', + 'invalid_flush_operations': 'int', 'invalid_unmap_operations': 'int', 'account_invalid': 'bool', 'account_failed': 'bool', 'timed_stats': ['BlockDeviceTimedStats'], diff --git a/include/block/accounting.h b/include/block/accounting.h index d1f67b1..ba8b04d 100644 --- a/include/block/accounting.h +++ b/include/block/accounting.h @@ -36,6 +36,7 @@ enum BlockAcctType { BLOCK_ACCT_READ, BLOCK_ACCT_WRITE, BLOCK_ACCT_FLUSH, + BLOCK_ACCT_UNMAP, BLOCK_MAX_IOTYPE, }; diff --git a/block/qapi.c b/block/qapi.c index e12968f..2ee90d4 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -432,24 +432,30 @@ static void bdrv_query_blk_stats(BlockDeviceStats *ds, BlockBackend *blk) ds->rd_bytes = stats->nr_bytes[BLOCK_ACCT_READ]; ds->wr_bytes = stats->nr_bytes[BLOCK_ACCT_WRITE]; + ds->unmap_bytes = stats->nr_bytes[BLOCK_ACCT_UNMAP]; ds->rd_operations = stats->nr_ops[BLOCK_ACCT_READ]; ds->wr_operations = stats->nr_ops[BLOCK_ACCT_WRITE]; + ds->unmap_operations = stats->nr_ops[BLOCK_ACCT_UNMAP]; ds->failed_rd_operations = stats->failed_ops[BLOCK_ACCT_READ]; ds->failed_wr_operations = stats->failed_ops[BLOCK_ACCT_WRITE]; ds->failed_flush_operations = stats->failed_ops[BLOCK_ACCT_FLUSH]; + ds->failed_unmap_operations = stats->failed_ops[BLOCK_ACCT_UNMAP]; ds->invalid_rd_operations = stats->invalid_ops[BLOCK_ACCT_READ]; ds->invalid_wr_operations = stats->invalid_ops[BLOCK_ACCT_WRITE]; ds->invalid_flush_operations = stats->invalid_ops[BLOCK_ACCT_FLUSH]; + ds->invalid_unmap_operations = stats->invalid_ops[BLOCK_ACCT_UNMAP]; ds->rd_merged = stats->merged[BLOCK_ACCT_READ]; ds->wr_merged = stats->merged[BLOCK_ACCT_WRITE]; + ds->unmap_merged = stats->merged[BLOCK_ACCT_UNMAP]; ds->flush_operations = stats->nr_ops[BLOCK_ACCT_FLUSH]; ds->wr_total_time_ns = stats->total_time_ns[BLOCK_ACCT_WRITE]; ds->rd_total_time_ns = stats->total_time_ns[BLOCK_ACCT_READ]; ds->flush_total_time_ns = stats->total_time_ns[BLOCK_ACCT_FLUSH]; + ds->unmap_total_time_ns = stats->total_time_ns[BLOCK_ACCT_UNMAP]; ds->has_idle_time_ns = stats->last_access_time_ns > 0; if (ds->has_idle_time_ns) {