From ca17466ae425fcd4884d033261a888726f2b8a6a Mon Sep 17 00:00:00 2001 From: aliguori <aliguori> Date: Tue, 3 Mar 2009 16:25:21 +0200 Subject: [PATCH 4/8] info blockstats: show highest_allocated if exists (Uri Lublin) Signed-off-by: Uri Lublin <uril@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> RH-Upstream-status: applied(qemu/trunk) Bugzilla: 488250 Acked-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Dor Laor <dlaor@redhat.com> --- qemu/block.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/qemu/block.c b/qemu/block.c index a4b3b2c..7f24866 100644 --- a/qemu/block.c +++ b/qemu/block.c @@ -1164,6 +1164,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:" @@ -1171,10 +1172,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.1