svn commit: r232310 - stable/9/sys/dev/xen/blkback
Justin T. Gibbs
gibbs at FreeBSD.org
Wed Feb 29 18:42:00 UTC 2012
Author: gibbs
Date: Wed Feb 29 18:41:59 2012
New Revision: 232310
URL: http://svn.freebsd.org/changeset/base/232310
Log:
MFC r231883
===========
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.
Modified:
stable/9/sys/dev/xen/blkback/blkback.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/dev/xen/blkback/blkback.c
==============================================================================
--- stable/9/sys/dev/xen/blkback/blkback.c Wed Feb 29 18:11:33 2012 (r232309)
+++ stable/9/sys/dev/xen/blkback/blkback.c Wed Feb 29 18:41:59 2012 (r232310)
@@ -3955,16 +3955,12 @@ xbb_frontend_changed(device_t dev, Xenbu
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",
More information about the svn-src-stable-9
mailing list