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

Markus Armbruster posted 5 patches 1 month, 4 weeks ago

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

Posted by Markus Armbruster 1 month, 4 weeks 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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/qapi/transaction.json b/qapi/transaction.json
index d175b5f863..0564a893b3 100644
--- a/qapi/transaction.json
+++ b/qapi/transaction.json
@@ -54,6 +54,9 @@
 # @blockdev-snapshot-sync: since 1.1
 # @drive-backup: Since 1.6
 #
+# Features:
+# @deprecated: Member @drive-backup is deprecated.  Use FIXME instead.
+#
 # Since: 1.1
 ##
 { 'enum': 'TransactionActionKind',
@@ -62,7 +65,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 RFC v2 5/5] block: Deprecate transaction type drive-backup

Posted by Eric Blake 1 month, 3 weeks ago
On Sat, Oct 09, 2021 at 02:09:44PM +0200, 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>
> ---
>  qapi/transaction.json | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/qapi/transaction.json b/qapi/transaction.json
> index d175b5f863..0564a893b3 100644
> --- a/qapi/transaction.json
> +++ b/qapi/transaction.json
> @@ -54,6 +54,9 @@
>  # @blockdev-snapshot-sync: since 1.1
>  # @drive-backup: Since 1.6
>  #
> +# Features:
> +# @deprecated: Member @drive-backup is deprecated.  Use FIXME instead.

Obviously, we'd need to flesh this out ("'blockdev-backup' with proper
node names"? something else?) before dropping RFC on this patch.

And we'd want to edit docs/about/deprecated.rst to match.

> +#
>  # Since: 1.1
>  ##
>  { 'enum': 'TransactionActionKind',
> @@ -62,7 +65,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
>

But the idea is reasonable, and I'm not sure if we're any closer to
John's idea of feature flags on union branches.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [PATCH RFC v2 5/5] block: Deprecate transaction type drive-backup

Posted by Kevin Wolf 1 month, 3 weeks ago
Am 11.10.2021 um 20:58 hat Eric Blake geschrieben:
> On Sat, Oct 09, 2021 at 02:09:44PM +0200, 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>
> > ---
> >  qapi/transaction.json | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/qapi/transaction.json b/qapi/transaction.json
> > index d175b5f863..0564a893b3 100644
> > --- a/qapi/transaction.json
> > +++ b/qapi/transaction.json
> > @@ -54,6 +54,9 @@
> >  # @blockdev-snapshot-sync: since 1.1
> >  # @drive-backup: Since 1.6
> >  #
> > +# Features:
> > +# @deprecated: Member @drive-backup is deprecated.  Use FIXME instead.
> 
> Obviously, we'd need to flesh this out ("'blockdev-backup' with proper
> node names"? something else?) before dropping RFC on this patch.

What does 'blockdev-backup' with improper node names look like?

I think it's sufficient to say "Use @blockdev-backup instead", which is
already documented to take a node/device name instead of a file name.

> And we'd want to edit docs/about/deprecated.rst to match.

Yes.

Kevin

Re: [PATCH RFC v2 5/5] block: Deprecate transaction type drive-backup

Posted by Markus Armbruster 1 month, 2 weeks ago
Kevin Wolf <kwolf@redhat.com> writes:

> Am 11.10.2021 um 20:58 hat Eric Blake geschrieben:
>> On Sat, Oct 09, 2021 at 02:09:44PM +0200, 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>
>> > ---
>> >  qapi/transaction.json | 5 ++++-
>> >  1 file changed, 4 insertions(+), 1 deletion(-)
>> > 
>> > diff --git a/qapi/transaction.json b/qapi/transaction.json
>> > index d175b5f863..0564a893b3 100644
>> > --- a/qapi/transaction.json
>> > +++ b/qapi/transaction.json
>> > @@ -54,6 +54,9 @@
>> >  # @blockdev-snapshot-sync: since 1.1
>> >  # @drive-backup: Since 1.6
>> >  #
>> > +# Features:
>> > +# @deprecated: Member @drive-backup is deprecated.  Use FIXME instead.
>> 
>> Obviously, we'd need to flesh this out ("'blockdev-backup' with proper
>> node names"? something else?) before dropping RFC on this patch.
>
> What does 'blockdev-backup' with improper node names look like?
>
> I think it's sufficient to say "Use @blockdev-backup instead", which is
> already documented to take a node/device name instead of a file name.

Sold!

>> And we'd want to edit docs/about/deprecated.rst to match.
>
> Yes.

My patch makes sense only together with Vladimir's patch to deprecate
the drive-backup command.  That one updates deprecated.rst.  The
combination of the two might need further tweaking, but let's not worry
about that now.