diff options
author | Anton Nefedov <anton.nefedov@virtuozzo.com> | 2019-09-23 15:17:37 +0300 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-10-10 10:56:18 +0200 |
commit | d924559953c0b679582548d8fd8af025667051e3 (patch) | |
tree | 78ed49162199ff0a33f6ff6c1497bf2881107da0 /block/qapi.c | |
parent | 1c450366365a01c5c1c354af68b8aac5cf5f18c9 (diff) |
qapi: query-blockstat: add driver specific file-posix stats
A block driver can provide a callback to report driver-specific
statistics.
file-posix driver now reports discard statistics
Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20190923121737.83281-10-anton.nefedov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/qapi.c')
-rw-r--r-- | block/qapi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/block/qapi.c b/block/qapi.c index 69c35c4196..9a5d0c9b27 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -543,6 +543,11 @@ static BlockStats *bdrv_query_bds_stats(BlockDriverState *bs, s->stats->wr_highest_offset = stat64_get(&bs->wr_highest_offset); + s->driver_specific = bdrv_get_specific_stats(bs); + if (s->driver_specific) { + s->has_driver_specific = true; + } + if (bs->file) { s->has_parent = true; s->parent = bdrv_query_bds_stats(bs->file->bs, blk_level); |