xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] xen-blkfront: don't call talk_to_blkback when already connected to blkback
@ 2016-05-31  8:59 Bob Liu
  0 siblings, 0 replies; 10+ messages in thread
From: Bob Liu @ 2016-05-31  8:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: xen-devel, Bob Liu, roger.pau

Sometimes blkfont may receive twice blkback_changed() notification after
migration, then talk_to_blkback() will be called twice too and confused
xen-blkback.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
 drivers/block/xen-blkfront.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index ca13df8..01aa460 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -2485,7 +2485,8 @@ static void blkback_changed(struct xenbus_device *dev,
 		break;
 
 	case XenbusStateConnected:
-		if (dev->state != XenbusStateInitialised) {
+		if ((dev->state != XenbusStateInitialised) &&
+			(dev->state != XenbusStateConnected)) {
 			if (talk_to_blkback(dev, info))
 				break;
 		}
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-15 14:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1464685157-30738-1-git-send-email-bob.liu@oracle.com>
2016-05-31  8:59 ` [PATCH 2/2] xen-blkfront: fix resume issues Bob Liu
2016-05-31 20:33 ` [PATCH 1/2] xen-blkfront: don't call talk_to_blkback when already connected to blkback Konrad Rzeszutek Wilk
     [not found] ` <20160531203307.GC23808@char.us.oracle.com>
2016-06-01  5:49   ` Bob Liu
     [not found]   ` <574E7763.9060001@oracle.com>
2016-06-02 14:30     ` Konrad Rzeszutek Wilk
2016-06-07 15:25     ` Konrad Rzeszutek Wilk
     [not found]     ` <20160607152524.GA10281@localhost.localdomain>
2016-06-08  6:46       ` Bob Liu
     [not found]       ` <5757BF4E.9080307@oracle.com>
2016-06-08 14:47         ` Konrad Rzeszutek Wilk
     [not found]         ` <20160608144739.GD17027@char.us.oracle.com>
2016-06-15  8:39           ` Ross Lagerwall
     [not found]           ` <57611424.2020802@citrix.com>
2016-06-15 14:08             ` Konrad Rzeszutek Wilk
2016-05-31  8:59 Bob Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).