On 06/07/2018 09:32 PM, Eric Blake wrote:
On 06/07/2018 09:40 AM, Ari Sundholm wrote:
From: Aapo Vienamo <a...@tuxera.com>

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 implementation is based on the blkverify and blkdebug block drivers.

Signed-off-by: Aapo Vienamo <a...@tuxera.com>
Signed-off-by: Ari Sundholm <a...@tuxera.com>
---

+++ b/qapi/block-core.json
@@ -2429,12 +2429,12 @@
  # Since: 2.9
  ##
  { 'enum': 'BlockdevDriver',

Missing a comment:

# @blklogwrites: Since 3.0


Thanks, will add in v4.

-  '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:
@@ -2949,6 +2949,21 @@
              '*set-state': ['BlkdebugSetStateOptions'] } }
  ##
+# @BlockdevOptionsBlklogwrites:
+#
+# Driver specific block device options for blklogwrites.
+#
+# @raw:     block device
+#
+# @log:     block device used to log writes on @raw
+#
+# Since: foo

s/foo/3.0/


Oops, this was a placeholder that I ended up forgetting about. Will be fixed in v4.

Thanks,
Ari Sundholm
a...@tuxera.com

+##
+{ 'struct': 'BlockdevOptionsBlklogwrites',
+  'data': { 'raw': 'BlockdevRef',
+            'log': 'BlockdevRef' } }
+
+##
  # @BlockdevOptionsBlkverify:
  #
  # Driver specific block device options for blkverify.
@@ -3443,6 +3458,7 @@
    'discriminator': 'driver',
    'data': {
        'blkdebug':   'BlockdevOptionsBlkdebug',
+      'blklogwrites': 'BlockdevOptionsBlklogwrites',
        'blkverify':  'BlockdevOptionsBlkverify',
        'bochs':      'BlockdevOptionsGenericFormat',
        'cloop':      'BlockdevOptionsGenericFormat',
@@ -3971,6 +3987,7 @@
    'discriminator': 'driver',
    'data': {
        'blkdebug':       'BlockdevCreateNotSupported',
+      'blklogwrites':   'BlockdevCreateNotSupported',
        'blkverify':      'BlockdevCreateNotSupported',
        'bochs':          'BlockdevCreateNotSupported',
        'cloop':          'BlockdevCreateNotSupported',




Reply via email to