From: Markus Armbruster <armbru@pond.sub.org>
To: Roman Bogorodskiy <bogorodskiy@gmail.com>
Cc: qemu-devel@nongnu.org, Michael Roth <michael.roth@amd.com>,
Kostiantyn Kostiuk <kkostiuk@redhat.com>,
Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH 3/5] qga: implement 'guest-get-disks' for FreeBSD
Date: Fri, 27 Nov 2026 14:00:47 +0100 [thread overview]
Message-ID: <87zeuusa2o.fsf@pond.sub.org> (raw)
In-Reply-To: <awXV7HO6PXkc8XPC@tulp> (Roman Bogorodskiy's message of "Tue, 24 Nov 2026 19:22:36 +0100")
Roman Bogorodskiy <bogorodskiy@gmail.com> writes:
> Markus Armbruster wrote:
>
>> Roman Bogorodskiy <bogorodskiy@gmail.com> writes:
>>
>> > The implementation uses the "kern.geom.conftxt" sysctl.
>> > It resides under the "#ifdef __FreeBSD__" block as
>> > other BSDs do not have GEOM.
>> >
>> > Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
>>
>> [...]
>>
>> > diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
>> > index 4856a549a6..35aaa040cf 100644
>> > --- a/qga/qapi-schema.json
>> > +++ b/qga/qapi-schema.json
>> > @@ -947,7 +947,7 @@
>> > 'media-errors-hi': 'uint64',
>> > 'number-of-error-log-entries-lo': 'uint64',
>> > 'number-of-error-log-entries-hi': 'uint64' },
>> > - 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
>> > + 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV', 'CONFIG_FREEBSD' ] } }
>> >
>> > ##
>> > # @GuestDiskSmart:
>> > @@ -961,12 +961,12 @@
>> > 'base': { 'type': 'GuestDiskBusType' },
>> > 'discriminator': 'type',
>> > 'data': { 'nvme': 'GuestNVMeSmart' },
>> > - 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
>> > + 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV', 'CONFIG_FREEBSD' ] } }
>> >
>> > ##
>> > # @GuestDiskInfo:
>> > #
>> > -# @name: device node (Linux) or device UNC (Windows)
>> > +# @name: device node (Linux, FreeBSD) or device UNC (Windows)
>> > #
>> > # @partition: whether this is a partition or disk
>> > #
>> > @@ -987,7 +987,7 @@
>> > 'data': {'name': 'str', 'partition': 'bool', '*dependencies': ['str'],
>> > '*address': 'GuestDiskAddress', '*alias': 'str',
>> > '*smart': 'GuestDiskSmart'},
>> > - 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
>> > + 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV', 'CONFIG_FREEBSD' ] } }
>> >
>> > ##
>> > # @guest-get-disks:
>> > @@ -995,13 +995,14 @@
>> > # Returns: The list of disks in the guest. For Windows these are only
>> > # the physical disks. On Linux these are all root block devices
>> > # of non-zero size including e.g. removable devices, loop devices,
>> > -# NBD, etc.
>> > +# NBD, etc. On FreeBSD these are nonzero-size GEOM DISK and PART
>> > +# providers (since 12.0).
>>
>> The (since 12.0) applies just to the sentence about FreeBSD. Rather
>> subtle.
>>
>> Elsewhere in this series, you don't add (since 12.0) when you implement
>> something for FreeBSD. How useful is it here?
>
> Yes, I have to admit that I was having a hard time deciding where to put
> that.
>
> This series actually adds "@bsd: FreeBSD (Since 12.0)" to
> "@GuestCpuStatsType" but that was an easy one as it's definitely useful
> to know that the new type has appeared.
>
> For the rest of the entries I'm not really sure. The example you're
> referring too can be confusing indeed.
>
> Should I use something like:
>
> # Since 5.2 (Linux only); 12.0 (FreeBSD)
For better or worse, that's what you did in commit 0ae3840f612b (qga:
implement 'guest-network-get-route' for FreeBSD) following precedence of
Elizabeth's commit 595a77289d07 (qga: implement guest-network-get-route
for Windows). So let's do that again.
> or omit these completely?
>
>> > #
>> > # Since: 5.2
>> > ##
>> > { 'command': 'guest-get-disks',
>> > 'returns': ['GuestDiskInfo'],
>> > - 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV' ] } }
>> > + 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LIBUDEV', 'CONFIG_FREEBSD' ] } }
>> >
>> > ##
>> > # @GuestFilesystemInfo:
next prev parent reply other threads:[~2026-11-27 13:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 9:05 [PATCH 0/5] qga: implement more APIs for FreeBSD Roman Bogorodskiy
2026-11-22 9:05 ` [PATCH 1/5] qga: implement 'guest-get-vcpus' " Roman Bogorodskiy
2026-11-22 9:05 ` [PATCH 2/5] qga: implement 'guest-get-cpustats' " Roman Bogorodskiy
2026-11-22 9:05 ` [PATCH 3/5] qga: implement 'guest-get-disks' " Roman Bogorodskiy
2026-11-24 10:43 ` Markus Armbruster
2026-11-24 18:22 ` Roman Bogorodskiy
2026-11-27 13:00 ` Markus Armbruster [this message]
2026-11-22 9:05 ` [PATCH 4/5] tests/unit/test-qga: test 'guest-get-disks' Roman Bogorodskiy
2026-11-22 9:05 ` [PATCH 5/5] tests/unit/test-qga: test 'guest-get-cpustats' Roman Bogorodskiy
2026-11-27 13:02 ` [PATCH 0/5] qga: implement more APIs for FreeBSD Markus Armbruster
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=87zeuusa2o.fsf@pond.sub.org \
--to=armbru@pond.sub.org \
--cc=bogorodskiy@gmail.com \
--cc=eblake@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=michael.roth@amd.com \
--cc=qemu-devel@nongnu.org \
/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.