- Sep 22, 2014
-
-
Stefan Hajnoczi authored
This patch removes support for the cow file format. Normally we do not break backwards compatibility but in this case there is no impact and it is the most logical option. Extraordinary claims require extraordinary evidence so I will show why removing the cow block driver is the right thing to do. The cow file format is the disk image format for Usermode Linux, a way of running a Linux system in userspace. The performance of UML was never great and it was hacky, but it enjoyed some popularity before hardware virtualization support became mainstream. QEMU's block/cow.c is supposed to read this image file format. Unfortunately the file format was underspecified: 1. Earlier Linux versions used the MAXPATHLEN constant for the backing filename field. The value of MAXPATHLEN can change, so Linux switched to a 4096 literal but QEMU has a 1024 literal. 2. Padding was not used on the header struct (both in the Linux kernel and in QEMU) so the struct layout varied across architectures. In particular, i386 and x86_64 were different due to int64_t alignment differences. Linux now uses __attribute__((packed)), QEMU does not. Therefore: 1. QEMU cow images do not conform to the Linux cow image file format. 2. cow images cannot be shared between different host architectures. This means QEMU cow images are useless and QEMU has not had bug reports from users actually hitting these issues. Let's get rid of this thing, it serves no purpose and no one will be affected. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Message-id: 1410877464-20481-1-git-send-email-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Hanna Reitz authored
qcow2 supports more than four options by now, add the new options (overlap check mode and metadata cache size) Signed-off-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 1408557576-14574-5-git-send-email-mreitz@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Hanna Reitz authored
Not every BLOCK_IMAGE_CORRUPTED event must be fatal; for example, when reading from an image, they should generally not be. Nonetheless, even an image only read from may of course be corrupted and this can be detected during normal operation. In this case, a non-fatal event should be emitted, but the image should not be marked corrupt (in accordance to "fatal" set to false). Signed-off-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 1409926039-29044-2-git-send-email-mreitz@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 1410415798-20673-4-git-send-email-famz@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com> Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 1410415798-20673-3-git-send-email-famz@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
This is an analogue to Linux null_blk. It can be used for testing or benchmarking block device emulation and general block layer functionalities such as coroutines and throttling, where disk IO is not necessary or wanted. Use null-aio:// for AIO version, and null-co:// for coroutine version. [Resolved conflict with Fam's async bdrv_aio_cancel() series: 1. Drop .bdrv_aio_cancel() since it is now done by block.c 2. Rename qemu_aio_release() to qemu_aio_unref() --Stefan] Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 1410415798-20673-2-git-send-email-famz@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Sep 12, 2014
-
-
Hu Tao authored
This patch prepares for the subsequent patches. Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Sep 11, 2014
-
-
Luiz Capitulino authored
BLOCK_IO_ERROR events are logged by libvirt, which helps with post mortem analysis of guests. However, one information that we miss today is a human readable string describing the cause of the I/O error. This commit adds that string it to BLOCK_IO_ERROR. Note that this string is a debugging aid for humans, meaning that it should not parsed by applications. Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Sep 10, 2014
-
-
Luiz Capitulino authored
Management software, such as RHEV's vdsm, want to be able to allocate disk space on demand. The basic use case is to start a VM with a small disk and then the disk is enlarged when QEMU hits a ENOSPC condition. To this end, the management software has to be notified when QEMU encounters ENOSPC. The solution implemented by this commit is simple: it extends the BLOCK_IO_ERROR with a 'nospace' key, which is true when QEMU is stopped due to ENOSPC. Note that support for querying this event is already present in query-block by means of the 'io-status' key. Also, the new 'nospace' BLOCK_IO_ERROR field shares the same semantics with 'io-status', which basically means that werror= has to be set to either 'stop' or 'enospc' to enable 'nospace'. Finally, this commit also updates the 'io-status' key doc in the schema with a list of supported device models. Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Sep 08, 2014
-
-
Peter Lieven authored
relaxing the license to LGPLv2+ is intentional. Suggested-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Signed-off-by:
Peter Lieven <pl@kamp.de> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Benoit Canet <benoit.canet@nodalink.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Aug 29, 2014
-
-
Liu Yuan authored
Cc: Eric Blake <eblake@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Benoît Canet <benoit.canet@nodalink.com> Signed-off-by:
Liu Yuan <namei.unix@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Aug 15, 2014
-
-
Chrysostomos Nanakos authored
Introduce new enum BlockdevOptionsArchipelago. @volume: #Name of the Archipelago volume image @mport: #'mport' is the port number on which mapperd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port. @vport: #'vport' is the port number on which vlmcd is listening. This is optional and if not specified, QEMU will make Archipelago to use the default port. @segment: #optional The name of the shared memory segment Archipelago stack is using. This is optional and if not specified, QEMU will make Archipelago use the default value, 'archipelago'. Signed-off-by:
Chrysostomos Nanakos <cnanakos@grnet.gr> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Chunyan Liu authored
Add nocow info in 'qemu-img info' output to show whether the file currently has NOCOW flag set or not. Signed-off-by:
Chunyan Liu <cyliu@suse.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jul 01, 2014
-
-
Jeff Cody authored
On some image chains, QEMU may not always be able to resolve the filenames properly, when updating the backing file of an image after a block job. For instance, certain relative pathnames may fail, or drives may have been specified originally by file descriptor (e.g. /dev/fd/???), or a relative protocol pathname may have been used. In these instances, QEMU may lack the information to be able to make the correct choice, but the user or management layer most likely does have that knowledge. With this extension to the block-stream api, the user is able to change the backing file of the active layer as part of the block-stream operation. This allows the change to be 'safe', in the sense that if the attempt to write the active image metadata fails, then the block-stream operation returns failure, without disrupting the guest. If a backing file string is not specified in the command, the backing file string to use is determined in the same manner as it was previously. Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Jeff Cody authored
On some image chains, QEMU may not always be able to resolve the filenames properly, when updating the backing file of an image after a block commit. For instance, certain relative pathnames may fail, or drives may have been specified originally by file descriptor (e.g. /dev/fd/???), or a relative protocol pathname may have been used. In these instances, QEMU may lack the information to be able to make the correct choice, but the user or management layer most likely does have that knowledge. With this extension to the block-commit api, the user is able to change the backing file of the overlay image as part of the block-commit operation. This allows the change to be 'safe', in the sense that if the attempt to write the overlay image metadata fails, then the block-commit operation returns failure, without disrupting the guest. If the commit top is the active layer, then specifying the backing file string will be treated as an error (there is no overlay image to modify in that case). If a backing file string is not specified in the command, the backing file string to use is determined in the same manner as it was previously. Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Jeff Cody authored
This allows a user to make a live change to the backing file recorded in an open image. The image file to modify can be specified 2 ways: 1) image filename 2) image node-name Note: this does not cause the backing file itself to be reopened; it merely changes the backing filename in the image file structure, and in internal BDS structures. It is the responsibility of the user to pass a filename string that can be resolved when the image chain is reopened, and the filename string is not validated. A good analogy for this command is that it is a live version of 'qemu-img rebase -u', with respect to changing the backing file string. [Jeff is offline so I respun this patch in his absence. Dropped image filename since using node-name is preferred and this is a new command. No need to introduce the limitations of finding images by filename. --Stefan] Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Jeff Cody <jcody@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Benoît Canet authored
fe069d9d had aligned code and documentation while dropping the s from the actual JSON output. Fix that. This also fix test/qemu-iotest/081 since the missing s was causing a permutation. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Jeff Cody authored
Now that active layer block-commit is supported, the 'top' argument no longer needs to be mandatory. Change it to optional, with the default being the active layer in the device chain. [kwolf: Rebased and resolved conflict in tests/qemu-iotests/040] Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Jeff Cody <jcody@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 27, 2014
-
-
Benoît Canet authored
drive-mirror will bdrv_swap the new BDS named node-name with the one pointed by replaces when the mirroring is finished. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Markus Armbruster authored
Commit 5a2d2cbd screwed up the the value of members device and action, breaking tests/qemu-iotests/041. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Tested-By:
Benoit Canet <benoit@irqsave.net> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Markus Armbruster authored
Commit bcada37b dropped the (up to now undocumented) members type, len, offset, speed, breaking tests/qemu-iotests/040 and 041. Restore and document them. This fixes 040, and partially fixes 041. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Tested-By:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Laszlo Ersek authored
Libvirt wants to know about the guest-side connection state of some virtio-serial ports (in particular the one(s) assigned to guest agent(s)). Report such states with a new monitor event. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1080376 Signed-off-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Amit Shah <amit.shah@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Wenchao Xia authored
This patch improves docs and address small issues in event callers. Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Wenchao Xia authored
Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Benoît Canet authored
This new argument can be used to specify the node-name of the new mirrored BDS. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Reviewed-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Benoît Canet authored
On read operations when this parameter is set and some replicas are corrupted while quorum can be reached quorum will proceed to rewrite the correct version of the data to fix the corrupted replicas. This will shine with SSD where the FTL will remap the same block at another place on rewrite. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Reviewed-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Jun 23, 2014
-
-
Wenchao Xia authored
Since BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are related, convert them in one patch. The block_job_event_* functions are used to keep encapsulation of BlockJob structure. Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Wenchao Xia authored
Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Wenchao Xia authored
Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Wenchao Xia authored
Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Wenchao Xia authored
In order to let event defines use existing types later, instead of redefine new ones, some old type defines for spice and vnc are changed, and BlockErrorAction is moved from block.h to qapi schema. Note that BlockErrorAction is not merged with BlockdevOnError. At this point, VncInfo is not made a child of VncBasicInfo, because VncBasicInfo has mandatory fields where VncInfo makes them optional. Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Wenchao Xia authored
This file holds some functions that do not need to be generated. Signed-off-by:
Wenchao Xia <wenchaoqemu@gmail.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
Hu Tao authored
"0x1-0x10" looks better than "0x1-10" Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- Jun 19, 2014
-
-
Michael S. Tsirkin authored
in human mode, we are creating the string: 16-31 (16-31) instead of 16-17 (10-1f) because we forgot to pass 'true' as the human parameter on one of the two calls to format_string. Also, this is a worsening of quality; previously we would produce 16 (0x10) to make it obvious which number was hex. Fix these issues. Reported-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Michael S. Tsirkin authored
Remove dead code. Reset errno to 0 before each strtoull call, as the man page requires. Reported-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Michael S. Tsirkin authored
The following commits: qapi: make string output visitor parse int list qapi: make string input visitor parse int list break with glib < 2.28 since they use the new g_list_free_full function. Open-code that to fix build on old systems. Cc: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Hu Tao authored
Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Tested-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> MST: split up patch
-
Hu Tao authored
Signed-off-by:
Hu Tao <hutao@cn.fujitsu.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Tested-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> MST: split up patch
-
- Jun 16, 2014
-
-
Chunyan Liu authored
qemu_opt_del() already assumes that all QemuOpt instances contain malloc'd name and value; but it had to cast away const because opts_start_struct() was doing its own thing and using static storage instead. By using the correct type and malloced strings everywhere, the usage of this struct becomes clearer. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Leandro Dorileo <l@dorileo.org> Signed-off-by:
Chunyan Liu <cyliu@suse.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Jun 06, 2014
-
-
Benoît Canet authored
Signed-off-by:
Benoit Canet <benoit@irqsave.net> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-