]> xenbits.xensource.com Git - people/pauldu/qemu.git/commit
xen-block: treat XenbusStateUnknown the same as XenbusStateClosed unknown-state
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 17 Sep 2019 16:05:57 +0000 (17:05 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 17 Sep 2019 16:07:45 +0000 (17:07 +0100)
commit1572a72c491aad1fb3f0a5c088221f9dc95243fa
treec9aa32bcc9988e227738254579f73c5ee36da63e
parentbdb0496bf76b93ebbbfdf1990ccf6531ed01f81d
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.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
hw/block/xen-block.c