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] Properly change blkfront state to XenbusStateClosed

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Properly change blkfront state to XenbusStateClosed
From: Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>
Date: Wed, 29 Nov 2006 18:57:16 -0200
Delivery-date: Wed, 29 Nov 2006 12:57:21 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
I've just noticed it today.
Follows a fix.

-- 
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
# HG changeset patch
# User gcosta@xxxxxxxxxx
# Date 1164837286 18000
# Node ID 4ac5ffcde6875aa4c772941704fb75261c967462
# Parent  ffd048080ce2e50b1e1247709918484d8de54af1
[LINUX] Properly trigger XenbusStateClosed in blkfront

In some situations, like when error happens in block attach for
a guest in dom0, backend send us XenbusStateClosing notification.
However, as frontend were never properly initialized, it fails
to change its own state to XenbusStateClosed, leaving the system
in a dead-end state.

Signed-off-by: Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>

diff -r ffd048080ce2 -r 4ac5ffcde687 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Wed Nov 29 
16:49:52 2006 -0500
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Wed Nov 29 
16:54:46 2006 -0500
@@ -359,7 +359,7 @@ static void blkfront_closing(struct xenb
        DPRINTK("blkfront_closing: %s removed\n", dev->nodename);
 
        if (info->rq == NULL)
-               return;
+               goto out;
 
        spin_lock_irqsave(&blkif_io_lock, flags);
        /* No more blkif_request(). */
@@ -373,6 +373,7 @@ static void blkfront_closing(struct xenb
 
        xlvbd_del(info);
 
+out:
        xenbus_frontend_closed(dev);
 }
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Properly change blkfront state to XenbusStateClosed, Glauber de Oliveira Costa <=