qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 20/21] qapi: publish copy-before-write filter


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 20/21] qapi: publish copy-before-write filter
Date: Tue, 18 May 2021 17:56:33 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

18.05.2021 17:48, Max Reitz wrote:
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote:
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
  qapi/block-core.json | 22 ++++++++++++++++++----
  1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 2ea294129e..f8fbcb6416 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2808,15 +2808,17 @@
  # @blklogwrites: Since 3.0
  # @blkreplay: Since 4.2
  # @compress: Since 5.0
+# @copy-before-write: Since 6.1
  #
  # Since: 2.9
  ##
  { 'enum': 'BlockdevDriver',
    'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs',
-            'cloop', 'compress', 'copy-on-read', 'dmg', 'file', 'ftp', 'ftps',
-            'gluster', 'host_cdrom', 'host_device', 'http', 'https', 'iscsi',
-            'luks', 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels',
-            'preallocate', 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'rbd',
+            'cloop', 'compress', 'copy-before-write', 'copy-on-read', 'dmg',
+            'file', 'ftp', 'ftps', 'gluster', 'host_cdrom', 'host_device',
+            'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs', 'null-aio',
+            'null-co', 'nvme', 'parallels', 'preallocate', 'qcow', 'qcow2',
+            'qed', 'quorum', 'raw', 'rbd',
              { 'name': 'replication', 'if': 'defined(CONFIG_REPLICATION)' },
              'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat' ] }
@@ -3937,6 +3939,17 @@
    'base': 'BlockdevOptionsGenericFormat',
    'data': { '*bottom': 'str' } }
+##
+# @BlockdevOptionsCbw:
+#
+# Driver specific block device options for the copy-before-write driver,

which does so called copy-before-write operations: when data is written to
the filter, it firstly reads corresponding blocks from its file child and
copies them to @target child. After successful copying the write request is
propagated to file child. If copying filed, the original write request is
failed too and no data is written to file child.

+#

I think there should be a description of @target here.

Right, I forget. Something like:

@target: The target for copy-before-write operations.


(Looks good otherwise, though.)

Max

+# Since: 6.1
+##
+{ 'struct': 'BlockdevOptionsCbw',
+  'base': 'BlockdevOptionsGenericFormat',
+  'data': { 'target': 'BlockdevRef' } }
+
  ##
  # @BlockdevOptions:
  #
@@ -3989,6 +4002,7 @@
        'bochs':      'BlockdevOptionsGenericFormat',
        'cloop':      'BlockdevOptionsGenericFormat',
        'compress':   'BlockdevOptionsGenericFormat',
+      'copy-before-write':'BlockdevOptionsCbw',
        'copy-on-read':'BlockdevOptionsCor',
        'dmg':        'BlockdevOptionsGenericFormat',
        'file':       'BlockdevOptionsFile',




--
Best regards,
Vladimir



reply via email to

[Prev in Thread] Current Thread [Next in Thread]