|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] blktap: also call blkif_disconnect() when frontend switched to closed
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1447677480 -3600
# Node ID 3ae3ae4c878fe95de3f895110806a428e88e90b1
# Parent bdbb8212e3b1e7f67cd5ca552b5ddc0d94c6bd33
blktap: also call blkif_disconnect() when frontend switched to closed
frontends aren't required to set their state to XenbusStateClosing, yet
backends should not hang on to resources when there's no connection. As
frontend_changed() already makes use of blkif_disconnect() being
idempotent, we're fine to utilize this here too. This mirrors the
respective blkback change (c/s 1162:4c2b7dcbfd8b).
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
diff -r bdbb8212e3b1 -r 3ae3ae4c878f drivers/xen/blktap/xenbus.c
--- a/drivers/xen/blktap/xenbus.c Fri Oct 16 17:04:25 2015 +0200
+++ b/drivers/xen/blktap/xenbus.c Mon Nov 16 13:38:00 2015 +0100
@@ -385,13 +385,11 @@ static void tap_frontend_changed(struct
break;
case XenbusStateClosing:
+ case XenbusStateClosed:
blkif_disconnect(be->blkif);
- xenbus_switch_state(dev, XenbusStateClosing);
- break;
-
- case XenbusStateClosed:
- xenbus_switch_state(dev, XenbusStateClosed);
- if (xenbus_dev_is_online(dev))
+ xenbus_switch_state(dev, frontend_state);
+ if (frontend_state != XenbusStateClosed ||
+ xenbus_dev_is_online(dev))
break;
/* fall through if not online */
case XenbusStateUnknown:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |