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-changelog

[Xen-changelog] Fix VBD recovery logic on SMP guests (+ a minor error re

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix VBD recovery logic on SMP guests (+ a minor error reporting fix for save)
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Dec 2005 21:40:08 +0000
Delivery-date: Thu, 01 Dec 2005 21:40:18 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID f62f9b1732b9adaeab50b808746097b7aa089f5d
# Parent  ca236a81729dd31c9eab7991562dd1664ceb0abf
Fix VBD recovery logic on SMP guests (+ a minor error reporting fix for save)

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r ca236a81729d -r f62f9b1732b9 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Thu Dec  1 
19:23:07 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Thu Dec  1 
19:43:04 2005
@@ -300,6 +300,10 @@
 /* ** Connection ** */
 
 
+/* 
+** Invoked when the backend is finally 'ready' (and has told produced 
+** the details about the physical device - #sectors, size, etc). 
+*/
 static void connect(struct blkfront_info *info)
 {
        unsigned long sectors, sector_size;
@@ -324,19 +328,16 @@
                return;
        }
        
-        info->connected = BLKIF_STATE_CONNECTED;
         xlvbd_add(sectors, info->vdevice, binfo, sector_size, info);
-       
-       err = xenbus_switch_state(info->xbdev, NULL, XenbusStateConnected);
-       if (err)
-               return;
+
+       (void)xenbus_switch_state(info->xbdev, NULL, XenbusStateConnected); 
        
        /* Kick pending requests. */
        spin_lock_irq(&blkif_io_lock);
+       info->connected = BLKIF_STATE_CONNECTED;
        kick_pending_request_queues(info);
        spin_unlock_irq(&blkif_io_lock);
 }
-
 
 /**
  * Handle the change of state of the backend to Closing.  We must delete our
@@ -770,11 +771,20 @@
 
        kfree(copy);
 
-       /* Kicks things back into life. */
+       (void)xenbus_switch_state(info->xbdev, NULL, XenbusStateConnected); 
+       
+       /* Now safe for us to use the shared ring */
+       spin_lock_irq(&blkif_io_lock);
+        info->connected = BLKIF_STATE_CONNECTED;
+       spin_unlock_irq(&blkif_io_lock);
+
+       /* Send off requeued requests */
        flush_requests(info);
 
-       /* Now safe to let other people use the interface. */
-       info->connected = BLKIF_STATE_CONNECTED;
+       /* Kick any other new requests queued since we resumed */
+       spin_lock_irq(&blkif_io_lock);
+       kick_pending_request_queues(info);
+       spin_unlock_irq(&blkif_io_lock);
 }
 
 
diff -r ca236a81729d -r f62f9b1732b9 tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Thu Dec  1 19:23:07 2005
+++ b/tools/libxc/xc_linux_save.c       Thu Dec  1 19:43:04 2005
@@ -677,7 +677,7 @@
                              live_shinfo->arch.pfn_to_mfn_frame_list_list);
 
     if (!live_p2m_frame_list_list) {
-        ERR("Couldn't map p2m_frame_list_list");
+        ERR("Couldn't map p2m_frame_list_list (errno %d)", errno);
         goto out;
     }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix VBD recovery logic on SMP guests (+ a minor error reporting fix for save), Xen patchbot -unstable <=