[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix VBD recovery logic on SMP guests (+ a minor error reporting fix for save)
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |