From owner-svn-src-stable@FreeBSD.ORG Wed Dec 4 09:46:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEE53A2B; Wed, 4 Dec 2013 09:46:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA8D811FE; Wed, 4 Dec 2013 09:46:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rB49kRYU053193; Wed, 4 Dec 2013 09:46:27 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rB49kRlJ053192; Wed, 4 Dec 2013 09:46:27 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201312040946.rB49kRlJ053192@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 4 Dec 2013 09:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258915 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 09:46:27 -0000 Author: trasz Date: Wed Dec 4 09:46:27 2013 New Revision: 258915 URL: http://svnweb.freebsd.org/changeset/base/258915 Log: MFC r258790: Fix hang on reboot with active iSCSI connections. Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Wed Dec 4 08:20:04 2013 (r258914) +++ stable/10/sys/dev/iscsi/iscsi.c Wed Dec 4 09:46:27 2013 (r258915) @@ -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); }