qemu/tests/qemu-iotests/227.out
Denis V. Lunev 62a6c300f1 block: add missed block_acct_setup with new block device init procedure
Commit 5f76a7aac1 is looking harmless from
the first glance, but it has changed things a lot. 'libvirt' uses it to
detect that it should follow new initialization way and this changes
things considerably. With this procedure followed, blockdev_init() is
not called anymore and thus block_acct_setup() helper is not called.

This means in particular that defaults for block accounting statistics
are changed and account_invalid/account_failed are actually initialized
as false instead of true originally.

This commit changes things to match original world. There are the following
constraints:
* new default value in block_acct_init() is set to true
* block_acct_setup() inside blockdev_init() is called before
  blkconf_apply_backend_options()
* thus newly created option in block device properties has precedence if
  specified

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
CC: Peter Krempa <pkrempa@redhat.com>
CC: Markus Armbruster <armbru@redhat.com>
CC: John Snow <jsnow@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220824095044.166009-3-den@openvz.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2022-09-30 18:42:34 +02:00

228 lines
5.1 KiB
Plaintext

QA output created by 227
=== blockstats with -drive if=virtio ===
Testing: -drive driver=null-co,read-zeroes=on,if=virtio
{
QMP_VERSION
}
{
"return": {
}
}
{
"return": [
{
"device": "virtio0",
"stats": {
"unmap_operations": 0,
"unmap_merged": 0,
"flush_total_time_ns": 0,
"wr_highest_offset": 0,
"wr_total_time_ns": 0,
"failed_wr_operations": 0,
"failed_rd_operations": 0,
"wr_merged": 0,
"wr_bytes": 0,
"timed_stats": [
],
"failed_unmap_operations": 0,
"failed_flush_operations": 0,
"account_invalid": true,
"rd_total_time_ns": 0,
"invalid_unmap_operations": 0,
"flush_operations": 0,
"wr_operations": 0,
"unmap_bytes": 0,
"rd_merged": 0,
"rd_bytes": 0,
"unmap_total_time_ns": 0,
"invalid_flush_operations": 0,
"account_failed": true,
"rd_operations": 0,
"invalid_wr_operations": 0,
"invalid_rd_operations": 0
},
"node-name": "NODE_NAME",
"qdev": "/machine/peripheral-anon/device[0]/virtio-backend"
}
]
}
{
"return": {
}
}
{
"timestamp": {
"seconds": TIMESTAMP,
"microseconds": TIMESTAMP
},
"event": "SHUTDOWN",
"data": {
"guest": false,
"reason": "host-qmp-quit"
}
}
=== blockstats with -drive if=none ===
Testing: -drive driver=null-co,if=none
{
QMP_VERSION
}
{
"return": {
}
}
{
"return": [
{
"device": "none0",
"stats": {
"unmap_operations": 0,
"unmap_merged": 0,
"flush_total_time_ns": 0,
"wr_highest_offset": 0,
"wr_total_time_ns": 0,
"failed_wr_operations": 0,
"failed_rd_operations": 0,
"wr_merged": 0,
"wr_bytes": 0,
"timed_stats": [
],
"failed_unmap_operations": 0,
"failed_flush_operations": 0,
"account_invalid": true,
"rd_total_time_ns": 0,
"invalid_unmap_operations": 0,
"flush_operations": 0,
"wr_operations": 0,
"unmap_bytes": 0,
"rd_merged": 0,
"rd_bytes": 0,
"unmap_total_time_ns": 0,
"invalid_flush_operations": 0,
"account_failed": true,
"rd_operations": 0,
"invalid_wr_operations": 0,
"invalid_rd_operations": 0
},
"node-name": "NODE_NAME"
}
]
}
{
"return": {
}
}
{
"timestamp": {
"seconds": TIMESTAMP,
"microseconds": TIMESTAMP
},
"event": "SHUTDOWN",
"data": {
"guest": false,
"reason": "host-qmp-quit"
}
}
=== blockstats with -blockdev ===
Testing: -blockdev driver=null-co,node-name=null
{
QMP_VERSION
}
{
"return": {
}
}
{
"return": [
]
}
{
"return": {
}
}
{
"timestamp": {
"seconds": TIMESTAMP,
"microseconds": TIMESTAMP
},
"event": "SHUTDOWN",
"data": {
"guest": false,
"reason": "host-qmp-quit"
}
}
=== blockstats with -blockdev and -device ===
Testing: -blockdev driver=null-co,read-zeroes=on,node-name=null -device virtio-blk,drive=null,id=virtio0
{
QMP_VERSION
}
{
"return": {
}
}
{
"return": [
{
"device": "",
"stats": {
"unmap_operations": 0,
"unmap_merged": 0,
"flush_total_time_ns": 0,
"wr_highest_offset": 0,
"wr_total_time_ns": 0,
"failed_wr_operations": 0,
"failed_rd_operations": 0,
"wr_merged": 0,
"wr_bytes": 0,
"timed_stats": [
],
"failed_unmap_operations": 0,
"failed_flush_operations": 0,
"account_invalid": true,
"rd_total_time_ns": 0,
"invalid_unmap_operations": 0,
"flush_operations": 0,
"wr_operations": 0,
"unmap_bytes": 0,
"rd_merged": 0,
"rd_bytes": 0,
"unmap_total_time_ns": 0,
"invalid_flush_operations": 0,
"account_failed": true,
"rd_operations": 0,
"invalid_wr_operations": 0,
"invalid_rd_operations": 0
},
"node-name": "null",
"qdev": "/machine/peripheral/virtio0/virtio-backend"
}
]
}
{
"return": {
}
}
{
"timestamp": {
"seconds": TIMESTAMP,
"microseconds": TIMESTAMP
},
"event": "SHUTDOWN",
"data": {
"guest": false,
"reason": "host-qmp-quit"
}
}
*** done