qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 07/14] block: info blockstats: show highest_allocate


From: Uri Lublin
Subject: [Qemu-devel] [PATCH 07/14] block: info blockstats: show highest_allocated if exists
Date: Tue, 17 Mar 2009 22:40:45 +0200

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

diff --git a/block.c b/block.c
index bdf66a4..411514a 100644
--- a/block.c
+++ b/block.c
@@ -1093,6 +1093,7 @@ void bdrv_info(Monitor *mon)
 void bdrv_info_stats(Monitor *mon)
 {
     BlockDriverState *bs;
+    BlockDriverInfo bdi;
 
     for (bs = bdrv_first; bs != NULL; bs = bs->next) {
         monitor_printf(mon, "%s:"
@@ -1100,10 +1101,17 @@ void bdrv_info_stats(Monitor *mon)
                        " 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) {
+            if (bdi.highest_alloc) {
+                monitor_printf(mon, " high=%" PRIu64,
+                               bdi.highest_alloc);
+            }
+        }
+        monitor_printf(mon, "\n");
     }
 }
 
-- 
1.6.0.6





reply via email to

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