block: Propagate error in bdrv_img_create()
Status from this message: Thanks, applied to my block tree:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | block: Propagate error in bdrv_img_create()block.c | +0 | 0 replies | |
| 2/2 | iotests: Add test for non-existing backing filetests/ tests/ tests/ | +57 | 2 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Peter Lieven | Kevin Wolf |
|---|---|---|
| Series | R-b | R-b |
| 1/2 | ||
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 0/2] block: Propagate error in bdrv_img_create()
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
Signature · 1 line
1.9.3