diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2005-09-23 14:25:01 +0100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2005-09-23 14:25:01 +0100 |
commit | f11f68cd1157d84615621edcd7321a6d0a09b158 (patch) | |
tree | becbcc239c8b8c0f26e08428b4ac798fa5bdb4fc /tools/xenstore/xs.c | |
parent | 7c7896249b7ffa3a0e6c1c749c8c3b08edf2ae70 (diff) | |
download | xen-f11f68cd1157d84615621edcd7321a6d0a09b158.tar.gz xen-f11f68cd1157d84615621edcd7321a6d0a09b158.tar.bz2 xen-f11f68cd1157d84615621edcd7321a6d0a09b158.zip |
Make xenstored use tdb, transactions can soft-fail (EAGAIN)
Transactions no longer take root dir, no longer lock & block: commit can fail spuriously with EAGAIN, not ETIMEDOUT.
Speeds up transactions by over 1000 times, should be NFS safe.
New program: xs_tdb_dump to dump raw TDB contents.
Don't do failure testing: we are no longer robust against all ENOMEM 8(
Introduce "struct node" which contains perms, children and data.
Make struct xs_permissions unpadded, so we can write to tdb w/o valgrind complaints.
Gently modify TDB to use talloc, not do alloc on tdb_delete.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools/xenstore/xs.c')
-rw-r--r-- | tools/xenstore/xs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c index 7036774f09..a842a6e39c 100644 --- a/tools/xenstore/xs.c +++ b/tools/xenstore/xs.c @@ -497,13 +497,12 @@ bool xs_unwatch(struct xs_handle *h, const char *path, const char *token) /* Start a transaction: changes by others will not be seen during this * transaction, and changes will not be visible to others until end. - * Transaction only applies to the given subtree. * You can only have one transaction at any time. * Returns false on failure. */ -bool xs_transaction_start(struct xs_handle *h, const char *subtree) +bool xs_transaction_start(struct xs_handle *h) { - return xs_bool(xs_single(h, XS_TRANSACTION_START, subtree, NULL)); + return xs_bool(xs_single(h, XS_TRANSACTION_START, "", NULL)); } /* End a transaction. |