From 61cbe03dfa830f2a80ff4123b1a69205654b4da2 Mon Sep 17 00:00:00 2001 From: Jorge Martin Date: Thu, 1 Oct 2015 13:09:40 +0000 Subject: [PATCH] CA-150812: Xentop doesn't display VBD3 data Modified metrics struct to keep a version control for the vbd3 metrics. This is required by xentop to check the correctness of the metrics file. Signed-off-by: Jorge Martin --- drivers/tapdisk-metrics.c | 1 + drivers/tapdisk-metrics.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tapdisk-metrics.c b/drivers/tapdisk-metrics.c index fedeb2cf..9fd25ddb 100644 --- a/drivers/tapdisk-metrics.c +++ b/drivers/tapdisk-metrics.c @@ -216,6 +216,7 @@ td_metrics_vbd_start(int domain, int id, stats_t *vbd_stats) goto out; } vbd_stats->stats = vbd_stats->shm.mem; + vbd_stats->stats->version = 1; out: return err; diff --git a/drivers/tapdisk-metrics.h b/drivers/tapdisk-metrics.h index 80d01b5c..c25a3da7 100644 --- a/drivers/tapdisk-metrics.h +++ b/drivers/tapdisk-metrics.h @@ -21,7 +21,7 @@ #define TAPDISK_METRICS_PATHF "/dev/shm/td3-%d" #define TAPDISK_METRICS_VDI_PATHF "%s/vdi-%hu" -#define TAPDISK_METRICS_VBD_PATHF "%s/vbd-%d-%d" +#define TAPDISK_METRICS_VBD_PATHF "%s/vbd3-%d-%d" #define TAPDISK_METRICS_BLKTAP_PATHF "%s/blktap-%d" #define TAPDISK_METRICS_NBD_PATHF "%s/nbd-%d" @@ -31,6 +31,7 @@ #include "tapdisk.h" struct stats { + uint32_t version; //Used to check version of this struct in xentop. unsigned long long read_reqs_submitted; unsigned long long read_reqs_completed; unsigned long long read_sectors;