WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] mini-os: Fix xenbus_switch_state's transaction retry

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] mini-os: Fix xenbus_switch_state's transaction retry
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Wed, 7 Apr 2010 01:46:03 +0200
Delivery-date: Tue, 06 Apr 2010 16:46:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
mini-os: Fix xenbus_switch_state's transaction retry

When xenbus_switch_state has to retry the transaction which it just
created, it needs to recreate another one.  Clearing xbt triggers it.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

diff -r adce8bc43fcc extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c    Tue Apr 06 07:16:47 2010 +0100
+++ b/extras/mini-os/xenbus/xenbus.c    Wed Apr 07 01:44:16 2010 +0200
@@ -154,8 +154,10 @@ char *xenbus_switch_state(xenbus_transac
         msg = xenbus_write(xbt, path, value);
 
 exit:
-        if (xbt_flag)
+        if (xbt_flag) {
             msg2 = xenbus_transaction_end(xbt, 0, &retry);
+            xbt = XBT_NIL;
+        }
         if (msg == NULL && msg2 != NULL)
             msg = msg2;
     } while (retry);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] mini-os: Fix xenbus_switch_state's transaction retry, Samuel Thibault <=