[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 8/8] qapi: query-blockstat: add driver specif
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats |
Date: |
Tue, 23 Jan 2018 08:53:34 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 01/23/2018 05:28 AM, Anton Nefedov wrote:
>>> +
>>> +##
>>> +# @BlockDriverStats:
>>> +#
>>> +# Statistics of a block driver (driver-specific)
>>> +#
>>> +# Since: 2.12
>>> +##
>>> +{ 'union': 'BlockDriverStats',
>>> + 'data': {
>>> + 'file': 'BlockDriverStatsFile'
>>> + } }
>>
>> Markus has been adamant that we add no new "simple unions" (unions with
>> a 'discriminator' field) - because they are anything but simple in the
>> long run.
>
> Right, forgot about those unions.. Will fix.
>
> (I guess I will need an extra enum, like BlockdevDriverWithStats with a
> single 'file' member, otherwise it seems to require to define data for
> each BlockdevDriver type)
Kevin also recently requested an easier way to make a flat union that
uses only a subset of a larger enum. Maybe it's worth investing some
time in a QAPI generator patch to make this part easier (I have a
potential patch floating on one of my older branches that would allow
'branch':{} rather than having to declare a dummy type, but that's
slightly different than not even supplying the branches that you aren't
implementing).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v2 2/8] qapi: add unmap to BlockDeviceStats, (continued)
- [Qemu-devel] [PATCH v2 4/8] scsi: store unmap offset and nb_sectors in request struct, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 5/8] scsi: move unmap error checking to the complete callback, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 6/8] scsi: account unmap operations, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 7/8] file-posix: account discard operations, Anton Nefedov, 2018/01/19