qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 3/3] QMP: extend BLOCK_IO_ERROR event with no-spac


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC 3/3] QMP: extend BLOCK_IO_ERROR event with no-space indicator
Date: Tue, 05 Aug 2014 06:19:27 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 07/23/2014 07:17 AM, Luiz Capitulino wrote:
> Management software, such as OpenStack and 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.

I'd still like feedback from OpenStack or vdsm folks stating what they
do with this information, if a bool for ENOSPC is good enough.  In RHEV,
qemu was patched to provide a downstream-only enum of ENOSPC, EIO,
EPERM, and a catch-all for all other errors; if anyone cared about the
distinction between EIO/EPERM and all others, providing a bool for
ENOSPC is a loss of information.  On the other hand, as far as I can
tell, management above libvirt really cared only about ENOSPC (time to
grow the underlying disk) vs. all other errors (tell the user their
guest is hosed), in which case this simpler proposal seems fine to me.
The problem is that since I don't know the upper layer use case, I don't
know if we are painting ourselves into a corner by providing a bool that
we'd have to maintain forever, if we also end up having to provide
EIO/EPERM distinctions.

> 
> 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 quering this event is already present in
> query-block by means of the 'io-status' key and that 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'.
> 
> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
>  block.c              | 22 ++++++++++++++--------
>  qapi/block-core.json |  7 ++++++-
>  2 files changed, 20 insertions(+), 9 deletions(-)

Codewise, this looks correct.  Design-wise, I'd still like more input,
so I'm reluctant to give R-b without discussion.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]