From: Max Reitz <mreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create()
Date: Mon, 03 Nov 2014 13:33:54 +0100 [thread overview]
Message-ID: <54577632.5050204@redhat.com> (raw)
In-Reply-To: <20141029104257.GE19774@stefanha-thinkpad.redhat.com>
On 2014-10-29 at 11:42, Stefan Hajnoczi wrote:
> 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:
>>
>> $ 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
> Eric: Leaving "inexistent". It is in several dictionaries besides
> Wiktionary :).
>
> Thanks, applied to my block tree:
> https://github.com/stefanha/qemu/commits/block
Did you really? It appears neither there nor did it in your pull request...
Max
next prev parent reply other threads:[~2014-11-03 12:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 12:30 [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create() Max Reitz
2014-10-27 12:30 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2014-10-27 12:30 ` [Qemu-devel] [PATCH 2/2] iotests: Add test for non-existing backing file Max Reitz
2014-10-27 17:14 ` Eric Blake
2014-10-28 8:29 ` Max Reitz
2014-10-27 12:46 ` [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create() Peter Lieven
2014-10-28 12:27 ` Kevin Wolf
2014-10-29 10:42 ` Stefan Hajnoczi
2014-11-03 12:33 ` Max Reitz [this message]
2014-11-03 13:38 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54577632.5050204@redhat.com \
--to=mreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).