From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnSxi-0005UE-F8 for qemu-devel@nongnu.org; Fri, 23 Sep 2016 12:04:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnSxg-0004zE-8D for qemu-devel@nongnu.org; Fri, 23 Sep 2016 12:04:29 -0400 References: <20160908135905.86622-1-pasic@linux.vnet.ibm.com> From: Max Reitz Message-ID: Date: Fri, 23 Sep 2016 18:04:15 +0200 MIME-Version: 1.0 In-Reply-To: <20160908135905.86622-1-pasic@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qmwCopcDL3dmbf1JTLTc35ErmxJupjqTf" 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) --qmwCopcDL3dmbf1JTLTc35ErmxJupjqTf From: Max Reitz To: Halil Pasic , qemu-block@nongnu.org Cc: Kevin Wolf , Cornelia Huck , qemu-devel@nongnu.org Message-ID: 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: <20160908135905.86622-1-pasic@linux.vnet.ibm.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Halil Pasic > Reviewed-by: Sascha Silbe > Tested-by: Marc Hartmayer (POSIX only) >=20 > --- >=20 > Stumbled upon this (POSIX) while testing VMs with too many SCSI disks i= n > respect to my nofile limit. When open hits the nofile limit while tryin= g > to hotplug yet another SCSI disk via libvirt we end up with no adequate= > 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? >=20 > The win32 part was not tested, and the sole reason I touched it is > to not introduce unnecessary divergence. >=20 > 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(+) Thank you, I've applied this patch to my block branch: https://github.com/XanClic/qemu/commits/block Max --qmwCopcDL3dmbf1JTLTc35ErmxJupjqTf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEvBAEBCAAZBQJX5VJ/EhxtcmVpdHpAcmVkaGF0LmNvbQAKCRD0B9sAYdXPQM0F B/9QHUtI4A8XEZwIrsj6eE6h2m5bnEs2zKZy3LqZg+YZEjkZG8YWCcR2gMjmsS4d wplQzdrcbftZnYqqDkpjpSHKFC+7iUiAu4DWXlNVil89bwTFelXM6n4IG65ckoky jJ2sFMaUOqAazA9bUXCzrz6gj7OAIvWoQkoEcS7ICHiqHDrRD+1XnNCunr9F8e5I s7Vlq4Rc8rcXXWujDQMal1Jg7tID+ar7aj6dlNZt9fGY5PzJB+TyzSqXRYuj9cRC 3abelnKs6AXN0HbUp01e/+KTeGQiEpLjeBx7VMru5BkcurbcC70HU1SeqJVu+Do0 JbKAMBHVIIVn67I1wQGOsexX =vRLK -----END PGP SIGNATURE----- --qmwCopcDL3dmbf1JTLTc35ErmxJupjqTf--