ia64/xen-unstable
changeset 12704:30fe5097cf7f
[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@redhat.com>
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@redhat.com>
author | kfraser@localhost.localdomain |
---|---|
date | Thu Nov 30 17:34:48 2006 +0000 (2006-11-30) |
parents | f19ddc0ee3e6 |
children | b7095209e31a |
files | linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Thu Nov 30 17:33:11 2006 +0000 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Thu Nov 30 17:34:48 2006 +0000 1.3 @@ -359,7 +359,7 @@ static void blkfront_closing(struct xenb 1.4 DPRINTK("blkfront_closing: %s removed\n", dev->nodename); 1.5 1.6 if (info->rq == NULL) 1.7 - return; 1.8 + goto out; 1.9 1.10 spin_lock_irqsave(&blkif_io_lock, flags); 1.11 /* No more blkif_request(). */ 1.12 @@ -373,6 +373,7 @@ static void blkfront_closing(struct xenb 1.13 1.14 xlvbd_del(info); 1.15 1.16 + out: 1.17 xenbus_frontend_closed(dev); 1.18 } 1.19