From owner-svn-src-all@freebsd.org Mon Dec 7 13:18:07 2015 Return-Path: Delivered-To: svn-src-all@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 1E88199AD9B; Mon, 7 Dec 2015 13:18:07 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C151B1AF5; Mon, 7 Dec 2015 13:18:06 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by wmww144 with SMTP id w144so139983664wmw.1; Mon, 07 Dec 2015 05:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=lXd6lb94WFNgCYr8+3291gShBdpq2Au72sG2LBrYFFw=; b=X2xgmlJXQEjrFY1fLJ6ABuMvbN2SAU5HNWBDnz9NelnTED+9oyX1hPQMNBVZ9LdANT ikELyUdcoZGFoZO/5eE9KIEH7EgEdDP5g/sOJphRyBJerjyxhalYgVqM9N7sD7gBozVv uTUE77lkJPEd4iNZ3E7xcawFTmQEG3+REZ+DgYDtRmDJ+z40Si7LeRPg3puOKzEl4D9A uwjN0BwqULgyX9w9CYxUY+fUDktKccokw1S9/1PSVkZ1BnhoD13U6tu9pVr/nry7z4Ew ilVqGLkyIPulsr9nu+SUXK8hsl1TSTHA1U1IyUnd5QjqLGJhFvmUKG+9ja0m4hoIbyPF 8Elg== X-Received: by 10.28.64.7 with SMTP id n7mr21473841wma.30.1449494285352; Mon, 07 Dec 2015 05:18:05 -0800 (PST) Received: from brick.home (acyr204.neoplus.adsl.tpnet.pl. [83.11.201.204]) by smtp.gmail.com with ESMTPSA id c194sm16576691wmd.13.2015.12.07.05.18.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2015 05:18:04 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 7 Dec 2015 14:18:01 +0100 From: "trasz@freebsd.org" To: Steven Hartland Cc: Andriy Gapon , 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> Mail-Followup-To: Steven Hartland , Andriy Gapon , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201512070256.tB72u8C6057988@repo.freebsd.org> <56652A09.1030106@FreeBSD.org> <56656CCF.8070700@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56656CCF.8070700@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2015 13:18:07 -0000 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.