freebsd-dev/sys/dev/xen/blkback
Roger Pau Monné 3e0522bc8f xen-blkback: fix error path on failed attach
The current error path in case of failure during attach/initialization is
not correct and leaves blkback in a stuck state. This is due to blkback
waiting for blkfront to switch to state XenbusStateClosed, but if blkfront
never attached (because the guest is not even started) it cannot possibly
make it to that state.

Instead just wait for the frontend to be in a state different than
XenbusStateConnected in order to proceed with the shutdown. Also, it is
wrong to call xbb_detach directly because it destroys the lock which can
still be used by xbb_frontend_changed.

Sponsored by: Citrix Systems R&D
2016-06-03 11:39:35 +00:00
..
blkback.c xen-blkback: fix error path on failed attach 2016-06-03 11:39:35 +00:00