aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore/xenstored_transaction.c
Commit message (Collapse)AuthorAgeFilesLines
* nstore: rename public xenstore headersIan Campbell2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | The xenstore header xs.h is producing conflicts with other software[1]. xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems. [1]: http://bugs.debian.org/668550 [ Also update QEMU_TAG, to bring in corresponding change to qemu-xen-traditional. -iwj ] Signed-off-by: Bastian Blank <waldi@debian.org> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> --HG-- rename : tools/xenstore/xs.h => tools/xenstore/xenstore.h rename : tools/xenstore/xs_lib.h => tools/xenstore/xenstore_lib.h
* xenstore: sprintf->snprintf, and fix for OpenBSD.Keir Fraser2007-10-051-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenstore: Remove broken and unmaintained test code.kfraser@localhost.localdomain2007-07-031-1/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix xenstore entry accountingkfraser@localhost.localdomain2007-05-301-0/+54
| | | | | | | | | xenstored is incorrectly accounting domain nodes when transactions fail. Store pending count changes in the transaction structure, and apply at transaction completion, instead of directly applying the changes. Signed-off-by: Max Zhen <max.zhen@sun.com>
* Fully reset the xenstore connection when a domain is (re)introduced to ↵kfraser@localhost.localdomain2007-03-011-0/+16
| | | | | | xenstored. Signed-off-by: Keir Fraser <keir@xensource.com>
* [xenstore] Don't limit the number of concurrent transactions for domain0 ↵Christian Limpach2006-10-121-1/+1
| | | | | | | | | | connections since both xend and the xenstore-* utilities used in the hotplug scripts can easily reach the limit and we trust them anyway. Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
* Add a transaction_started field in xenstored connection structure instead ofvhanquez@gwig.uk.xensource.com2006-07-311-6/+4
| | | | | | | | browsing the list of transaction each time Bump the default to 10, and make it configurable through the command line. Signed-off-by: Vincent Hanquez <vincent@xensource.com>
* Limit the number of opened transactions per connection to 5.vhanquez@gwig.uk.xensource.com2006-07-291-0/+10
| | | | Signed-off-by: Vincent Hanquez <vincent@xensource.com>
* Fix Xen public interfaces and the tools to consistentlykaf24@firebug.cl.cam.ac.uk2005-10-121-2/+2
| | | | | | | | use stdint-format bitsize types (uint32_t and friends). Signed-off-by: Keir Fraser <keir@xensource.com>
* xenstored now supports multiple concurrent transactions perkaf24@firebug.cl.cam.ac.uk2005-10-101-14/+45
| | | | | | | | | | | | | | | | | | | | connection, plus interleaving of transactional and non-transactional accesses. A transaction identifier is added to the xsd_sockmsg header structure (0 means 'not in context of a transaction'). The user and kernel xs interfaces accept a pointer to a transaction handle where appropriate -- currently this is directly cast to an integer identifier in the client library / kernel driver, but will allow for keeping extra dynamic client-side state in future if we need to. The transaction mutex has now gone. It's replaced with a read-write mutex, but this is only acquired for exclusive access during suspend/resume, to ensure there are no in-progress transactions. Signed-off-by: Keir Fraser <keir@xensource.com>
* No need to gate xenstored reading requests from akaf24@firebug.cl.cam.ac.uk2005-10-101-1/+1
| | | | | | connection on whether there are pending replies/watches. Signed-off-by: Keir Fraser <keir@xensource.com>
* Make xenstored use tdb, transactions can soft-fail (EAGAIN)Rusty Russell2005-09-231-206/+46
| | | | | | | | | | | | | | 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>
* Remove ill-conceived concept of watches blocking reply oncl349@firebug.cl.cam.ac.uk2005-07-261-7/+2
| | | | | | | | | | | | | connection which did write/mkdir/rm/setperm etc. This causes deadlocks in real life, and I can't see a sane way of avoiding them: it is reasonable for someone to ignore watch notifications while doing other actions, and that means that we can do other writes. These writes can block pending other watchers; if one of these is the process blocked awaiting our ack, we deadlock. Signed-off-by: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Change watches: operations block until everyone has acked.cl349@firebug.cl.cam.ac.uk2005-07-261-17/+22
| | | | | | | | | | | | Watch events are no longer sent to self Watches no longer take a priority async and asyncwait commands for xs_test, now we need to continue despite blocking ops. Print test name at end of verbose run on failure. Use --trace-file arg to xenstored when testing Signed-off-by: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Change from bool indicating blocked to an enum: when watches gocl349@firebug.cl.cam.ac.uk2005-07-261-17/+28
| | | | | | | | | | synchronous this makes it easier (because then we have two reasons to block) Instead of using return value, use explicit state member inside struct connection. Signed-off-by: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* xenstored updates.cl349@firebug.cl.cam.ac.uk2005-07-121-4/+9
| | | | | | | | | | - add trace file support. - update permissions code. - trigger watches on children of nodes being removed. - update test cases. Signed-off-by: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* bitkeeper revision 1.1748 (42bbc14djIjScNrLp20eDhlxUjQl4g)cl349@firebug.cl.cam.ac.uk2005-06-241-21/+63
| | | | | | | | | | | xenstored_transaction.c, xenstored_core.h, xenstored_core.c, TODO: Update TODO list Wrap opendir in talloc so it gets cleaned up on OOM. Remove last call to system by open-coding "cp -al" to create transaction. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* bitkeeper revision 1.1713.3.5 (42b2a4e2r6SNlC_nq2hAkXEQjEFAmA)cl349@firebug.cl.cam.ac.uk2005-06-171-0/+1
| | | | | | | | | | | | | | | | | | | Many files: - watch now takes a token, returned when reading watch - More tests - Fix domain shared page communication (flush output) - Add "home" path for domains - More permissions checks in various functions - Simplify watch acknowledgement code and fix occasional bug xs_watch_stress.c, 12readonly.sh, 11domain-watch.sh, 10domain-homedir.sh: new file xs_stress.c, xs_lib.h, xs_lib.c: Cleanup whitespace. ignore: Add tools/xenstore/xs_watch_stress Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* bitkeeper revision 1.1662.1.15 (42a5968eiZE_DjdIFPjxvzLw6ACvCQ)cl349@firebug.cl.cam.ac.uk2005-06-071-0/+284
Add xenstore daemon and library. Makefile: Add xenstore subdirectory. Remove xs_stress on clean. Many files: new file ignore: Update ignore list for xenstore. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored) Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>