]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: Add wr_highest_sector blockstat
authorKevin Wolf <kwolf@redhat.com>
Wed, 28 Apr 2010 12:34:01 +0000 (14:34 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 3 May 2010 08:07:32 +0000 (10:07 +0200)
commit294cc35f3db84017e0c176c15dd9a1b711e8354d
tree764975d352dce48acfabe85c9d17bb58a1ee6a0f
parent419b19d9b427fad5ff2fa886d8cc217f7acee18c
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>
block.c
block_int.h