From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEdiI-0007jh-Eg for qemu-devel@nongnu.org; Tue, 05 Aug 2014 08:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEdiD-0002JE-GC for qemu-devel@nongnu.org; Tue, 05 Aug 2014 08:19:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEdiD-0002JA-8r for qemu-devel@nongnu.org; Tue, 05 Aug 2014 08:19:29 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s75CJS9E008594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 5 Aug 2014 08:19:28 -0400 Message-ID: <53E0CBCF.2040600@redhat.com> Date: Tue, 05 Aug 2014 06:19:27 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406121438-23083-1-git-send-email-lcapitulino@redhat.com> <1406121438-23083-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1406121438-23083-4-git-send-email-lcapitulino@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SoGCB12omXS0g9f2UEWHgthl55eL0FkPf" Subject: Re: [Qemu-devel] [RFC 3/3] QMP: extend BLOCK_IO_ERROR event with no-space indicator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SoGCB12omXS0g9f2UEWHgthl55eL0FkPf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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=3D has to be set to either > 'stop' or 'enospc'. >=20 > Signed-off-by: Luiz Capitulino > --- > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --SoGCB12omXS0g9f2UEWHgthl55eL0FkPf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT4MvPAAoJEKeha0olJ0NqYKEH/i5NW0QeAiz+SQaD/NatmkSI BhNUR1TIIbPymeZyTHnhgdlYCeDUVzKBwrozPKYwRVxFqTzQSR+fm/bdiJYtUQF6 6UFE7W+Y0qC8nY7xuL+myoDSinXpg0gUvTbh9hZYj90jFpXxJlTr1FL5WPFz0lwz mclYPxKVrhnSow9EA5EHsC7QF/YHnv5dlGIhV6fKVqFVIqAv7kMkce6KW3mknQCk Q9i8bWI/UmXB7GLUFcqG9SQLYTRkSW+cwwjPIFZsdwHvZdE0O2Y5ZsPCf5eSZo6z pDUfN0BkVBM8jH2wipQnt6FOrv6ViuXolmNlmAiO0BLkutAFJK2IgbEJz6C/Bt8= =rcI5 -----END PGP SIGNATURE----- --SoGCB12omXS0g9f2UEWHgthl55eL0FkPf--