From owner-svn-src-all@freebsd.org Mon Dec 7 11:22:42 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 3F7329B9A14; Mon, 7 Dec 2015 11:22:42 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 CDC541F51; Mon, 7 Dec 2015 11:22:41 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by wmec201 with SMTP id c201so146301869wme.1; Mon, 07 Dec 2015 03:22:39 -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=dK5uW9XhKWWVodu5bi6GBTeEQg1DuSscKo9ukULu1KY=; b=rIrw4YU4cIXMwhdjN4iP98ZwP5jtldN4+xiZa2I3bQDkwbjoHycrv8zGgeS614cNuc nM+L/TgUGfVEPOTqqjS95ckdCesVn7foJGuJpAmw64BY7EP0dymHvS4DZkzYGQBqLIJc R1hbtvdBFKKg3S3jK7QzI4U8ySnb7lxFFUnfe1spZ+6w1EAYxXNFqT0wAzc6QjMX4KK3 eivQ1n8aS3N9fgl0YBVmzxf7b2lJnxfwwIWtWTvegqT49EZNVj2n5KOT181CTebapPyN Nwq+RTujgr6Tw3YE2sp8F52KwqqnsE6RlmAEteQQPHl3B47VXnLIcV2Sk98yYyKpJoxm JmcA== X-Received: by 10.194.63.46 with SMTP id d14mr31295787wjs.34.1449487359840; Mon, 07 Dec 2015 03:22:39 -0800 (PST) Received: from brick.home (acyr204.neoplus.adsl.tpnet.pl. [83.11.201.204]) by smtp.gmail.com with ESMTPSA id d2sm24827487wjy.16.2015.12.07.03.22.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2015 03:22:38 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Mon, 7 Dec 2015 12:22:35 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Steven Hartland Cc: 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: <20151207112235.GA12517@brick.home> Mail-Followup-To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512070256.tB72u8C6057988@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512070256.tB72u8C6057988@repo.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 11:22:42 -0000 On 1207T0256, 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. I think this might be backwards. Have you tested the following scenario: 1. Establish the iSCSI session 2. Mount the LUN somewhere 3. Make the target not reachable (eg ifconfig down), so that the initiator tries to reconnect 4. Try to shutdown? Basically, the point of this code is to disable reconnects when there won't be any iscsid(8) instance to handle them. The iscsi_shutdown() isn't supposed to remove working iSCSI sessions.