|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-3.0-testing] [LINUX] Fix blkfront driver to check c
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 55b9042d61cd00654c659c8cbfc27bc3f4fe82fa
# Parent 36c25ed503e7df95ea55cdf8e1af8b2ceb142be5
[LINUX] Fix blkfront driver to check connection status to backend in
all critical circumstances.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset: 10336:91d2f2258c563100d5294fe12fd9fbe56870b213
xen-unstable date: Tue Jun 13 15:13:29 2006 +0100
[LINUX] A better way to stop blkdev request handling in blkfront
driver.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset: 10340:88d867661599a0aa05ec81d75ac6954146d269a9
xen-unstable date: Tue Jun 13 15:33:10 2006 +0100
---
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff -r 36c25ed503e7 -r 55b9042d61cd
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Jun 13
14:11:13 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Tue Jun 13
15:35:26 2006 +0100
@@ -407,7 +407,8 @@ static void blkif_restart_queue(void *ar
{
struct blkfront_info *info = (struct blkfront_info *)arg;
spin_lock_irq(&blkif_io_lock);
- kick_pending_request_queues(info);
+ if (info->connected == BLKIF_STATE_CONNECTED)
+ kick_pending_request_queues(info);
spin_unlock_irq(&blkif_io_lock);
}
@@ -695,6 +696,7 @@ static void blkif_free(struct blkfront_i
spin_lock_irq(&blkif_io_lock);
info->connected = suspend ?
BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED;
+ blk_stop_queue(info->rq); /* no more blkif_request() */
spin_unlock_irq(&blkif_io_lock);
/* Free resources associated with old device channel. */
@@ -768,17 +770,17 @@ static void blkif_recover(struct blkfron
(void)xenbus_switch_state(info->xbdev, XenbusStateConnected);
+ spin_lock_irq(&blkif_io_lock);
+
/* 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);
/* 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);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-3.0-testing] [LINUX] Fix blkfront driver to check connection status to backend in,
Xen patchbot-3 . 0-testing <=
|
|
|
|
|