Am 27.07.2018 um 10:01 hat Peter Krempa geschrieben:
On Thu, Jul 26, 2018 at 17:04:19 +0800, Fam Zheng wrote:
> On Thu, 07/26 10:44, Kevin Wolf wrote:
> > Am 25.07.2018 um 17:57 hat Peter Krempa geschrieben:
> > > This series adds support for starting and hotplug of disks with
> > > -blockdev/blockdev-add.
> > >
> > > Blockjobs are not supported and thus the last patch should not be
> > > applied yet as some refactoring of the jobs is required.
> > >
> > > At the beginning of the series there are a few cleanup patches which may
> > > be pushed even at this point.
> > >
> > > The main reason this is in RFC state is that block stats reporting does
> > > not work.
> > >
> > > The following command:
> > >
> > >
{"execute":"query-blockstats","arguments":{"query-nodes":true}}
> >
> > query-nodes was added in commit f71eaa74c0b by Fam and Max, CCed. I'm
> > not sure what it was needed for at all and the commit message doesn't
> > help with that, but I suppose the addition was related to
> > wr_highest_offset (see below).
>
> Yes, this was part of RHBZ 1158094. Sorry about the poor commit message.
Well the problem is that when using -blockdev with 'query-nodes' false/not
present you get a
even more useless output:
virsh qemu-monitor-command --pretty upstream
'{"execute":"query-blockstats","arguments":{"query-nodes":false}}'
{
"return": [
],
"id": "libvirt-20"
}
That's a problem. Apparently it ignores anonymous BlockBackends, which
it shouldn't do. I'll look into that.
'query-named-block-nodes' don't provide the
'stats' section either:
(other drives snipped)
[...]
Thus libvirt can't provide the stats it used to with -drive.
Since we
need to special-case the code for gathering stats for -blockdev it
should not be a problem if e.g. query-named-block-nodes reported the
stats section along. (perhaps with a boolean flag to do so which also
could disable the nesting)
The only one it could theoretically provide is wr_highest_offset, the
other ones simply don't exist at the node level. And this is probably
not the only one you're interested in.
In either case we need the stats in the same extent as we had before
with -drive and query-blockstats.
Yes, that's clear.
Kevin