qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze
@ 2020-11-09 20:17 Michael Roth
  2020-11-09 21:23 ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Roth @ 2020-11-09 20:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit 3493c36f0371777c62d1d72b205b0eb6117e2156:

  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20201106' into staging (2020-11-06 13:43:28 +0000)

are available in the Git repository at:

  git://github.com/mdroth/qemu.git tags/qga-pull-2020-11-09-tag

for you to fetch changes up to b1b9ab1c04d560f86d8da3dfca4d8b21de75fee6:

  qga: fix missing closedir() in qmp_guest_get_disks() (2020-11-09 14:07:14 -0600)

----------------------------------------------------------------
qemu-ga patch queue for hard-freeze

* fix leaked DIR* descriptor in guest-get-disks spotted by coverity

----------------------------------------------------------------
Michael Roth (1):
      qga: fix missing closedir() in qmp_guest_get_disks()

 qga/commands-posix.c | 3 +++
 1 file changed, 3 insertions(+)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze
  2020-11-09 20:17 Michael Roth
@ 2020-11-09 21:23 ` Peter Maydell
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2020-11-09 21:23 UTC (permalink / raw)
  To: Michael Roth; +Cc: QEMU Developers

On Mon, 9 Nov 2020 at 20:18, Michael Roth <michael.roth@amd.com> wrote:
>
> The following changes since commit 3493c36f0371777c62d1d72b205b0eb6117e2156:
>
>   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20201106' into staging (2020-11-06 13:43:28 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/mdroth/qemu.git tags/qga-pull-2020-11-09-tag
>
> for you to fetch changes up to b1b9ab1c04d560f86d8da3dfca4d8b21de75fee6:
>
>   qga: fix missing closedir() in qmp_guest_get_disks() (2020-11-09 14:07:14 -0600)
>
> ----------------------------------------------------------------
> qemu-ga patch queue for hard-freeze
>
> * fix leaked DIR* descriptor in guest-get-disks spotted by coverity
>
> ----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze
@ 2020-11-16 19:21 Michael Roth
  2020-11-16 19:21 ` [PULL for-5.2 1/1] qga: update schema for guest-get-disks 'dependents' field Michael Roth
  2020-11-16 22:26 ` [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze Peter Maydell
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Roth @ 2020-11-16 19:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit 2f7c9dd5181524ceaf75ba3ef8d84090b1e9e8d8:

  Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20201116-pull-request' into staging (2020-11-16 14:19:31 +0000)

are available in the Git repository at:

  git://github.com/mdroth/qemu.git tags/qga-pull-2020-11-16-tag

for you to fetch changes up to a8aa94b5f8427cc2924d8cdd417c8014db1c86c0:

  qga: update schema for guest-get-disks 'dependents' field (2020-11-16 10:48:11 -0600)

----------------------------------------------------------------
qemu-ga patch queue for hard-freeze

* fixes for schema data-type declarations for guest-get-disks

----------------------------------------------------------------
Michael Roth (1):
      qga: update schema for guest-get-disks 'dependents' field

 qga/commands-posix.c | 10 ++++++----
 qga/qapi-schema.json |  8 ++++----
 2 files changed, 10 insertions(+), 8 deletions(-)




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PULL for-5.2 1/1] qga: update schema for guest-get-disks 'dependents' field
  2020-11-16 19:21 [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze Michael Roth
@ 2020-11-16 19:21 ` Michael Roth
  2020-11-16 22:26 ` [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze Peter Maydell
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Roth @ 2020-11-16 19:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Tomáš Golembiovský,
	Marc-André Lureau

The recently-added 'guest-get-disk' command returns a list of
GuestDiskInfo entries, which in turn have a 'dependents' field which
lists devices these entries are dependent upon. Thus, 'dependencies'
is a better name for this field. Address this by renaming the field
accordingly.

Additionally, 'dependents' is specified as non-optional, even though
it's not implemented for w32. This is misleading, since it gives users
the impression that a particular disk might not have dependencies,
when in reality that information is simply not known to the guest
agent. Address this by making 'dependents' an optional field, and only
marking it as in-use when the facilities to obtain this information are
available to the guest agent.

Cc: Eric Blake <eblake@redhat.com>
Cc: Tomáš Golembiovský <tgolembi@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
---
 qga/commands-posix.c | 10 ++++++----
 qga/qapi-schema.json |  8 ++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 12c1ba5ef7..c089e38120 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -1285,6 +1285,7 @@ static void get_disk_deps(const char *disk_dir, GuestDiskInfo *disk)
         g_debug("failed to list entries in %s", deps_dir);
         return;
     }
+    disk->has_dependencies = true;
     while ((dep = g_dir_read_name(dp_deps)) != NULL) {
         g_autofree char *dep_dir = NULL;
         strList *dep_item = NULL;
@@ -1297,8 +1298,8 @@ static void get_disk_deps(const char *disk_dir, GuestDiskInfo *disk)
             g_debug("  adding dependent device: %s", dev_name);
             dep_item = g_new0(strList, 1);
             dep_item->value = dev_name;
-            dep_item->next = disk->dependents;
-            disk->dependents = dep_item;
+            dep_item->next = disk->dependencies;
+            disk->dependencies = dep_item;
         }
     }
     g_dir_close(dp_deps);
@@ -1351,8 +1352,9 @@ static GuestDiskInfoList *get_disk_partitions(
         partition->name = dev_name;
         partition->partition = true;
         /* Add parent disk as dependent for easier tracking of hierarchy */
-        partition->dependents = g_new0(strList, 1);
-        partition->dependents->value = g_strdup(disk_dev);
+        partition->dependencies = g_new0(strList, 1);
+        partition->dependencies->value = g_strdup(disk_dev);
+        partition->has_dependencies = true;
 
         item = g_new0(GuestDiskInfoList, 1);
         item->value = partition;
diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index 6ca85f995f..3b3d1d0bd9 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -870,9 +870,9 @@
 #
 # @name: device node (Linux) or device UNC (Windows)
 # @partition: whether this is a partition or disk
-# @dependents: list of dependent devices; e.g. for LVs of the LVM this will
-#              hold the list of PVs, for LUKS encrypted volume this will
-#              contain the disk where the volume is placed.     (Linux)
+# @dependencies: list of device dependencies; e.g. for LVs of the LVM this will
+#                hold the list of PVs, for LUKS encrypted volume this will
+#                contain the disk where the volume is placed.     (Linux)
 # @address: disk address information (only for non-virtual devices)
 # @alias: optional alias assigned to the disk, on Linux this is a name assigned
 #         by device mapper
@@ -880,7 +880,7 @@
 # Since 5.2
 ##
 { 'struct': 'GuestDiskInfo',
-  'data': {'name': 'str', 'partition': 'bool', 'dependents': ['str'],
+  'data': {'name': 'str', 'partition': 'bool', '*dependencies': ['str'],
            '*address': 'GuestDiskAddress', '*alias': 'str'} }
 
 ##
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze
  2020-11-16 19:21 [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze Michael Roth
  2020-11-16 19:21 ` [PULL for-5.2 1/1] qga: update schema for guest-get-disks 'dependents' field Michael Roth
@ 2020-11-16 22:26 ` Peter Maydell
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2020-11-16 22:26 UTC (permalink / raw)
  To: Michael Roth; +Cc: QEMU Developers

On Mon, 16 Nov 2020 at 19:22, Michael Roth <michael.roth@amd.com> wrote:
>
> The following changes since commit 2f7c9dd5181524ceaf75ba3ef8d84090b1e9e8d8:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20201116-pull-request' into staging (2020-11-16 14:19:31 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/mdroth/qemu.git tags/qga-pull-2020-11-16-tag
>
> for you to fetch changes up to a8aa94b5f8427cc2924d8cdd417c8014db1c86c0:
>
>   qga: update schema for guest-get-disks 'dependents' field (2020-11-16 10:48:11 -0600)
>
> ----------------------------------------------------------------
> qemu-ga patch queue for hard-freeze
>
> * fixes for schema data-type declarations for guest-get-disks
>
> ----------------------------------------------------------------


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-16 22:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 19:21 [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze Michael Roth
2020-11-16 19:21 ` [PULL for-5.2 1/1] qga: update schema for guest-get-disks 'dependents' field Michael Roth
2020-11-16 22:26 ` [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2020-11-09 20:17 Michael Roth
2020-11-09 21:23 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).