ia64/xen-unstable

changeset 6081:389e76fbfdbd

Do not suppress errors on writes outside transactions.
Mike Wray made this change because xend's callbacks were failing
with EROFS, because a transaction was going on. However, the
solution is to either block callbacks during transactions, or use
a different connection to the store.
We fail ex-transaction activity because it's not clear what the right
behaviour is: it allows deadlock if two people do it, and it implied
your transaction isn't rooted in the right place.

This hack caused the testsuite to fail (obviously), so as a result the
testsuite wasn't run very often. This caused it to bitrot.
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 09 16:16:08 2005 +0000 (2005-08-09)
parents f40c6650152e
children 5a683386dc58
files tools/xenstore/xenstored_core.c
line diff
     1.1 --- a/tools/xenstore/xenstored_core.c	Tue Aug 09 13:17:37 2005 +0000
     1.2 +++ b/tools/xenstore/xenstored_core.c	Tue Aug 09 16:16:08 2005 +0000
     1.3 @@ -931,8 +931,7 @@ static void do_write(struct connection *
     1.4  	}
     1.5  
     1.6  	node = canonicalize(conn, vec[0]);
     1.7 -	if (/*suppress error on write outside transaction*/ 0 &&
     1.8 -	    !within_transaction(conn->transaction, node)) {
     1.9 +	if (!within_transaction(conn->transaction, node)) {
    1.10  		send_error(conn, EROFS);
    1.11  		return;
    1.12  	}