]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: extend BLOCK_IO_ERROR event with nospace indicator
authorLuiz Capitulino <lcapitulino@redhat.com>
Fri, 29 Aug 2014 20:07:27 +0000 (16:07 -0400)
committerKevin Wolf <kwolf@redhat.com>
Wed, 10 Sep 2014 08:41:29 +0000 (10:41 +0200)
commitc7c2ff0c7e5d2c04fc612d74caab19b41c52c2e9
tree82f6ed49bf15b78c0bbc14f8e4b40836f3578d2a
parent10601bef566461efbea81ee344ed3355ce71954a
block: extend BLOCK_IO_ERROR event with nospace indicator

Management software, such as RHEV's vdsm, want to be able to allocate
disk space on demand. The basic use case is to start a VM with a small
disk and then the disk is enlarged when QEMU hits a ENOSPC condition.

To this end, the management software has to be notified when QEMU
encounters ENOSPC. The solution implemented by this commit is simple:
it extends the BLOCK_IO_ERROR with a 'nospace' key, which is true
when QEMU is stopped due to ENOSPC.

Note that support for querying this event is already present in
query-block by means of the 'io-status' key. Also, the new 'nospace'
BLOCK_IO_ERROR field shares the same semantics with 'io-status',
which basically means that werror= has to be set to either
'stop' or 'enospc' to enable 'nospace'.

Finally, this commit also updates the 'io-status' key doc in the
schema with a list of supported device models.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
qapi/block-core.json