[PATCH v4 5/5] block: Deprecate transaction type drive-backup

Markus Armbruster posted 5 patches 4 years, 3 months ago
There is a newer version of this series
[PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by Markus Armbruster 4 years, 3 months ago
Several moons ago, Vladimir posted

    Subject: [PATCH v2 3/3] qapi: deprecate drive-backup
    Date: Wed,  5 May 2021 16:58:03 +0300
    Message-Id: <20210505135803.67896-4-vsementsov@virtuozzo.com>
    https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg01394.html

with this

    TODO: We also need to deprecate drive-backup transaction action..
    But union members in QAPI doesn't support 'deprecated' feature. I tried
    to dig a bit, but failed :/ Markus, could you please help with it? At
    least by advice?

This is one way to resolve it.  Sorry it took so long.

John explored another way, namely adding feature flags to union
branches.  Could also be useful, say to add different features to
branches in multiple unions sharing the same tag enum.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qapi/transaction.json | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/qapi/transaction.json b/qapi/transaction.json
index d175b5f863..381a2df782 100644
--- a/qapi/transaction.json
+++ b/qapi/transaction.json
@@ -54,6 +54,10 @@
 # @blockdev-snapshot-sync: since 1.1
 # @drive-backup: Since 1.6
 #
+# Features:
+# @deprecated: Member @drive-backup is deprecated.  Use member
+#              @blockdev-backup instead.
+#
 # Since: 1.1
 ##
 { 'enum': 'TransactionActionKind',
@@ -62,7 +66,7 @@
             'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge',
             'blockdev-backup', 'blockdev-snapshot',
             'blockdev-snapshot-internal-sync', 'blockdev-snapshot-sync',
-            'drive-backup' ] }
+            { 'name': 'drive-backup', 'features': [ 'deprecated' ] } ] }
 
 ##
 # @AbortWrapper:
-- 
2.31.1

Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by John Snow 4 years, 3 months ago
On Mon, Oct 25, 2021 at 12:24 AM Markus Armbruster <armbru@redhat.com>
wrote:

> Several moons ago, Vladimir posted
>
>     Subject: [PATCH v2 3/3] qapi: deprecate drive-backup
>     Date: Wed,  5 May 2021 16:58:03 +0300
>     Message-Id: <20210505135803.67896-4-vsementsov@virtuozzo.com>
>     https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg01394.html
>
> with this
>
>     TODO: We also need to deprecate drive-backup transaction action..
>     But union members in QAPI doesn't support 'deprecated' feature. I tried
>     to dig a bit, but failed :/ Markus, could you please help with it? At
>     least by advice?
>
> This is one way to resolve it.  Sorry it took so long.
>
>
I'll share the blame for not pushing back on the other series, but ...


> John explored another way, namely adding feature flags to union
> branches.  Could also be useful, say to add different features to
> branches in multiple unions sharing the same tag enum.
>
>
... this way seems simpler for now, and I trust your intuition on what's
easier to support as I don't have a solid grasp of the C interfaces at play
for actually parsing the input. We can always revisit the other thing later
if/when we need it.


> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qapi/transaction.json | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/transaction.json b/qapi/transaction.json
> index d175b5f863..381a2df782 100644
> --- a/qapi/transaction.json
> +++ b/qapi/transaction.json
> @@ -54,6 +54,10 @@
>  # @blockdev-snapshot-sync: since 1.1
>  # @drive-backup: Since 1.6
>  #
> +# Features:
> +# @deprecated: Member @drive-backup is deprecated.  Use member
> +#              @blockdev-backup instead.
> +#
>  # Since: 1.1
>  ##
>  { 'enum': 'TransactionActionKind',
> @@ -62,7 +66,7 @@
>              'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge',
>              'blockdev-backup', 'blockdev-snapshot',
>              'blockdev-snapshot-internal-sync', 'blockdev-snapshot-sync',
> -            'drive-backup' ] }
> +            { 'name': 'drive-backup', 'features': [ 'deprecated' ] } ] }
>
>  ##
>  # @AbortWrapper:
> --
> 2.31.1
>
>
Seems pretty clean to me overall. What's the reason for wanting it to be
RFC?
Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by Markus Armbruster 4 years, 3 months ago
John Snow <jsnow@redhat.com> writes:

> On Mon, Oct 25, 2021 at 12:24 AM Markus Armbruster <armbru@redhat.com>
> wrote:
>
>> Several moons ago, Vladimir posted
>>
>>     Subject: [PATCH v2 3/3] qapi: deprecate drive-backup
>>     Date: Wed,  5 May 2021 16:58:03 +0300
>>     Message-Id: <20210505135803.67896-4-vsementsov@virtuozzo.com>
>>     https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg01394.html
>>
>> with this
>>
>>     TODO: We also need to deprecate drive-backup transaction action..
>>     But union members in QAPI doesn't support 'deprecated' feature. I tried
>>     to dig a bit, but failed :/ Markus, could you please help with it? At
>>     least by advice?
>>
>> This is one way to resolve it.  Sorry it took so long.
>>
>>
> I'll share the blame for not pushing back on the other series, but ...
>
>
>> John explored another way, namely adding feature flags to union
>> branches.  Could also be useful, say to add different features to
>> branches in multiple unions sharing the same tag enum.
>>
>>
> ... this way seems simpler for now, and I trust your intuition on what's
> easier to support as I don't have a solid grasp of the C interfaces at play
> for actually parsing the input. We can always revisit the other thing later
> if/when we need it.
>
>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>  qapi/transaction.json | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/qapi/transaction.json b/qapi/transaction.json
>> index d175b5f863..381a2df782 100644
>> --- a/qapi/transaction.json
>> +++ b/qapi/transaction.json
>> @@ -54,6 +54,10 @@
>>  # @blockdev-snapshot-sync: since 1.1
>>  # @drive-backup: Since 1.6
>>  #
>> +# Features:
>> +# @deprecated: Member @drive-backup is deprecated.  Use member
>> +#              @blockdev-backup instead.
>> +#
>>  # Since: 1.1
>>  ##
>>  { 'enum': 'TransactionActionKind',
>> @@ -62,7 +66,7 @@
>>              'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge',
>>              'blockdev-backup', 'blockdev-snapshot',
>>              'blockdev-snapshot-internal-sync', 'blockdev-snapshot-sync',
>> -            'drive-backup' ] }
>> +            { 'name': 'drive-backup', 'features': [ 'deprecated' ] } ] }
>>
>>  ##
>>  # @AbortWrapper:
>> --
>> 2.31.1
>>
>>
> Seems pretty clean to me overall. What's the reason for wanting it to be
> RFC?

I believe it depends on the remainder of Vladimir's series.

Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by Vladimir Sementsov-Ogievskiy 4 years, 3 months ago
27.10.2021 08:22, Markus Armbruster wrote:
> John Snow <jsnow@redhat.com> writes:
> 
>> On Mon, Oct 25, 2021 at 12:24 AM Markus Armbruster <armbru@redhat.com>
>> wrote:
>>
>>> Several moons ago, Vladimir posted
>>>
>>>      Subject: [PATCH v2 3/3] qapi: deprecate drive-backup
>>>      Date: Wed,  5 May 2021 16:58:03 +0300
>>>      Message-Id: <20210505135803.67896-4-vsementsov@virtuozzo.com>
>>>      https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg01394.html
>>>
>>> with this
>>>
>>>      TODO: We also need to deprecate drive-backup transaction action..
>>>      But union members in QAPI doesn't support 'deprecated' feature. I tried
>>>      to dig a bit, but failed :/ Markus, could you please help with it? At
>>>      least by advice?
>>>
>>> This is one way to resolve it.  Sorry it took so long.
>>>
>>>
>> I'll share the blame for not pushing back on the other series, but ...
>>
>>
>>> John explored another way, namely adding feature flags to union
>>> branches.  Could also be useful, say to add different features to
>>> branches in multiple unions sharing the same tag enum.
>>>
>>>
>> ... this way seems simpler for now, and I trust your intuition on what's
>> easier to support as I don't have a solid grasp of the C interfaces at play
>> for actually parsing the input. We can always revisit the other thing later
>> if/when we need it.
>>
>>
>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>> ---
>>>   qapi/transaction.json | 6 +++++-
>>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/qapi/transaction.json b/qapi/transaction.json
>>> index d175b5f863..381a2df782 100644
>>> --- a/qapi/transaction.json
>>> +++ b/qapi/transaction.json
>>> @@ -54,6 +54,10 @@
>>>   # @blockdev-snapshot-sync: since 1.1
>>>   # @drive-backup: Since 1.6
>>>   #
>>> +# Features:
>>> +# @deprecated: Member @drive-backup is deprecated.  Use member
>>> +#              @blockdev-backup instead.
>>> +#
>>>   # Since: 1.1
>>>   ##
>>>   { 'enum': 'TransactionActionKind',
>>> @@ -62,7 +66,7 @@
>>>               'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge',
>>>               'blockdev-backup', 'blockdev-snapshot',
>>>               'blockdev-snapshot-internal-sync', 'blockdev-snapshot-sync',
>>> -            'drive-backup' ] }
>>> +            { 'name': 'drive-backup', 'features': [ 'deprecated' ] } ] }
>>>
>>>   ##
>>>   # @AbortWrapper:
>>> --
>>> 2.31.1
>>>
>>>
>> Seems pretty clean to me overall. What's the reason for wanting it to be
>> RFC?
> 
> I believe it depends on the remainder of Vladimir's series.
> 


Sorry, I didn't help with reviewing as promised :\

So, seems the only missing bit is v3 of my original series deprecating backup? I've sent it just now: "[PATCH v3 0/3] qapi & doc: deprecate drive-backup".

If it is OK and if it is convenient for you Markus, you can just take it into your series between 04 and 05 and pull through your tree.

-- 
Best regards,
Vladimir

Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by Vladimir Sementsov-Ogievskiy 4 years, 3 months ago
25.10.2021 07:24, Markus Armbruster wrote:
> Several moons ago, Vladimir posted
> 
>      Subject: [PATCH v2 3/3] qapi: deprecate drive-backup
>      Date: Wed,  5 May 2021 16:58:03 +0300
>      Message-Id:<20210505135803.67896-4-vsementsov@virtuozzo.com>
>      https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg01394.html
> 
> with this
> 
>      TODO: We also need to deprecate drive-backup transaction action..
>      But union members in QAPI doesn't support 'deprecated' feature. I tried
>      to dig a bit, but failed :/ Markus, could you please help with it? At
>      least by advice?
> 
> This is one way to resolve it.  Sorry it took so long.
> 
> John explored another way, namely adding feature flags to union
> branches.  Could also be useful, say to add different features to
> branches in multiple unions sharing the same tag enum.
> 
> Signed-off-by: Markus Armbruster<armbru@redhat.com>

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

(with simplified commit message of course :)

-- 
Best regards,
Vladimir

Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by Markus Armbruster 4 years, 3 months ago
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> 25.10.2021 07:24, Markus Armbruster wrote:
>> Several moons ago, Vladimir posted
>> 
>>      Subject: [PATCH v2 3/3] qapi: deprecate drive-backup
>>      Date: Wed,  5 May 2021 16:58:03 +0300
>>      Message-Id:<20210505135803.67896-4-vsementsov@virtuozzo.com>
>>      https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg01394.html
>> 
>> with this
>> 
>>      TODO: We also need to deprecate drive-backup transaction action..
>>      But union members in QAPI doesn't support 'deprecated' feature. I tried
>>      to dig a bit, but failed :/ Markus, could you please help with it? At
>>      least by advice?
>> 
>> This is one way to resolve it.  Sorry it took so long.
>> 
>> John explored another way, namely adding feature flags to union
>> branches.  Could also be useful, say to add different features to
>> branches in multiple unions sharing the same tag enum.
>> 
>> Signed-off-by: Markus Armbruster<armbru@redhat.com>
>
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>
> (with simplified commit message of course :)

Your "[PATCH v2 0/3] qapi & doc: deprecate drive-backup" series contains

  docs/block-replication: use blockdev-backup
  docs/interop/bitmaps: use blockdev-backup
  qapi: deprecate drive-backup

I figure proper deprecation needs all that, i.e. we need to merge my RFC
patch into your 3/3.  Could you take care of that?

Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by Vladimir Sementsov-Ogievskiy 4 years, 3 months ago
04.11.2021 08:49, Markus Armbruster wrote:
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 
>> 25.10.2021 07:24, Markus Armbruster wrote:
>>> Several moons ago, Vladimir posted
>>>
>>>       Subject: [PATCH v2 3/3] qapi: deprecate drive-backup
>>>       Date: Wed,  5 May 2021 16:58:03 +0300
>>>       Message-Id:<20210505135803.67896-4-vsementsov@virtuozzo.com>
>>>       https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg01394.html
>>>
>>> with this
>>>
>>>       TODO: We also need to deprecate drive-backup transaction action..
>>>       But union members in QAPI doesn't support 'deprecated' feature. I tried
>>>       to dig a bit, but failed :/ Markus, could you please help with it? At
>>>       least by advice?
>>>
>>> This is one way to resolve it.  Sorry it took so long.
>>>
>>> John explored another way, namely adding feature flags to union
>>> branches.  Could also be useful, say to add different features to
>>> branches in multiple unions sharing the same tag enum.
>>>
>>> Signed-off-by: Markus Armbruster<armbru@redhat.com>
>>
>> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>
>> (with simplified commit message of course :)
> 
> Your "[PATCH v2 0/3] qapi & doc: deprecate drive-backup" series contains
> 
>    docs/block-replication: use blockdev-backup
>    docs/interop/bitmaps: use blockdev-backup
>    qapi: deprecate drive-backup
> 
> I figure proper deprecation needs all that, i.e. we need to merge my RFC
> patch into your 3/3.  Could you take care of that?
> 

Of course, but it depend on your 1-4..

Oops, I missed the fact that your 1-4 already applied to master. I will make a pull request with deprecations now, may be it's still applicable for 6.2


-- 
Best regards,
Vladimir

Re: [PATCH v4 5/5] block: Deprecate transaction type drive-backup
Posted by Markus Armbruster 4 years, 3 months ago
I neglected to put RFC in the subject.