mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix regression in the handling of blkback close events for
devices that are unplugged via QEMU. sys/dev/xen/blkback/blkback.c: Toolstack initiated closures change the frontend's state to Closing. The backend must change to Closing as well, even if we can't actually close yet, in order for the frontend to notice and start the closing process. MFC after: 3 days
This commit is contained in:
parent
babc7c1258
commit
45cbfcdabc
1 changed files with 2 additions and 6 deletions
|
|
@ -3955,16 +3955,12 @@ xbb_frontend_changed(device_t dev, XenbusState frontend_state)
|
|||
xbb_connect(xbb);
|
||||
break;
|
||||
case XenbusStateClosing:
|
||||
/*
|
||||
* Frontend has acknowledged Closing request.
|
||||
* Wait for Closed state.
|
||||
*/
|
||||
break;
|
||||
case XenbusStateClosed:
|
||||
mtx_lock(&xbb->lock);
|
||||
xbb_shutdown(xbb);
|
||||
mtx_unlock(&xbb->lock);
|
||||
xenbus_set_state(xbb->dev, XenbusStateClosed);
|
||||
if (frontend_state == XenbusStateClosed)
|
||||
xenbus_set_state(xbb->dev, XenbusStateClosed);
|
||||
break;
|
||||
default:
|
||||
xenbus_dev_fatal(xbb->dev, EINVAL, "saw state %d at frontend",
|
||||
|
|
|
|||
Loading…
Reference in a new issue