From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Tomáš Golembiovský" <tgolembi@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH v2 1/3] qga: add command guest-get-disks
Date: Tue, 6 Oct 2020 14:56:55 +0100 [thread overview]
Message-ID: <20201006135655.GI2482221@redhat.com> (raw)
In-Reply-To: <20201006135308.s2ynlg2lkzifjmmd@auriga.localdomain>
On Tue, Oct 06, 2020 at 03:53:08PM +0200, Tomáš Golembiovský wrote:
> On Tue, Oct 06, 2020 at 09:36:32AM +0100, Daniel P. Berrangé wrote:
> > On Mon, Sep 07, 2020 at 11:14:40AM +0200, Tomáš Golembiovský wrote:
> > > Add API and stubs for new guest-get-disks command.
> > >
> > > The command guest-get-fsinfo can be used to list information about disks
> > > and partitions but it is limited only to mounted disks with filesystem.
> > > This new command should allow listing information about disks of the VM
> > > regardles whether they are mounted or not. This can be usefull for
> > > management applications for mapping virtualized devices or pass-through
> > > devices to device names in the guest OS.
> > >
> > > Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
> > > ---
> > > qga/commands-posix.c | 6 ++++++
> > > qga/commands-win32.c | 6 ++++++
> > > qga/qapi-schema.json | 29 +++++++++++++++++++++++++++++
> > > 3 files changed, 41 insertions(+)
> > >
> > > diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> > > index 744c2b5a5d..f99731af51 100644
> > > --- a/qga/commands-posix.c
> > > +++ b/qga/commands-posix.c
> > > @@ -3042,3 +3042,9 @@ GuestOSInfo *qmp_guest_get_osinfo(Error **errp)
> > >
> > > return info;
> > > }
> > > +
> > > +GuestDiskInfoList *qmp_guest_get_disks(Error **errp)
> > > +{
> > > + error_setg(errp, QERR_UNSUPPORTED);
> > > + return NULL;
> > > +}
> > > diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> > > index aaa71f147b..e9976a0c46 100644
> > > --- a/qga/commands-win32.c
> > > +++ b/qga/commands-win32.c
> > > @@ -2229,3 +2229,9 @@ GuestOSInfo *qmp_guest_get_osinfo(Error **errp)
> > >
> > > return info;
> > > }
> > > +
> > > +GuestDiskInfoList *qmp_guest_get_disks(Error **errp)
> > > +{
> > > + error_setg(errp, QERR_UNSUPPORTED);
> > > + return NULL;
> > > +}
> > > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
> > > index 408a662ea5..70b54e0d07 100644
> > > --- a/qga/qapi-schema.json
> > > +++ b/qga/qapi-schema.json
> > > @@ -862,6 +862,35 @@
> > > 'bus': 'int', 'target': 'int', 'unit': 'int',
> > > '*serial': 'str', '*dev': 'str'} }
> > >
> > > +##
> > > +# @GuestDiskInfo:
> > > +#
> > > +# @name: device node (Linux) or device UNC (Windows)
> > > +# @partition: whether this is a partition or disk
> > > +# @slaves: list of slave devices (Linux)
> >
> > What are "slave devices" ?
>
> That is how Linux calls dependent devices. E.g. PVs in your LVM setup
> are considered "slaves" to your LVs. Or if you have LUKS volume called
> "foo" on your "bar" drive then "bar" would be listed as a "slave" for
> "foo".
>
> The dependency is in the opposite direction then I have always pictured
> it in my had, but I guess that there are reasons for that.
>
> > For that matter, please don't use the term "slaves" at all in any
> > new code.
>
> Fair enough... so how shall we call those devices? Dependents,
> dependencies, parents... ? Ideas welcome.
Sounds like "dependents" sounds like a reasonable term for what
this is expressing.
Giving the LVM VG/PV and LUKS examples in the QAPI docs would be
useful.
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 :|
next prev parent reply other threads:[~2020-10-06 13:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 9:14 [PATCH v2 0/3] qga: add command guest-get-disk Tomáš Golembiovský
2020-09-07 9:14 ` [PATCH v2 1/3] qga: add command guest-get-disks Tomáš Golembiovský
2020-09-07 9:32 ` Philippe Mathieu-Daudé
2020-09-29 15:22 ` Marc-André Lureau
2020-10-06 8:36 ` Daniel P. Berrangé
2020-10-06 13:53 ` Tomáš Golembiovský
2020-10-06 13:56 ` Daniel P. Berrangé [this message]
2020-09-07 9:14 ` [PATCH v2 2/3] qga: add implementation of guest-get-disks for Linux Tomáš Golembiovský
2020-09-29 15:22 ` Marc-André Lureau
2020-10-06 8:31 ` Tomáš Golembiovský
2020-10-06 8:40 ` Marc-André Lureau
2020-10-06 8:54 ` Daniel P. Berrangé
2020-09-07 9:14 ` [PATCH v2 3/3] qga: add implementation of guest-get-disks for Windows Tomáš Golembiovský
2020-09-07 9:31 ` Philippe Mathieu-Daudé
2020-09-29 15:31 ` Marc-André Lureau
2020-09-25 8:32 ` [PATCH v2 0/3] qga: add command guest-get-disk Tomáš Golembiovský
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201006135655.GI2482221@redhat.com \
--to=berrange@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=tgolembi@redhat.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.