Author: trasz
Date: Sun Dec  1 08:13:10 2013
New Revision: 258790
URL: http://svnweb.freebsd.org/changeset/base/258790

Log:
  Fix hang on reboot with active iSCSI connections.
  
  MFC after:    3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==============================================================================
--- head/sys/dev/iscsi/iscsi.c  Sun Dec  1 07:34:21 2013        (r258789)
+++ head/sys/dev/iscsi/iscsi.c  Sun Dec  1 08:13:10 2013        (r258790)
@@ -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);
 }
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to