summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2013-12-01 08:13:10 +0000
committertrasz <trasz@FreeBSD.org>2013-12-01 08:13:10 +0000
commit015cdc2535764e4ad04ba03731ed49daf21b0241 (patch)
treecd0d7767c599d417846e584e5e6a9ed71eb82db5
parentec81cfc8722dc2d74b88c058e6528e14018f2dea (diff)
downloadFreeBSD-src-015cdc2535764e4ad04ba03731ed49daf21b0241.zip
FreeBSD-src-015cdc2535764e4ad04ba03731ed49daf21b0241.tar.gz
Fix hang on reboot with active iSCSI connections.
MFC after: 3 days Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/dev/iscsi/iscsi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index 1e65416..2f5328d 100644
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -2110,10 +2110,12 @@ iscsi_load(void)
sc->sc_cdev->si_drv1 = sc;
/*
- * XXX: For some reason this doesn't do its job; active sessions still hang out there
- * after final sync, making the reboot effectively hang.
+ * Note that this needs to get run before dashutdown(). Otherwise,
+ * when rebooting with iSCSI session with outstanding requests,
+ * but disconnected, dashutdown() will hang on cam_periph_runccb().
*/
- sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, iscsi_shutdown, sc, SHUTDOWN_PRI_DEFAULT);
+ sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync,
+ iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST);
return (0);
}
OpenPOWER on IntegriCloud