[PATCH for-6.0?] qga: fix guest-get-disks regression

marcandre.lureau@redhat.com posted 1 patch 3 years ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210420125831.233092-1-marcandre.lureau@redhat.com
qga/commands-posix.c | 1 +
1 file changed, 1 insertion(+)
[PATCH for-6.0?] qga: fix guest-get-disks regression
Posted by marcandre.lureau@redhat.com 3 years ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Commit 54aa3de72 ("qapi: Use QAPI_LIST_PREPEND() where possible")
inadvertently removed the has_dependencies from the partition disk
info, resulting in empty list being returned.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1950833

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 qga/commands-posix.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 4299ebd96f..75dbaab68e 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -1376,6 +1376,7 @@ static GuestDiskInfoList *get_disk_partitions(
         partition = g_new0(GuestDiskInfo, 1);
         partition->name = dev_name;
         partition->partition = true;
+        partition->has_dependencies = true;
         /* Add parent disk as dependent for easier tracking of hierarchy */
         QAPI_LIST_PREPEND(partition->dependencies, g_strdup(disk_dev));
 
-- 
2.29.0


Re: [PATCH for-6.0?] qga: fix guest-get-disks regression
Posted by Daniel P. Berrangé 3 years ago
On Tue, Apr 20, 2021 at 04:58:31PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Commit 54aa3de72 ("qapi: Use QAPI_LIST_PREPEND() where possible")
> inadvertently removed the has_dependencies from the partition disk
> info, resulting in empty list being returned.
> 
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1950833
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  qga/commands-posix.c | 1 +
>  1 file changed, 1 insertion(+)


Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH for-6.0?] qga: fix guest-get-disks regression
Posted by Markus Armbruster 3 years ago
marcandre.lureau@redhat.com writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Commit 54aa3de72 ("qapi: Use QAPI_LIST_PREPEND() where possible")
> inadvertently removed the has_dependencies from the partition disk
> info, resulting in empty list being returned.
>
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1950833
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  qga/commands-posix.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index 4299ebd96f..75dbaab68e 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -1376,6 +1376,7 @@ static GuestDiskInfoList *get_disk_partitions(
>          partition = g_new0(GuestDiskInfo, 1);
>          partition->name = dev_name;
>          partition->partition = true;
> +        partition->has_dependencies = true;
>          /* Add parent disk as dependent for easier tracking of hierarchy */
>          QAPI_LIST_PREPEND(partition->dependencies, g_strdup(disk_dev));

This is a recent regression, and the fix is as safe as they get.  Please
apply for 6.0.

Reviewed-by: Markus Armbruster <armbru@redhat.com>


Re: [PATCH for-6.0?] qga: fix guest-get-disks regression
Posted by Peter Maydell 3 years ago
On Tue, 20 Apr 2021 at 16:03, Markus Armbruster <armbru@redhat.com> wrote:
>
> marcandre.lureau@redhat.com writes:
>
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Commit 54aa3de72 ("qapi: Use QAPI_LIST_PREPEND() where possible")
> > inadvertently removed the has_dependencies from the partition disk
> > info, resulting in empty list being returned.
> >
> > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1950833
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >  qga/commands-posix.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> > index 4299ebd96f..75dbaab68e 100644
> > --- a/qga/commands-posix.c
> > +++ b/qga/commands-posix.c
> > @@ -1376,6 +1376,7 @@ static GuestDiskInfoList *get_disk_partitions(
> >          partition = g_new0(GuestDiskInfo, 1);
> >          partition->name = dev_name;
> >          partition->partition = true;
> > +        partition->has_dependencies = true;
> >          /* Add parent disk as dependent for easier tracking of hierarchy */
> >          QAPI_LIST_PREPEND(partition->dependencies, g_strdup(disk_dev));
>
> This is a recent regression, and the fix is as safe as they get.  Please
> apply for 6.0.
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Thanks; applied to master for 6.0.

-- PMM

Re: [PATCH for-6.0?] qga: fix guest-get-disks regression
Posted by Philippe Mathieu-Daudé 3 years ago
On 4/20/21 2:58 PM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Commit 54aa3de72 ("qapi: Use QAPI_LIST_PREPEND() where possible")
> inadvertently removed the has_dependencies from the partition disk
> info, resulting in empty list being returned.
> 
> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1950833
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  qga/commands-posix.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index 4299ebd96f..75dbaab68e 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -1376,6 +1376,7 @@ static GuestDiskInfoList *get_disk_partitions(
>          partition = g_new0(GuestDiskInfo, 1);
>          partition->name = dev_name;
>          partition->partition = true;
> +        partition->has_dependencies = true;
>          /* Add parent disk as dependent for easier tracking of hierarchy */
>          QAPI_LIST_PREPEND(partition->dependencies, g_strdup(disk_dev));
>  

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>