summaryrefslogtreecommitdiff
path: root/qapi/block-core.json
diff options
context:
space:
mode:
authorAapo Vienamo <aapo@tuxera.com>2018-07-03 17:48:48 +0300
committerKevin Wolf <kwolf@redhat.com>2018-07-05 10:29:19 +0200
commitbfcc224e3cf04ee3fef0eb69984607b5764d9892 (patch)
treebb7160787bef37b88058e2217e4cf6efc5afa263 /qapi/block-core.json
parent7ae9f3f61b2b99e2f348d3dc4a4ef2c6af0ae9bc (diff)
downloadqemu-bfcc224e3cf04ee3fef0eb69984607b5764d9892.zip
block: Add blklogwrites
Implements a block device write logging system, similar to Linux kernel device mapper dm-log-writes. The write operations that are performed on a block device are logged to a file or another block device. The write log format is identical to the dm-log-writes format. Currently, log markers are not supported. This functionality can be used for crash consistency and fs consistency testing. By implementing it in qemu, tests utilizing write logs can be be used to test non-Linux drivers and older kernels. The driver accepts an optional parameter to set the sector size used for logging. This makes the driver require all requests to be aligned to this sector size and also makes offsets and sizes of writes in the log metadata to be expressed in terms of this value (the log format has a granularity of one sector for offsets and sizes). This allows accurate logging of writes to guest block devices that have unusual sector sizes. The implementation is based on the blkverify and blkdebug block drivers. Signed-off-by: Aapo Vienamo <aapo@tuxera.com> Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi/block-core.json')
-rw-r--r--qapi/block-core.json33
1 files changed, 27 insertions, 6 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 90e554ed0f..a9eab8cab8 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2533,16 +2533,17 @@
# @throttle: Since 2.11
# @nvme: Since 2.12
# @copy-on-read: Since 3.0
+# @blklogwrites: Since 3.0
#
# Since: 2.9
##
{ 'enum': 'BlockdevDriver',
- 'data': [ 'blkdebug', 'blkverify', 'bochs', 'cloop', 'copy-on-read',
- 'dmg', 'file', 'ftp', 'ftps', 'gluster', 'host_cdrom',
- 'host_device', 'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs',
- 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow', 'qcow2', 'qed',
- 'quorum', 'raw', 'rbd', 'replication', 'sheepdog', 'ssh',
- 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] }
+ 'data': [ 'blkdebug', 'blklogwrites', 'blkverify', 'bochs', 'cloop',
+ 'copy-on-read', 'dmg', 'file', 'ftp', 'ftps', 'gluster',
+ 'host_cdrom', 'host_device', 'http', 'https', 'iscsi', 'luks',
+ 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow',
+ 'qcow2', 'qed', 'quorum', 'raw', 'rbd', 'replication', 'sheepdog',
+ 'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] }
##
# @BlockdevOptionsFile:
@@ -3045,6 +3046,25 @@
'*set-state': ['BlkdebugSetStateOptions'] } }
##
+# @BlockdevOptionsBlklogwrites:
+#
+# Driver specific block device options for blklogwrites.
+#
+# @file: block device
+#
+# @log: block device used to log writes to @file
+#
+# @log-sector-size: sector size used in logging writes to @file, determines
+# granularity of offsets and sizes of writes (default: 512)
+#
+# Since: 3.0
+##
+{ 'struct': 'BlockdevOptionsBlklogwrites',
+ 'data': { 'file': 'BlockdevRef',
+ 'log': 'BlockdevRef',
+ '*log-sector-size': 'uint32' } }
+
+##
# @BlockdevOptionsBlkverify:
#
# Driver specific block device options for blkverify.
@@ -3563,6 +3583,7 @@
'discriminator': 'driver',
'data': {
'blkdebug': 'BlockdevOptionsBlkdebug',
+ 'blklogwrites':'BlockdevOptionsBlklogwrites',
'blkverify': 'BlockdevOptionsBlkverify',
'bochs': 'BlockdevOptionsGenericFormat',
'cloop': 'BlockdevOptionsGenericFormat',