Skip to content

Commit

Permalink
CP-10070: report read caching status in tap-ctl stat
Browse files Browse the repository at this point in the history
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Reviewed-by: Felipe Franciosi <felipe.franciosi@citrix.com>

GitHub: closes #160 on xapi-project/blktap
  • Loading branch information
Thanos Makatos authored and germanop committed May 12, 2015
1 parent caa7504 commit 757099d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/tapdisk-vbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,8 @@ tapdisk_vbd_stats(td_vbd_t *vbd, td_stats_t *st)
{
td_image_t *image, *next;
struct td_xenblkif *blkif;
const bool read_caching =
TD_OPEN_NO_O_DIRECT == (vbd->flags & TD_OPEN_NO_O_DIRECT);

tapdisk_stats_enter(st, '{');
tapdisk_stats_field(st, "name", "s", vbd->name);
Expand Down Expand Up @@ -1799,6 +1801,10 @@ tapdisk_vbd_stats(td_vbd_t *vbd, td_stats_t *st)
"reqs_outstanding",
"d", tapdisk_vbd_reqs_outstanding(vbd));

tapdisk_stats_field(st,
"read_caching",
"s", read_caching ? "true": "false");

tapdisk_stats_leave(st, '}');
}

Expand Down

0 comments on commit 757099d

Please sign in to comment.