From owner-svn-src-head@freebsd.org Mon Dec 7 11:26:05 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 576BA9B9A9A for ; Mon, 7 Dec 2015 11:26:05 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 EED8B110D for ; Mon, 7 Dec 2015 11:26:04 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by wmww144 with SMTP id w144so145825253wmw.0 for ; Mon, 07 Dec 2015 03:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=mF0508qNlhv22RP6b8pyBjWdjElqwIbd4EG8JLLWsyM=; b=kGrbhQCcFRylk8Q+QhZnbgx2NzcKXFPS81iGJrN/zBKFukoQ3DsEL+y7r4fZ+myian LrmJmYPet43nOsb0/TFs+3gqxmvzn4Wtltqcpx+025axcSRLSaltWFwcdU/f+onzKGSS T28kFOzNV90K+LJdXc9p7aqz5M9iSQMDqLW3LwzvhCOx9XCz3JPwdcPtOknucNj25X/+ q8YBl3B9dMxmeg9DuAAYaN7fZ3pLtROUZiKmb2Ox4LNQBntiy/Tk68uSxiyUX8suIKaN cjIoToctiHwjaGQ62ozStUQKOG9IFho+xsbpaC1NgG5wNC0dBGXnXMUcJJtURpF1J2gL P7VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=mF0508qNlhv22RP6b8pyBjWdjElqwIbd4EG8JLLWsyM=; b=QFYP+VXXaECkIFh4K0Qsh7f5kg4NYSlVigk+hLJhlxv6KcB0QYaBioEhTCqLXG4/wL n/yuRvzShmL0t+9+/kzi/ujvVGXNFHHZDqMaQDjriYp0OFYPTerne33kQ23MM/CV+/6r dMUNHi83Vfsuh/GEqUI62+c8agROdmDJJh3mXFa1LW6uiWqapnBPkcHN/4Gm/4Q0DDq7 WCaPMMLptYHauyw8/AYbBWighd0dKR96jxvTzakr1+HXQw/zdMXazt/qkHK1lWRQGNgI zuDSwEz9rd7jscVcvVOueZ4UTXK/fjk3dk90GVMeiAVbm7vZSAGkUKA5rG39Tu8p7vzn MliQ== X-Gm-Message-State: ALoCoQkt+fK/SbChyUubdkHKa+8g/LJb44ywAOWuVnYcRfj0WUol5fhLlJ5VkFwscBuZZRcuh2Gi X-Received: by 10.194.134.102 with SMTP id pj6mr4204735wjb.23.1449487563444; Mon, 07 Dec 2015 03:26:03 -0800 (PST) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id h189sm16219147wme.1.2015.12.07.03.26.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Dec 2015 03:26:02 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r291911 - head/sys/dev/iscsi To: Andriy Gapon , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org, "trasz@freebsd.org" References: <201512070256.tB72u8C6057988@repo.freebsd.org> <56652A09.1030106@FreeBSD.org> Message-ID: <56656CCF.8070700@freebsd.org> Date: Mon, 7 Dec 2015 11:26:07 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <56652A09.1030106@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed 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 11:26:05 -0000 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). 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.