History | View | Annotate | Download (27.3 kB)
nbd: produce a better error if neither host nor port is passed
Before: $ qemu-io-old qemu-io-old> open -r -o file.driver=nbd qemu-io-old: can't open device (null): Could not open image: Invalid argument $ ./qemu-io-old qemu-io-old> open -r -o file.driver=nbd,file.host=foo,file.path=bar...
nbd: correctly propagate errors
Before: $ ./qemu-io-old qemu-io-old> open -r -o file.driver=nbd one of path and host must be specified. qemu-io-old: can't open device (null): Could not open image: Invalid argument $ ./qemu-io-old qemu-io-old> open -r -o file.driver=nbd,file.host=foo,file.path=bar...
block: Fail gracefully with missing filename
This fixes a regression introduced in commit 2a05cbe42 ('block: Allowblock devices without files'):
$ qemu-system-x86_64 drive driver=fileqemu-system-x86_64: block.c:892: bdrv_open_common: Assertion`!drv>bdrv_needs_filename || filename != ((void *)0)' failed....
block: Allow recursive "file"s
It should be possible to use a format as a driver for a file which inturn requires another file, i.e., nesting file formats.
Allowing nested file formats results in e.g. qcow2 BlockDriverStatesnever being directly passed to bdrv_open_common() from bdrv_file_open(),...
qemu-iotests: drop duplicate virtio-blk initialization failure
Commit 75884afd5c6c42e523b08565e289dbe319e17ad9 ("virtio-blk: Convert toQOM realize") dropped a duplicate error_report() call. Now we no longerget the following error message twice:
QEMU_PROG: -drive if=virtio: Device initialization failed....
qemu-iotests: filter QEMU monitor \r\n
SMTP does not preserve newlines. This is normally not a problem if theemail body uses DOS or UNIX newlines consistently. In 051.out we mixUNIX newlines with DOS newlines (since QEMU monitor output uses \r\n).
This patch filters the QEMU monitor output so the golden master file...
qemu-iotests: Test snapshot mode
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
block: Fail if requested driver is not available
If an explicit driver option is present, but doesn't specify a validdriver, then bdrv_open() should fail instead of probing the format.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Jeff Cody <jcody@redhat.com>...
block: Print its file name if backing file opening failed
If backing file doesn't exist, the error message is confusing andmisleading:
$ qemu /tmp/a.qcow2 qemu: could not open disk image /tmp/a.qcow2: Could not open file: No such file or directory...
qemu-iotests: Fix 051 reference output
Commit 684b254 forgot to update it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev: Remove IF_* check for read-only blockdev_init
IF_NONE allows read-only, which makes forbidding it in this placefor other types pretty much pointless.
Instead, make sure that all devices for which the check would haveerrored out check in their init function that they don't get a read-only...
block/raw-posix: Employ error parameter
Make use of the error parameter in the opening and creating functions inblock/raw-posix.c.
Signed-off-by: Max Reitz <mreitz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: add test for backing file overriding
Test that backing.file.filename option can be parsed and override thebacking file from image (backing file reflected with "info block").
Signed-off-by: Fam Zheng <famz@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-iotests: Adjustments due to error propagation
When opening/creating images, propagating errors instead of immediatelyemitting them on occurrence results in errors generally being printed ona single line rather than being split up into multiple ones. This in...
qemu-iotests: Update reference output for 051
qemu-iotests: filter QEMU version in monitor banner
Filter out the QEMU monitor version banner so that tests do not breakwhen the QEMU version number is changed.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev: Rename 'readonly' option to 'read-only'
Option name cleanup before it becomes a QMP API.
qcow2: Use dashes instead of underscores in options
This is what QMP wants to use. The options haven't been enabled in anyrelease yet, so we're still free to change them.
block: Don't parse protocol from file.filename
One of the major reasons for doing something new for -blockdev andblockdev-add was that the old block layer code parses filenames insteadof just taking them literally. So we should really leave it untouched...
qemu-iotests: Update 051 reference output
This has been broken by commit bd5c51ee.
block: Fail gracefully when using a format driver on protocol level
Specifying the wrong driver could fail an assertion:
$ qemu-system-x86_64 -drive file.driver=qcow2,file=xqemu-system-x86_64: block.c:721: bdrv_open_common: Assertion `file !=((void *)0)' failed....
qemu-iotests: filter QEMU_PROG in 051.out
Filter the name of the QEMU executable so the output can be diffed nomatter what QEMU_PROG is (e.g. qemu-system-x86_64).
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qemu-iotests: Add test for -drive options
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>