[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-xen staging] xen-block: treat XenbusStateUnknown the same as XenbusStateClosed
commit 4a0ed3588982281db0a2457f51cf6b1630eb7fd0 Author: Paul Durrant <paul.durrant@xxxxxxxxxx> AuthorDate: Wed Sep 18 12:57:02 2019 +0100 Commit: Anthony PERARD <anthony.perard@xxxxxxxxxx> CommitDate: Fri Sep 27 11:21:35 2019 +0100 xen-block: treat XenbusStateUnknown the same as XenbusStateClosed When a frontend gracefully disconnects from an offline backend, it will set its own state to XenbusStateClosed. The code in xen-block.c correctly deals with this and sets the backend into XenbusStateClosed. Unfortunately it is possible for toolstack to actually delete the frontend area before the state key has been read, leading to an apparent frontend state of XenbusStateUnknown. This prevents the backend state from transitioning to XenbusStateClosed and hence leaves it limbo. This patch simply treats a frontend state of XenbusStateUnknown the same as XenbusStateClosed, which will unblock the backend in these circumstances. Reported-by: Mark Syms <mark.syms@xxxxxxxxxx> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Reviewed-by: John Snow <jsnow@xxxxxxxxxx> Message-Id: <20190918115702.38959-1-paul.durrant@xxxxxxxxxx> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> (cherry picked from commit ef916ab3ec570eac799be540e499d0123fe61899) --- hw/block/xen-block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 69d73196e2..ed54db74ad 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -312,6 +312,7 @@ static void xen_block_frontend_changed(XenDevice *xendev, break; case XenbusStateClosed: + case XenbusStateUnknown: xen_block_disconnect(xendev, &local_err); if (local_err) { error_propagate(errp, local_err); -- generated by git-patchbot for /home/xen/git/qemu-xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |