aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_domain.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2005-09-23 14:25:01 +0100
committerRusty Russell <rusty@rustcorp.com.au>2005-09-23 14:25:01 +0100
commitf11f68cd1157d84615621edcd7321a6d0a09b158 (patch)
treebecbcc239c8b8c0f26e08428b4ac798fa5bdb4fc /tools/xenstore/xenstored_domain.c
parent7c7896249b7ffa3a0e6c1c749c8c3b08edf2ae70 (diff)
downloadxen-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/xenstored_domain.c')
-rw-r--r--tools/xenstore/xenstored_domain.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/xenstore/xenstored_domain.c b/tools/xenstore/xenstored_domain.c
index e09acee6df..3732781df9 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -309,16 +309,11 @@ void do_introduce(struct connection *conn, struct buffered_data *in)
return;
}
- if (conn->id != 0) {
+ if (conn->id != 0 || !conn->can_write) {
send_error(conn, EACCES);
return;
}
- if (!conn->can_write) {
- send_error(conn, EROFS);
- return;
- }
-
/* Sanity check args. */
if ((atoi(vec[2]) <= 0) || !is_valid_nodename(vec[3])) {
send_error(conn, EINVAL);
@@ -386,7 +381,7 @@ void do_release(struct connection *conn, const char *domid_str)
talloc_free(domain->conn);
- fire_watches(NULL, "@releaseDomain", false);
+ fire_watches(conn, "@releaseDomain", false);
send_ack(conn, XS_RELEASE);
}