Date: Sun, 1 Dec 2013 08:13:10 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258790 - head/sys/dev/iscsi Message-ID: <201312010813.rB18DANB041729@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312010813.rB18DANB041729>