diff options
| author | David Woodhouse <dwmw@amazon.co.uk> | 2023-01-22 22:59:49 +0000 |
|---|---|---|
| committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-03-07 17:04:30 +0000 |
| commit | 7cabbdb70df64fc7b0ed05f3e6aa4e1990eadc77 (patch) | |
| tree | ecae20b7ad33b76d5c815658bf2227168f990d47 /hw/i386/kvm/xenstore_impl.h | |
| parent | 7248b87cb0292a13c0309a4aba9f5daf7a76d297 (diff) | |
| download | focaccia-qemu-7cabbdb70df64fc7b0ed05f3e6aa4e1990eadc77.tar.gz focaccia-qemu-7cabbdb70df64fc7b0ed05f3e6aa4e1990eadc77.zip | |
hw/xen: Watches on XenStore transactions
Firing watches on the nodes that still exist is relatively easy; just walk the tree and look at the nodes with refcount of one. Firing watches on *deleted* nodes is more fun. We add 'modified_in_tx' and 'deleted_in_tx' flags to each node. Nodes with those flags cannot be shared, as they will always be unique to the transaction in which they were created. When xs_node_walk would need to *create* a node as scaffolding and it encounters a deleted_in_tx node, it can resurrect it simply by clearing its deleted_in_tx flag. If that node originally had any *data*, they're gone, and the modified_in_tx flag will have been set when it was first deleted. We then attempt to send appropriate watches when the transaction is committed, properly delete the deleted_in_tx nodes, and remove the modified_in_tx flag from the others. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'hw/i386/kvm/xenstore_impl.h')
0 files changed, 0 insertions, 0 deletions