qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v12 05/14] qapi: create BlockdevOptionsCor structure for COR


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v12 05/14] qapi: create BlockdevOptionsCor structure for COR driver
Date: Fri, 23 Oct 2020 17:51:18 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

22.10.2020 21:13, Andrey Shinkevich wrote:
Create the BlockdevOptionsCor structure for COR driver specific options
splitting it off form the BlockdevOptionsGenericFormat. The only option
'bottom' node in the structure denotes an image file that limits the
COR operations in the backing chain.

Suggested-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
---
  qapi/block-core.json | 21 ++++++++++++++++++++-
  1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 0a64306..bf465f6 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -3938,6 +3938,25 @@
    'data': { 'throttle-group': 'str',
              'file' : 'BlockdevRef'
               } }
+
+##
+# @BlockdevOptionsCor:
+#
+# Driver specific block device options for the copy-on-read driver.
+#
+# @bottom: the name of a non-filter node (allocation-bearing layer) that limits
+#          the COR operations in the backing chain (inclusive).
+#          For the block-stream job, it will be the first non-filter overlay of
+#          the base node. We do not involve the base node into the COR
+#          operations because the base may change due to a concurrent
+# block-commit job on the same backing chain. +#
+# Since: 5.2
+##
+{ 'struct': 'BlockdevOptionsCor',
+  'base': 'BlockdevOptionsGenericFormat',
+  'data': { '*bottom': 'str' } }
+
  ##
  # @BlockdevOptions:
  #
@@ -3990,7 +4009,7 @@
        'bochs':      'BlockdevOptionsGenericFormat',
        'cloop':      'BlockdevOptionsGenericFormat',
        'compress':   'BlockdevOptionsGenericFormat',
-      'copy-on-read':'BlockdevOptionsGenericFormat',
+      'copy-on-read':'BlockdevOptionsCor',
        'dmg':        'BlockdevOptionsGenericFormat',
        'file':       'BlockdevOptionsFile',
        'ftp':        'BlockdevOptionsCurlFtp',


Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Still, I'd prefer this to be merged with further two patches, to not add 
non-working interfaces even if this will be fixed two commits further. We do 
similar things sometimes to simplify big commits, but in this case merged 
03/04/05 doesn't seem too big.


--
Best regards,
Vladimir



reply via email to

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