|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] xs transaction
>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: 2007年9月11日 15:32
>
>We do support concurrent transactions at the API level, but the
>implementation will currently allow only one concurrent transaction that
>modifies state to succeed. This is a detail of the implementation however
>(from a semantic point of view -- it may impact performance of course!).
>
>Nested transactions (transactions within transactions) are not supported,
>and attempts to create a nested transaction will be explicitly failed.
>
> -- Keir
>
Sorry that I may miss some important logic here. However from what I
read, do_transaction_start doesn't prevent nest case:
void do_transaction_start(struct connection *conn, struct buffered_data
*in)
{
...
/* We don't support nested transactions. */
if (conn->transaction) {
send_error(conn, EBUSY);
return;
}
Conn->transaction is only set in life cycle of each message process:
static void process_message(struct connection *conn, struct buffered_data *in)
{
trans = transaction_lookup(conn, in->hdr.msg.tx_id);
...
conn->transaction = trans;
switch (in->hdr.msg.type) {
...
conn->transaction = NULL;
}
So given following nest case, I'm not sure how it's prevented:
Xs_transaction_start(xs_handle);
<- at this point, conn->transaction is NULL
Xs_transaction_start(xs_handle);
Thanks,
Kevin
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|