qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/3] info blockstats: show highest_allocated if exis


From: Uri Lublin
Subject: [Qemu-devel] [PATCH 3/3] info blockstats: show highest_allocated if exists
Date: Thu, 08 Jan 2009 20:55:15 +0200
User-agent: Thunderbird 2.0.0.18 (X11/20081119)

From: Uri Lublin <address@hidden>

Using bdrv_get_info() to
1. get more interesting stats later
2. print the info only for block formats that support it.

Signed-off-by: Uri Lublin <address@hidden>
---
 block.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/block.c b/block.c
index 82959d6..5305b27 100644
--- a/block.c
+++ b/block.c
@@ -1124,6 +1124,7 @@ void bdrv_info(void)
 void bdrv_info_stats (void)
 {
     BlockDriverState *bs;
+    BlockDriverInfo bdi;

     for (bs = bdrv_first; bs != NULL; bs = bs->next) {
        term_printf ("%s:"
@@ -1131,10 +1132,14 @@ void bdrv_info_stats (void)
                     " wr_bytes=%" PRIu64
                     " rd_operations=%" PRIu64
                     " wr_operations=%" PRIu64
-                    "\n",
+                     ,
                     bs->device_name,
                     bs->rd_bytes, bs->wr_bytes,
                     bs->rd_ops, bs->wr_ops);
+        if (bdrv_get_info(bs, &bdi) == 0)
+            term_printf(" high=%" PRIu64,
+                        bdi.highest_alloc);
+        term_printf("\n");
     }
 }

--
1.6.0.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]