qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, armbru@redhat.com
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	[thread overview]
Message-ID: <53E0CBCF.2040600@redhat.com> (raw)
In-Reply-To: <1406121438-23083-4-git-send-email-lcapitulino@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2168 bytes --]

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 <lcapitulino@redhat.com>
> ---
>  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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  reply	other threads:[~2014-08-05 12:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 13:17 [Qemu-devel] [RFC 0/3] QMP: extend BLOCK_IO_ERROR event Luiz Capitulino
2014-07-23 13:17 ` [Qemu-devel] [RFC 1/3] qapi: block-core.json: improve query-block doc Luiz Capitulino
2014-08-05 12:13   ` Eric Blake
2014-07-23 13:17 ` [Qemu-devel] [RFC 2/3] QMP: rate limit BLOCK_IO_ERROR Luiz Capitulino
2014-08-05 12:14   ` Eric Blake
2014-08-11  8:17   ` Daniel P. Berrange
2014-08-11 11:07     ` Markus Armbruster
2014-08-11 11:15       ` Daniel P. Berrange
2014-08-17  6:08         ` Paolo Bonzini
2014-08-14 13:13     ` Luiz Capitulino
2014-07-23 13:17 ` [Qemu-devel] [RFC 3/3] QMP: extend BLOCK_IO_ERROR event with no-space indicator Luiz Capitulino
2014-08-05 12:19   ` Eric Blake [this message]
2014-08-14 13:07     ` Luiz Capitulino
2014-08-05  9:13 ` [Qemu-devel] [RFC 0/3] QMP: extend BLOCK_IO_ERROR event Kevin Wolf
2014-08-14 13:05   ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E0CBCF.2040600@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).