From owner-svn-src-head@freebsd.org Mon Dec 7 06:42:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 285A49B7118; Mon, 7 Dec 2015 06:42:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C0C64174B; Mon, 7 Dec 2015 06:42:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id IAA28587; Mon, 07 Dec 2015 08:42:09 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1a5pUv-0009CQ-5m; Mon, 07 Dec 2015 08:42:09 +0200 Subject: Re: svn commit: r291911 - head/sys/dev/iscsi To: Steven Hartland , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201512070256.tB72u8C6057988@repo.freebsd.org> From: Andriy Gapon Message-ID: <56652A09.1030106@FreeBSD.org> Date: Mon, 7 Dec 2015 08:41:13 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201512070256.tB72u8C6057988@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2015 06:42:19 -0000 On 07/12/2015 04:56, Steven Hartland wrote: > Author: smh > Date: Mon Dec 7 02:56:08 2015 > New Revision: 291911 > URL: https://svnweb.freebsd.org/changeset/base/291911 > > Log: > Fix panic on shutdown due to iscsi event priority > > iscsi's shutdown_pre_sync prio was SHUTDOWN_PRI_FIRST which caused it to > run before other high priority handlers such as filesystems e.g. ZFS. > > This meant the iscsi sessions where removed before the ZFS geom consumer > was closed, resulting in a panic from g_access calls on debug kernels > due to negative acr. > > Instead use the same as the old iscsi_initiator SHUTDOWN_PRI_DEFAULT-1 > which allows it to run before dashutdown etc but after filesystems. > > MFC after: 2 weeks > Sponsored by: Multiplay > > Modified: > head/sys/dev/iscsi/iscsi.c > > Modified: head/sys/dev/iscsi/iscsi.c > ============================================================================== > --- head/sys/dev/iscsi/iscsi.c Sun Dec 6 21:31:09 2015 (r291910) > +++ head/sys/dev/iscsi/iscsi.c Mon Dec 7 02:56:08 2015 (r291911) > @@ -2365,7 +2365,7 @@ iscsi_load(void) > sc->sc_cdev->si_drv1 = sc; > > sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_pre_sync, > - iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); > + iscsi_shutdown, sc, SHUTDOWN_PRI_DEFAULT-1); > > return (0); > } It would be nice to also add a comment here explaining the priority. And spaces around '-' operator. -- Andriy Gapon