On 02/23/2017 01:21 PM, Peter Krempa wrote:
Since I'm a procrastinator and I wanted to do this after full
node-name support
is added I'm kind of late for this release here. Since oVirt is asking for this
feature for a very long time I would like to deliver it ASAP though.
Thanks for picking up on this. I tried once a long time ago:
https://www.redhat.com/archives/libvir-list/2015-June/msg01111.html
and got stalled on node name weirdness, so it never went in.
This series adds a event which is fired once a guest writes beyond a configured
offset in the backing file. The threshold offset is configurable via a new API.
This series is in RFC state since I did not manage to polish few details mostly
connected to node names:
- currently only the top level image can be selected
- some blockjobs may clear the remembered node names and thus break this
( re-detection of the backing chain needs to be connected with node name
detection )
- the node name detection code is VERY crude
Indeed, that's where I got stalled, but I think you may already be
further along than my attempt. (It may also be that the QMP side from
qemu is easier to use now than when I first tried)
- I'm not sure how well it plays with qcow images, since I select
only the top
level node (qcow protocol) rather than the file backing it
That may be a deal-breaker - my recollection is that you HAVE to use the
node-name of the file backing the qcow2 to get the useful threshold, and
not the node-name of the qcow2 protocol.
- the documentation probably sucks since I did not proof-read
Any feedback is welcome.
Peter Krempa (12):
util: storage: Split out useful bits of virStorageFileParseChainIndex
util: storage: Add preliminary storage for node names into
virStorageSource
lib: Introduce event for tracking disk backing file write threshold
qemu: monitor: Add support for BLOCK_WRITE_THRESHOLD event
qemu: domain: Add helper to lookup disk by node name
qemu: domain: Add helper to generate indexed backing store names
qemu: process: Wire up firing of the
VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event
lib: Add API for setting the threshold size for
VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD
virsh: Implement 'blockthreshold' command to call
virDomainSetBlockThreshold
qemu: domain: Add helper to look up disk soruce by the backing store
string
qemu: implement qemuDomainSetBlockThreshold
qemu: WIP: lookup nodenames
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org