Received: from eggs.gnu.org ([2001:4830:134:3::10]:58378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnT6a-0005hq-LX for qemu-devel@nongnu.org; Fri, 23 Sep 2016 12:13:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnT6Y-0004Nf-7O for qemu-devel@nongnu.org; Fri, 23 Sep 2016 12:13:39 -0400 References: <20160908135905.86622-1-pasic@linux.vnet.ibm.com> From: Max Reitz Message-ID: <3c79082e-19f9-6bab-0be2-3752c51faa7b@redhat.com> Date: Fri, 23 Sep 2016 18:13:27 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EesO31GlbTS5jrhgV5esIpqH1Tc2bNMKW" Subject: Re: [Qemu-devel] [PATCH v4 1/1] block: improve error handling in raw_open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Halil Pasic , qemu-block@nongnu.org Cc: Kevin Wolf , Cornelia Huck , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EesO31GlbTS5jrhgV5esIpqH1Tc2bNMKW From: Max Reitz To: Halil Pasic , qemu-block@nongnu.org Cc: Kevin Wolf , Cornelia Huck , qemu-devel@nongnu.org Message-ID: <3c79082e-19f9-6bab-0be2-3752c51faa7b@redhat.com> Subject: Re: [PATCH v4 1/1] block: improve error handling in raw_open References: <20160908135905.86622-1-pasic@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 23.09.2016 18:04, Max Reitz wrote: > On 08.09.2016 15:59, Halil Pasic wrote: >> Make raw_open for POSIX more consistent in handling errors by setting >> the error object also when qemu_open fails. The error object was set >> generally set in case of errors, but I guess this case was overlooked.= >> Do the same for win32. >> >> Signed-off-by: Halil Pasic >> Reviewed-by: Sascha Silbe >> Tested-by: Marc Hartmayer (POSIX only) >> >> --- >> >> Stumbled upon this (POSIX) while testing VMs with too many SCSI disks = in >> respect to my nofile limit. When open hits the nofile limit while tryi= ng >> to hotplug yet another SCSI disk via libvirt we end up with no adequat= e >> error message (one stating too many files). Sadly this patch in not >> sufficient to fix this problem because drive_new (/qemu/blockdev.c) >> handles errors using error_report_err which is documented as not to be= >> used in QMP context. Do not have a patch for that, because I'm unsure >> whats the best way to deal with it. My guess right now is to make sure= >> we propagate errors at least until reaching code which is called only= >> QMP in context and handle communicating the error to the requester of >> the operation there. Any suggestions or ideas? >> >> The win32 part was not tested, and the sole reason I touched it is >> to not introduce unnecessary divergence. >> >> v3 -> v4: >> * rebased on current master >> v2 -> v3: >> * first save errno then error_setg_errno >> v1 -> v2: >> * fixed win32 by the correct error_setg_* >> * use the original errno consequently >> --- >> block/raw-posix.c | 1 + >> block/raw-win32.c | 1 + >> 2 files changed, 2 insertions(+) >=20 > Thank you, I've applied this patch to my block branch: >=20 > https://github.com/XanClic/qemu/commits/block I'm afraid I might have been too hasty. This changes the output of a number of qemu-iotests test cases (at least 51, 69, 82, 85, 111), so their reference output should be amended in this patch, too. Therefore, I've dropped this patch from my queue again. Max --EesO31GlbTS5jrhgV5esIpqH1Tc2bNMKW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEvBAEBCAAZBQJX5VSoEhxtcmVpdHpAcmVkaGF0LmNvbQAKCRD0B9sAYdXPQH4T B/9Sdg6TVNzoOuiy27gY/DRM0j/x60505iv71pqcjq04O6LRyYpUqA6r9vWMI37j spgIa67X1RYE113oAtDH5pmppbrZbgcePHyavS/WOGEsMYhhd02AGNP4dkrz40CI D5+8Z6002qKI6Ds2Z1YBKzbj7CQkjjZH/zuLXzuZ/zc7BymttI6z8J3xLiGHmXJj ciNLqXPdSGktNW5MIaDBAyO2SMDCKfHzzQL/nZBf3WVIvr7YRZokhvg79m9FE5/w 9y1DbEb7ZPOjoQXSkboo6B3EnwAJvljWEatXLS3H39ZgNr+M7BmuhdcFU8Bp0v3E eYNKz1P5HsM4cKwiyEjASEn4 =Bbuu -----END PGP SIGNATURE----- --EesO31GlbTS5jrhgV5esIpqH1Tc2bNMKW--