2013-09-18 16:47:41 +02:00
|
|
|
QA output created by 067
|
2014-12-09 08:38:03 +01:00
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
2013-09-18 16:47:41 +02:00
|
|
|
|
|
|
|
=== -drive/-device and device_del ===
|
|
|
|
|
2017-11-23 03:08:28 +01:00
|
|
|
Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk -device virtio-blk,drive=disk,id=virtio0
|
2014-11-17 13:31:06 +01:00
|
|
|
{
|
|
|
|
QMP_VERSION
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
{
|
|
|
|
"io-status": "ok",
|
|
|
|
"device": "disk",
|
|
|
|
"locked": false,
|
|
|
|
"removable": false,
|
|
|
|
"inserted": {
|
|
|
|
"iops_rd": 0,
|
|
|
|
"detect_zeroes": "off",
|
|
|
|
"image": {
|
|
|
|
"virtual-size": 134217728,
|
2017-11-23 03:08:28 +01:00
|
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"cluster-size": 65536,
|
2017-11-23 03:08:28 +01:00
|
|
|
"format": "IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"actual-size": SIZE,
|
|
|
|
"dirty-flag": false
|
|
|
|
},
|
|
|
|
"iops_wr": 0,
|
|
|
|
"ro": false,
|
2015-10-13 01:36:50 +02:00
|
|
|
"node-name": "NODE_NAME",
|
2014-11-17 13:31:06 +01:00
|
|
|
"backing_file_depth": 0,
|
2017-11-23 03:08:28 +01:00
|
|
|
"drv": "IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"iops": 0,
|
|
|
|
"bps_wr": 0,
|
block: add event when disk usage exceeds threshold
Managing applications, like oVirt (http://www.ovirt.org), make extensive
use of thin-provisioned disk images.
To let the guest run smoothly and be not unnecessarily paused, oVirt sets
a disk usage threshold (so called 'high water mark') based on the occupation
of the device, and automatically extends the image once the threshold
is reached or exceeded.
In order to detect the crossing of the threshold, oVirt has no choice but
aggressively polling the QEMU monitor using the query-blockstats command.
This lead to unnecessary system load, and is made even worse under scale:
deployments with hundreds of VMs are no longer rare.
To fix this, this patch adds:
* A new monitor command `block-set-write-threshold', to set a mark for
a given block device.
* A new event `BLOCK_WRITE_THRESHOLD', to report if a block device
usage exceeds the threshold.
* A new `write_threshold' field into the `BlockDeviceInfo' structure,
to report the configured threshold.
This will allow the managing application to use smarter and more
efficient monitoring, greatly reducing the need of polling.
[Updated qemu-iotests 067 output to add the new 'write_threshold'
property. --Stefan]
[Changed g_assert_false() to !g_assert() to fix the build on older glib
versions. --Kevin]
Signed-off-by: Francesco Romani <fromani@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1421068273-692-1-git-send-email-fromani@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-12 14:11:13 +01:00
|
|
|
"write_threshold": 0,
|
2014-11-17 13:31:06 +01:00
|
|
|
"encrypted": false,
|
|
|
|
"bps": 0,
|
|
|
|
"bps_rd": 0,
|
2014-05-22 13:28:45 +02:00
|
|
|
"cache": {
|
|
|
|
"no-flush": false,
|
|
|
|
"direct": false,
|
|
|
|
"writeback": true
|
|
|
|
},
|
2017-11-23 03:08:28 +01:00
|
|
|
"file": "TEST_DIR/t.IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"encryption_key_missing": false
|
|
|
|
},
|
2017-07-11 13:27:38 +02:00
|
|
|
"qdev": "/machine/peripheral/virtio0/virtio-backend",
|
2014-11-17 13:31:06 +01:00
|
|
|
"type": "unknown"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
2013-09-18 16:47:41 +02:00
|
|
|
|
|
|
|
=== -drive/device_add and device_del ===
|
|
|
|
|
2017-11-23 03:08:28 +01:00
|
|
|
Testing: -drive file=TEST_DIR/t.IMGFMT,format=IMGFMT,if=none,id=disk
|
2014-11-17 13:31:06 +01:00
|
|
|
{
|
|
|
|
QMP_VERSION
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
{
|
|
|
|
"device": "disk",
|
|
|
|
"locked": false,
|
|
|
|
"removable": true,
|
|
|
|
"inserted": {
|
|
|
|
"iops_rd": 0,
|
|
|
|
"detect_zeroes": "off",
|
|
|
|
"image": {
|
|
|
|
"virtual-size": 134217728,
|
2017-11-23 03:08:28 +01:00
|
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"cluster-size": 65536,
|
2017-11-23 03:08:28 +01:00
|
|
|
"format": "IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"actual-size": SIZE,
|
|
|
|
"dirty-flag": false
|
|
|
|
},
|
|
|
|
"iops_wr": 0,
|
|
|
|
"ro": false,
|
2015-10-13 01:36:50 +02:00
|
|
|
"node-name": "NODE_NAME",
|
2014-11-17 13:31:06 +01:00
|
|
|
"backing_file_depth": 0,
|
2017-11-23 03:08:28 +01:00
|
|
|
"drv": "IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"iops": 0,
|
|
|
|
"bps_wr": 0,
|
block: add event when disk usage exceeds threshold
Managing applications, like oVirt (http://www.ovirt.org), make extensive
use of thin-provisioned disk images.
To let the guest run smoothly and be not unnecessarily paused, oVirt sets
a disk usage threshold (so called 'high water mark') based on the occupation
of the device, and automatically extends the image once the threshold
is reached or exceeded.
In order to detect the crossing of the threshold, oVirt has no choice but
aggressively polling the QEMU monitor using the query-blockstats command.
This lead to unnecessary system load, and is made even worse under scale:
deployments with hundreds of VMs are no longer rare.
To fix this, this patch adds:
* A new monitor command `block-set-write-threshold', to set a mark for
a given block device.
* A new event `BLOCK_WRITE_THRESHOLD', to report if a block device
usage exceeds the threshold.
* A new `write_threshold' field into the `BlockDeviceInfo' structure,
to report the configured threshold.
This will allow the managing application to use smarter and more
efficient monitoring, greatly reducing the need of polling.
[Updated qemu-iotests 067 output to add the new 'write_threshold'
property. --Stefan]
[Changed g_assert_false() to !g_assert() to fix the build on older glib
versions. --Kevin]
Signed-off-by: Francesco Romani <fromani@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1421068273-692-1-git-send-email-fromani@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-12 14:11:13 +01:00
|
|
|
"write_threshold": 0,
|
2014-11-17 13:31:06 +01:00
|
|
|
"encrypted": false,
|
|
|
|
"bps": 0,
|
|
|
|
"bps_rd": 0,
|
2014-05-22 13:28:45 +02:00
|
|
|
"cache": {
|
|
|
|
"no-flush": false,
|
|
|
|
"direct": false,
|
|
|
|
"writeback": true
|
|
|
|
},
|
2017-11-23 03:08:28 +01:00
|
|
|
"file": "TEST_DIR/t.IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"encryption_key_missing": false
|
|
|
|
},
|
|
|
|
"type": "unknown"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
2013-09-18 16:47:41 +02:00
|
|
|
|
|
|
|
=== drive_add/device_add and device_del ===
|
|
|
|
|
|
|
|
Testing:
|
2014-11-17 13:31:06 +01:00
|
|
|
{
|
|
|
|
QMP_VERSION
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": "OK\r\n"
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
{
|
|
|
|
"device": "disk",
|
|
|
|
"locked": false,
|
|
|
|
"removable": true,
|
|
|
|
"inserted": {
|
|
|
|
"iops_rd": 0,
|
|
|
|
"detect_zeroes": "off",
|
|
|
|
"image": {
|
|
|
|
"virtual-size": 134217728,
|
2017-11-23 03:08:28 +01:00
|
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"cluster-size": 65536,
|
2017-11-23 03:08:28 +01:00
|
|
|
"format": "IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"actual-size": SIZE,
|
|
|
|
"dirty-flag": false
|
|
|
|
},
|
|
|
|
"iops_wr": 0,
|
|
|
|
"ro": false,
|
2015-10-13 01:36:50 +02:00
|
|
|
"node-name": "NODE_NAME",
|
2014-11-17 13:31:06 +01:00
|
|
|
"backing_file_depth": 0,
|
2017-11-23 03:08:28 +01:00
|
|
|
"drv": "IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"iops": 0,
|
|
|
|
"bps_wr": 0,
|
block: add event when disk usage exceeds threshold
Managing applications, like oVirt (http://www.ovirt.org), make extensive
use of thin-provisioned disk images.
To let the guest run smoothly and be not unnecessarily paused, oVirt sets
a disk usage threshold (so called 'high water mark') based on the occupation
of the device, and automatically extends the image once the threshold
is reached or exceeded.
In order to detect the crossing of the threshold, oVirt has no choice but
aggressively polling the QEMU monitor using the query-blockstats command.
This lead to unnecessary system load, and is made even worse under scale:
deployments with hundreds of VMs are no longer rare.
To fix this, this patch adds:
* A new monitor command `block-set-write-threshold', to set a mark for
a given block device.
* A new event `BLOCK_WRITE_THRESHOLD', to report if a block device
usage exceeds the threshold.
* A new `write_threshold' field into the `BlockDeviceInfo' structure,
to report the configured threshold.
This will allow the managing application to use smarter and more
efficient monitoring, greatly reducing the need of polling.
[Updated qemu-iotests 067 output to add the new 'write_threshold'
property. --Stefan]
[Changed g_assert_false() to !g_assert() to fix the build on older glib
versions. --Kevin]
Signed-off-by: Francesco Romani <fromani@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1421068273-692-1-git-send-email-fromani@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-12 14:11:13 +01:00
|
|
|
"write_threshold": 0,
|
2014-11-17 13:31:06 +01:00
|
|
|
"encrypted": false,
|
|
|
|
"bps": 0,
|
|
|
|
"bps_rd": 0,
|
2014-05-22 13:28:45 +02:00
|
|
|
"cache": {
|
|
|
|
"no-flush": false,
|
|
|
|
"direct": false,
|
|
|
|
"writeback": true
|
|
|
|
},
|
2017-11-23 03:08:28 +01:00
|
|
|
"file": "TEST_DIR/t.IMGFMT",
|
2014-11-17 13:31:06 +01:00
|
|
|
"encryption_key_missing": false
|
|
|
|
},
|
|
|
|
"type": "unknown"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
2013-09-18 16:47:41 +02:00
|
|
|
|
|
|
|
=== blockdev_add/device_add and device_del ===
|
|
|
|
|
|
|
|
Testing:
|
2014-11-17 13:31:06 +01:00
|
|
|
{
|
|
|
|
QMP_VERSION
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
{
|
2016-09-21 14:56:01 +02:00
|
|
|
"iops_rd": 0,
|
|
|
|
"detect_zeroes": "off",
|
|
|
|
"image": {
|
|
|
|
"virtual-size": 134217728,
|
2017-11-23 03:08:28 +01:00
|
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"cluster-size": 65536,
|
2017-11-23 03:08:28 +01:00
|
|
|
"format": "IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"actual-size": SIZE,
|
|
|
|
"dirty-flag": false
|
2014-11-17 13:31:06 +01:00
|
|
|
},
|
2016-09-21 14:56:01 +02:00
|
|
|
"iops_wr": 0,
|
|
|
|
"ro": false,
|
|
|
|
"node-name": "disk",
|
|
|
|
"backing_file_depth": 0,
|
2017-11-23 03:08:28 +01:00
|
|
|
"drv": "IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"iops": 0,
|
|
|
|
"bps_wr": 0,
|
|
|
|
"write_threshold": 0,
|
|
|
|
"encrypted": false,
|
|
|
|
"bps": 0,
|
|
|
|
"bps_rd": 0,
|
|
|
|
"cache": {
|
|
|
|
"no-flush": false,
|
|
|
|
"direct": false,
|
|
|
|
"writeback": true
|
|
|
|
},
|
2017-11-23 03:08:28 +01:00
|
|
|
"file": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"encryption_key_missing": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"iops_rd": 0,
|
|
|
|
"detect_zeroes": "off",
|
|
|
|
"image": {
|
|
|
|
"virtual-size": 197120,
|
2017-11-23 03:08:28 +01:00
|
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"format": "file",
|
|
|
|
"actual-size": SIZE,
|
|
|
|
"dirty-flag": false
|
|
|
|
},
|
|
|
|
"iops_wr": 0,
|
|
|
|
"ro": false,
|
|
|
|
"node-name": "NODE_NAME",
|
|
|
|
"backing_file_depth": 0,
|
|
|
|
"drv": "file",
|
|
|
|
"iops": 0,
|
|
|
|
"bps_wr": 0,
|
|
|
|
"write_threshold": 0,
|
|
|
|
"encrypted": false,
|
|
|
|
"bps": 0,
|
|
|
|
"bps_rd": 0,
|
|
|
|
"cache": {
|
|
|
|
"no-flush": false,
|
|
|
|
"direct": false,
|
|
|
|
"writeback": true
|
|
|
|
},
|
2017-11-23 03:08:28 +01:00
|
|
|
"file": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"encryption_key_missing": false
|
2014-11-17 13:31:06 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
{
|
2016-09-21 14:56:01 +02:00
|
|
|
"iops_rd": 0,
|
|
|
|
"detect_zeroes": "off",
|
|
|
|
"image": {
|
|
|
|
"virtual-size": 134217728,
|
2017-11-23 03:08:28 +01:00
|
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"cluster-size": 65536,
|
2017-11-23 03:08:28 +01:00
|
|
|
"format": "IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"actual-size": SIZE,
|
|
|
|
"dirty-flag": false
|
2014-11-17 13:31:06 +01:00
|
|
|
},
|
2016-09-21 14:56:01 +02:00
|
|
|
"iops_wr": 0,
|
|
|
|
"ro": false,
|
|
|
|
"node-name": "disk",
|
|
|
|
"backing_file_depth": 0,
|
2017-11-23 03:08:28 +01:00
|
|
|
"drv": "IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"iops": 0,
|
|
|
|
"bps_wr": 0,
|
|
|
|
"write_threshold": 0,
|
|
|
|
"encrypted": false,
|
|
|
|
"bps": 0,
|
|
|
|
"bps_rd": 0,
|
|
|
|
"cache": {
|
|
|
|
"no-flush": false,
|
|
|
|
"direct": false,
|
|
|
|
"writeback": true
|
|
|
|
},
|
2017-11-23 03:08:28 +01:00
|
|
|
"file": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"encryption_key_missing": false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"iops_rd": 0,
|
|
|
|
"detect_zeroes": "off",
|
|
|
|
"image": {
|
|
|
|
"virtual-size": 197120,
|
2017-11-23 03:08:28 +01:00
|
|
|
"filename": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"format": "file",
|
|
|
|
"actual-size": SIZE,
|
|
|
|
"dirty-flag": false
|
|
|
|
},
|
|
|
|
"iops_wr": 0,
|
|
|
|
"ro": false,
|
|
|
|
"node-name": "NODE_NAME",
|
|
|
|
"backing_file_depth": 0,
|
|
|
|
"drv": "file",
|
|
|
|
"iops": 0,
|
|
|
|
"bps_wr": 0,
|
|
|
|
"write_threshold": 0,
|
|
|
|
"encrypted": false,
|
|
|
|
"bps": 0,
|
|
|
|
"bps_rd": 0,
|
|
|
|
"cache": {
|
|
|
|
"no-flush": false,
|
|
|
|
"direct": false,
|
|
|
|
"writeback": true
|
|
|
|
},
|
2017-11-23 03:08:28 +01:00
|
|
|
"file": "TEST_DIR/t.IMGFMT",
|
2016-09-21 14:56:01 +02:00
|
|
|
"encryption_key_missing": false
|
2014-11-17 13:31:06 +01:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
2017-07-12 13:53:03 +02:00
|
|
|
|
|
|
|
=== Empty drive with -device and device_del ===
|
|
|
|
|
2017-09-13 11:10:38 +02:00
|
|
|
Testing: -device virtio-scsi -device scsi-cd,id=cd0
|
2017-07-12 13:53:03 +02:00
|
|
|
{
|
|
|
|
QMP_VERSION
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
{
|
2018-09-28 11:11:50 +02:00
|
|
|
"io-status": "ok",
|
2017-07-12 13:53:03 +02:00
|
|
|
"device": "",
|
|
|
|
"locked": false,
|
|
|
|
"removable": true,
|
|
|
|
"qdev": "cd0",
|
|
|
|
"tray_open": false,
|
|
|
|
"type": "unknown"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": [
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{
|
|
|
|
"return": {
|
|
|
|
}
|
|
|
|
}
|
2013-09-18 16:47:41 +02:00
|
|
|
*** done
|