From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bw51b-0003os-NT for qemu-devel@nongnu.org; Mon, 17 Oct 2016 06:20:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bw51a-0002da-TO for qemu-devel@nongnu.org; Mon, 17 Oct 2016 06:20:07 -0400 Date: Mon, 17 Oct 2016 12:19:57 +0200 From: Kevin Wolf Message-ID: <20161017101957.GC4821@noname.redhat.com> References: <20161011141235.95730-1-pasic@linux.vnet.ibm.com> <20161014155919.GI3482@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hQiwHBbRI9kgIhsi" Content-Disposition: inline In-Reply-To: <20161014155919.GI3482@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5 1/1] block: improve error handling in raw_open List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Halil Pasic , qemu-block@nongnu.org, Cornelia Huck , qemu-devel@nongnu.org, Max Reitz --hQiwHBbRI9kgIhsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 14.10.2016 um 17:59 hat Stefan Hajnoczi geschrieben: > On Tue, Oct 11, 2016 at 04:12:35PM +0200, 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 in > > respect to my nofile limit. When open hits the nofile limit while trying > > 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. > >=20 > > The win32 part was not tested, and the sole reason I touched it is > > to not introduce unnecessary divergence. > >=20 > > v4 -> v5: > > * fix qemu-iotests by adding the filename to the message >=20 > This patch doesn't modify any iotests golden master files. Does this > mean the iotests output is unchanged? >=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(+) >=20 > Reviewed-by: Stefan Hajnoczi Thanks, applied to the block branch. Kevin --hQiwHBbRI9kgIhsi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJYBKXNAAoJEH8JsnLIjy/W+Y0QAMQj3wV2gzQLySjwBP+vcIs1 E5Xo2BDqOFE5YXHjFjHhC2zyNgou51/yHwPg2JrSXROrI+8dcWGYI9JuvW31/xO7 wNUnNsaoPHtllpJ1uDpJ0+hMHucTziDY9urQ9qCMOlexlhufTutAi2L1TsPRL0UJ 7tLeYJ2C3dhKRR7aej8bJv0uZVYIcYm5nQ1LzWEB9LfgEYJnEHzVUjI1MdQKK2fi yOq9xy5LQAkckMtJxCWBTxxxd0qGlxeumIOBnc4ZwGbA8hzZeLlKSUTcflt79JuN NyCwxWENtXZB5Xz3PNkRVeWvr1UGjSNzyDsGEiSVi7duXFlzZilWILNBBa2PT6ok Yg0OUJcYaxJ/O0/L4A07ta1hYzNKcAMoUxo7XKh8uQlziXou1+elx46ZFgOAx+di oX26jZpQAq6SU0qBFByo4Q1iylZSIk9wk0O3z/DB53aFaT+baM8miflhW4wJVWiJ Jf6C4a87pG5US8Kmh2s/8WyMk9lSHEd2i9KPe75TJDhunrIYJgoZQw8dWM9F95jT VPupUzanS+oszokHB4GXPFnIu5n+hWEG8U3Zvd11vVo8u4QPxlM3zWkeBVO9oSI2 8olVJ6syisbxv7U/hQDF4f7Fxjz6p2sL/zKFXWcRl+cXDKD3qe0h9ZCmfHT1wo1z YmnnfVwPe6FA71T01L9i =Mdyz -----END PGP SIGNATURE----- --hQiwHBbRI9kgIhsi--