diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2023-01-22 22:05:37 +0000 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-03-07 17:04:30 +0000 |
commit | 7248b87cb0292a13c0309a4aba9f5daf7a76d297 (patch) | |
tree | a97fcda812947e6c311009f14ef0ed173b19c864 /stubs | |
parent | 6e1330090d361d5904587b492afaad5041e63b66 (diff) | |
download | qemu-7248b87cb0292a13c0309a4aba9f5daf7a76d297.zip qemu-7248b87cb0292a13c0309a4aba9f5daf7a76d297.tar.gz qemu-7248b87cb0292a13c0309a4aba9f5daf7a76d297.tar.bz2 |
hw/xen: Implement XenStore transactions
Given that the whole thing supported copy on write from the beginning,
transactions end up being fairly simple. On starting a transaction, just
take a ref of the existing root; swap it back in on a successful commit.
The main tree has a transaction ID too, and we keep a record of the last
transaction ID given out. if the main tree is ever modified when it isn't
the latest, it gets a new transaction ID.
A commit can only succeed if the main tree hasn't moved on since it was
forked. Strictly speaking, the XenStore protocol allows a transaction to
succeed as long as nothing *it* read or wrote has changed in the interim,
but no implementations do that; *any* change is sufficient to abort a
transaction.
This does not yet fire watches on the changed nodes on a commit. That bit
is more fun and will come in a follow-on commit.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'stubs')
0 files changed, 0 insertions, 0 deletions