From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xijgn-0005hM-16 for qemu-devel@nongnu.org; Mon, 27 Oct 2014 08:46:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xijgh-0006Dv-D4 for qemu-devel@nongnu.org; Mon, 27 Oct 2014 08:46:24 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:34583 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xijgh-0006De-25 for qemu-devel@nongnu.org; Mon, 27 Oct 2014 08:46:19 -0400 Message-ID: <544E3E96.6050400@kamp.de> Date: Mon, 27 Oct 2014 13:46:14 +0100 From: Peter Lieven MIME-Version: 1.0 References: <1414413009-9008-1-git-send-email-mreitz@redhat.com> In-Reply-To: <1414413009-9008-1-git-send-email-mreitz@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi On 27.10.2014 13:30, 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: > > $ 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 > > Just propagating the error is sufficient: > > $ 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 > > > Max Reitz (2): > block: Propagate error in bdrv_img_create() > iotests: Add test for non-existing backing file > > 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 > Both patches: Reviewed-by: Peter Lieven