Date: Mon, 7 Dec 2015 14:18:01 +0100 From: "trasz@freebsd.org" <trasz@freebsd.org> To: Steven Hartland <steven@multiplay.co.uk> Cc: Andriy Gapon <avg@FreeBSD.org>, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r291911 - head/sys/dev/iscsi Message-ID: <20151207131801.GB12870@brick.home> In-Reply-To: <56656CCF.8070700@freebsd.org> References: <201512070256.tB72u8C6057988@repo.freebsd.org> <56652A09.1030106@FreeBSD.org> <56656CCF.8070700@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1207T1126, Steven Hartland wrote: > > > On 07/12/2015 06:41, Andriy Gapon wrote: > > 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. > Ah, there was actually already a comment there but seems that's been > removed in HEAD by r286226 which also changed the post_sync to a > pre_sync so its currently really broken in HEAD and stable/10 compared > to 10.2. Surprisingly this was already mentioned by mav in the review of > said commit (https://reviews.freebsd.org/D3052). It was removed, because it was no longer applicable to the new code. > The style was copied from iscsi_initiator, I'll fix them both. > > I'm retesting this to validate down session recovery now and will update > once I've confirmed that. I have a feeling that r291911 fixes a problem that existed in previous releases, but was fixed long ago by r286226.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151207131801.GB12870>