diff options
author | Kevin Wolf <kwolf@redhat.com> | 2010-04-28 14:34:01 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-05-03 10:07:32 +0200 |
commit | 294cc35f3db84017e0c176c15dd9a1b711e8354d (patch) | |
tree | 764975d352dce48acfabe85c9d17bb58a1ee6a0f /block_int.h | |
parent | 419b19d9b427fad5ff2fa886d8cc217f7acee18c (diff) | |
download | qemu-294cc35f3db84017e0c176c15dd9a1b711e8354d.zip qemu-294cc35f3db84017e0c176c15dd9a1b711e8354d.tar.gz qemu-294cc35f3db84017e0c176c15dd9a1b711e8354d.tar.bz2 |
block: Add wr_highest_sector blockstat
This adds the wr_highest_sector blockstat which implements what is generally
known as the high watermark. It is the highest offset of a sector written to
the respective BlockDriverState since it has been opened.
The query-blockstat QMP command is extended to add this value to the result,
and also to add the statistics of the underlying protocol in a new "parent"
field. Note that to get the "high watermark" of a qcow2 image, you need to look
into the wr_highest_sector field of the parent (which can be a file, a
host_device, ...). The wr_highest_sector of the qcow2 BlockDriverState itself
is the highest offset on the _virtual_ disk that the guest has written to.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block_int.h')
-rw-r--r-- | block_int.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h index a3afe63..1a7240c 100644 --- a/block_int.h +++ b/block_int.h @@ -167,6 +167,7 @@ struct BlockDriverState { uint64_t wr_bytes; uint64_t rd_ops; uint64_t wr_ops; + uint64_t wr_highest_sector; /* Whether the disk can expand beyond total_sectors */ int growable; |