Fix VBD recovery logic on SMP guests (+ a minor error reporting fix for save)

Signed-off-by: Steven Hand <steven@xensource.com>
This commit is contained in:
smh22@firebug.cl.cam.ac.uk committed 2005-12-01 20:43:04 +01:00
1 parent da533ceb07
commit 2b039aa937
2 files changed
+20 -10

No files matched your search

@@ -300,6 +300,10 @@ static void backend_changed(struct xenbus_device *dev,
/* ** 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,20 +328,17 @@ static void connect(struct blkfront_info *info)
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
* device-layer structures now, to ensure that writes are flushed through to
@@ -770,11 +771,20 @@ static void blkif_recover(struct blkfront_info *info)
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);
}
+1 -1
View File
@@ -677,7 +677,7 @@ int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.