Skip to content

Commit

Permalink
CA-150812: Xentop doesn't display VBD3 data
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
martinjorge committed Nov 2, 2015
1 parent 8d1841a commit 61cbe03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/tapdisk-metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion drivers/tapdisk-metrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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;
Expand Down

0 comments on commit 61cbe03

Please sign in to comment.