a6c90cbc | 13-Jan-2015 |
Markus Armbruster <armbru@redhat.com> |
qmp: Eliminate silly QERR_COMMAND_NOT_FOUND macro
The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *
qmp: Eliminate silly QERR_COMMAND_NOT_FOUND macro
The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean this one up.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
c29c1dd3 | 18-Dec-2014 |
Fam Zheng <famz@redhat.com> |
qmp: Add command 'blockdev-backup'
Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file.
Also add blocker on target bs, since the target is
qmp: Add command 'blockdev-backup'
Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file.
Also add blocker on target bs, since the target is also a named device now.
Add check and report error for bs == target which became possible but is an illegal case with introduction of blockdev-backup.
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1418899027-8445-3-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
show more ...
|
a06e4355 | 15-Dec-2014 |
Fam Zheng <famz@redhat.com> |
qapi: Fix document for BlockStats.node-name
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1418694024-26498-1-git-send-email-famz@redhat.com Signe
qapi: Fix document for BlockStats.node-name
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1418694024-26498-1-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
show more ...
|
9e193c5a | 22-May-2014 |
Kevin Wolf <kwolf@redhat.com> |
block/qapi: Add cache information to query-block
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> |
f71eaa74 | 30-Oct-2014 |
Fam Zheng <famz@redhat.com> |
qmp: Add optional switch "query-nodes" in query-blockstats
This bool option will allow query all the node names. It iterates all the BDSes that are assigned a name, also in this case don't query up
qmp: Add optional switch "query-nodes" in query-blockstats
This bool option will allow query all the node names. It iterates all the BDSes that are assigned a name, also in this case don't query up the backing chain.
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
4875a779 | 30-Oct-2014 |
Fam Zheng <famz@redhat.com> |
block: Include "node-name" if present in query-blockstats
Node name is a better identifier of BDS.
We will want to query statistics of a BDS node buried in the BDS graph, so reporting the node's na
block: Include "node-name" if present in query-blockstats
Node name is a better identifier of BDS.
We will want to query statistics of a BDS node buried in the BDS graph, so reporting the node's name if there is one will do the trick.
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
d1048bef | 21-Nov-2014 |
Don Slutz <dslutz@verizon.com> |
-machine vmport=auto: Fix handling of VMWare ioport emulation for xen
c/s 9b23cfb76b3a5e9eb5cc899eaf2f46bc46d33ba4
or
c/s b154537ad07598377ebf98252fb7d2aff127983b
moved the testing of xen_enabled
-machine vmport=auto: Fix handling of VMWare ioport emulation for xen
c/s 9b23cfb76b3a5e9eb5cc899eaf2f46bc46d33ba4
or
c/s b154537ad07598377ebf98252fb7d2aff127983b
moved the testing of xen_enabled() from pc_init1() to pc_machine_initfn().
xen_enabled() does not return the correct value in pc_machine_initfn().
Changed vmport from a bool to an enum. Added the value "auto" to do the old way. Move check of xen_enabled() back to pc_init1().
Acked-by: Eric Blake <eblake@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Don Slutz <dslutz@verizon.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
24bf10da | 21-Nov-2014 |
Kevin Wolf <kwolf@redhat.com> |
Revert "qemu-img info: show nocow info"
This reverts commit 000c4dfff4d7686e2fba3066a477a1290ed60622.
The main reason for reverting this commit before the 2.2 release is that it adds a QAPI interfa
Revert "qemu-img info: show nocow info"
This reverts commit 000c4dfff4d7686e2fba3066a477a1290ed60622.
The main reason for reverting this commit before the 2.2 release is that it adds a QAPI interface that we don't want to keep: The 'nocow' flag doesn't generally make sense for block nodes, but only for the raw-posix driver. It should therefore be part of ImageInfoSpecific rather than ImageInfo.
The commit contains more problems, but unlike the API stability issue they wouldn't justify reverting it.
Conflicts: block/qapi.c
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
d21de4d9 | 07-Nov-2014 |
Max Reitz <mreitz@redhat.com> |
qapi: Complete BlkdebugEvent
Several events were missing from the QAPI enum, add them.
Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin W
qapi: Complete BlkdebugEvent
Several events were missing from the QAPI enum, add them.
Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
ef6dbf1e | 24-Oct-2014 |
Max Reitz <mreitz@redhat.com> |
blockjob: Add "ready" field
When a block job signals readiness, this is currently reported only through QMP. If qemu wants to use block jobs for internal tasks, there needs to be another way to corr
blockjob: Add "ready" field
When a block job signals readiness, this is currently reported only through QMP. If qemu wants to use block jobs for internal tasks, there needs to be another way to correctly detect when a block job may be completed.
For this reason, introduce a bool "ready" which is set when the block job may be completed.
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-id: 1414159063-25977-6-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
9009b196 | 30-Sep-2014 |
Max Reitz <mreitz@redhat.com> |
qapi: Add corrupt field to ImageInfoSpecificQCow2
Just like lazy-refcounts, this field will be present iff the qcow2 compat level is 1.1 (or probably any future revision).
As expected, this breaks
qapi: Add corrupt field to ImageInfoSpecificQCow2
Just like lazy-refcounts, this field will be present iff the qcow2 compat level is 1.1 (or probably any future revision).
As expected, this breaks some tests due to the new field present in qemu-img info output; so fix their output accordingly.
Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412105489-7681-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
146db9f9 | 18-Sep-2014 |
Michael Roth <mdroth@linux.vnet.ibm.com> |
qapi: dealloc visitor, implement visit_start_union
If the .data field of a QAPI Union is NULL, we don't need to free any of the union fields.
Make use of the new visit_start_union interface to acce
qapi: dealloc visitor, implement visit_start_union
If the .data field of a QAPI Union is NULL, we don't need to free any of the union fields.
Make use of the new visit_start_union interface to access this information and instruct the generated code to not visit these fields when this occurs.
Cc: qemu-stable@nongnu.org Reported-by: Fam Zheng <famz@redhat.com> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
show more ...
|
cee2dedb | 18-Sep-2014 |
Michael Roth <mdroth@linux.vnet.ibm.com> |
qapi: add visit_start_union and visit_end_union
In some cases an input visitor might bail out on filling out a struct for various reasons, such as missing fields when running in strict mode. In the
qapi: add visit_start_union and visit_end_union
In some cases an input visitor might bail out on filling out a struct for various reasons, such as missing fields when running in strict mode. In the case of a QAPI Union type, this may lead to cases where the .kind field which encodes the union type is uninitialized. Subsequently, other visitors, such as the dealloc visitor, may use this .kind value as if it were initialized, leading to assumptions about the union type which in this case may lead to segfaults. For example, freeing an integer value.
However, we can generally rely on the fact that the always-present .data void * field that we generate for these union types will always be NULL in cases where .kind is uninitialized (at least, there shouldn't be a reason where we'd do this purposefully).
So pass this information on to Visitor implementation via these optional start_union/end_union interfaces so this information can be used to guard against the situation above. We will make use of this information in a subsequent patch for the dealloc visitor.
Cc: qemu-stable@nongnu.org Reported-by: Fam Zheng <famz@redhat.com> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
show more ...
|
1dde0f48 | 25-Aug-2014 |
Lluís Vilanova <vilanova@ac.upc.edu> |
trace: [qmp] Add commands to query and control event tracing state
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 20140825111957.31112.31733.stgit@fimbulvetr.bsc.es Signed-off-by: S
trace: [qmp] Add commands to query and control event tracing state
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 20140825111957.31112.31733.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
550830f9 | 16-Sep-2014 |
Stefan Hajnoczi <stefanha@redhat.com> |
block: delete cow block driver
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 op
block: delete cow block driver
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>
show more ...
|
f6585811 | 20-Aug-2014 |
Max Reitz <mreitz@redhat.com> |
qapi/block-core: Add "new" qcow2 options
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>
qapi/block-core: Add "new" qcow2 options
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>
show more ...
|
9bf040b9 | 05-Sep-2014 |
Max Reitz <mreitz@redhat.com> |
qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED
Not every BLOCK_IMAGE_CORRUPTED event must be fatal; for example, when reading from an image, they should generally not be. Nonetheless, even an imag
qapi/block: Add "fatal" to BLOCK_IMAGE_CORRUPTED
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>
show more ...
|
db866be9 | 11-Sep-2014 |
Fam Zheng <famz@redhat.com> |
qapi: Sort items in BlockdevOptions definition
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
qapi: Sort items in BlockdevOptions definition
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>
show more ...
|
e8712cea | 11-Sep-2014 |
Fam Zheng <famz@redhat.com> |
qapi: Sort BlockdevDriver enum data list
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: 1410
qapi: Sort BlockdevDriver enum data list
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>
show more ...
|
e819ab22 | 11-Sep-2014 |
Fam Zheng <famz@redhat.com> |
block: Introduce "null" drivers
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 an
block: Introduce "null" drivers
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>
show more ...
|
ffeaac9b | 10-Sep-2014 |
Hu Tao <hutao@cn.fujitsu.com> |
qapi: introduce PreallocMode and new PreallocModes full and falloc.
This patch prepares for the subsequent patches.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Max Reitz <mreitz@redha
qapi: introduce PreallocMode and new PreallocModes full and falloc.
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>
show more ...
|
624ff573 | 11-Sep-2014 |
Luiz Capitulino <lcapitulino@redhat.com> |
block: extend BLOCK_IO_ERROR with reason string
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 r
block: extend BLOCK_IO_ERROR with reason string
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>
show more ...
|
c7c2ff0c | 29-Aug-2014 |
Luiz Capitulino <lcapitulino@redhat.com> |
block: extend BLOCK_IO_ERROR event with nospace indicator
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
block: extend BLOCK_IO_ERROR event with nospace indicator
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>
show more ...
|
9e7dac7c | 13-Aug-2014 |
Peter Lieven <pl@kamp.de> |
rename parse_enum_option to qapi_enum_parse and make it public
relaxing the license to LGPLv2+ is intentional.
Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fu
rename parse_enum_option to qapi_enum_parse and make it public
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>
show more ...
|
62c6031f | 18-Aug-2014 |
Liu Yuan <namei.unix@gmail.com> |
qapi: add read-pattern enum for quorum
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 <n
qapi: add read-pattern enum for quorum
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>
show more ...
|