From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjQiZ-0002DI-On for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:43:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjQiU-00015p-9X for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:43:07 -0400 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:48775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjQiU-00015e-2q for qemu-devel@nongnu.org; Wed, 29 Oct 2014 06:43:02 -0400 Received: by mail-la0-f47.google.com with SMTP id gd6so1097904lab.34 for ; Wed, 29 Oct 2014 03:43:00 -0700 (PDT) Date: Wed, 29 Oct 2014 10:42:57 +0000 From: Stefan Hajnoczi Message-ID: <20141029104257.GE19774@stefanha-thinkpad.redhat.com> References: <1414413009-9008-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jKBxcB1XkHIR0Eqt" Content-Disposition: inline In-Reply-To: <1414413009-9008-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , Peter Lieven , qemu-devel@nongnu.org, Stefan Hajnoczi --jKBxcB1XkHIR0Eqt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 27, 2014 at 01:30:07PM +0100, Max Reitz wrote: > Currently, when trying to create a backed image without specifying its > size, when the backing file does not exist or is not accessible, an > appropriate error message will be generated which is then (in > bdrv_img_create()) prefixed with the image file name and the strerror(). > However, both are generally already part of the bdrv_open() error > message, so we should not double this information. An example: >=20 > $ qemu-img create -f qcow2 -b /tmp/enoent /tmp/img.qcow2 > qemu-img: /tmp/img.qcow2: Could not open '/tmp/enoent': Could not open > '/tmp/enoent': No such file or directory: No such file or directory >=20 > Just propagating the error is sufficient: >=20 > $ qemu-img create -f qcow2 -b /tmp/enoent /tmp/img.qcow2 > qemu-img /tmp/img.qcow2: Could not open '/tmp/enoent': No such file or > directory >=20 >=20 > Max Reitz (2): > block: Propagate error in bdrv_img_create() > iotests: Add test for non-existing backing file >=20 > block.c | 5 ----- > tests/qemu-iotests/111 | 53 ++++++++++++++++++++++++++++++++++++++++= ++++++ > tests/qemu-iotests/111.out | 3 +++ > tests/qemu-iotests/group | 1 + > 4 files changed, 57 insertions(+), 5 deletions(-) > create mode 100755 tests/qemu-iotests/111 > create mode 100644 tests/qemu-iotests/111.out Eric: Leaving "inexistent". It is in several dictionaries besides Wiktionary :). Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --jKBxcB1XkHIR0Eqt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUUMSxAAoJEJykq7OBq3PIvH8H/2nCjg/lBxfQ8RgvdfvmMP2y 235wT+hmIGe75ANvXyOwkrSoQl3WiOzomXqDLd+WaQsbM/eaSDWfET6Pij4XyXPp DjIxKhwxdjX469wNCJ9FPeWxlMt79MobKBEdZS1d9m3rTlYbCM+aq9nZ9m7fWvy2 lQV+N8hhtL65rFdvPju8OZyEUN/OzvS1EQk345nAiHf31CajxD6Dq3coWW+SLPuF J5/Ivj/bpiGACIz8XGJ5Yk6xDNBuaSHEbMHuliSPFTdb2pJ65Zm/9NLUL/2Rb0Oo A5TC8aT7+UcvdC22Ye6R1FRezF/mdyBMtDo8lLx1gA6jlIJUcq+Y18Emrb2Cpvk= =GYy+ -----END PGP SIGNATURE----- --jKBxcB1XkHIR0Eqt--