From owner-svn-src-head@freebsd.org Tue Oct 24 18:19:21 2017 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 9BB65E552E3; Tue, 24 Oct 2017 18:19:21 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) (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 786A06B1EB; Tue, 24 Oct 2017 18:19:21 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-pg0-f42.google.com with SMTP id v78so15173339pgb.5; Tue, 24 Oct 2017 11:19:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+g/sGidYXEONMycm3C/cQScZT5UxrAiPVmhOY41oW+M=; b=SlkU26UD3L77nQsq6MOmxC2jQaJbV37nwSAlWp+zRjkxrw256TFcKDlQycn5le84mp YOvJlRcJp/oAFr/IXGUWNdf+WQVT+tPKAmDYCTjK48n2NJXK+IVOigtQRN7TVye/13tY 0k1itmET7uQo3J3X4o6SiqwrEkfrr7X/zwZDgdJc0YDmfjxU5brK87nMmoNfmMfrDyws Sn7t9sGoFjnsf3OkI9q8j9Q2dxCUSQHRO228YVJwJ7Hj5zEbijyBIg777sztSaaC8+CR KbXrAfuvRBRUnxyZg4Gb0HBQ0eU0LqDz7KQreSEwlApGrBp+RJDdPGja0H2X+DFUyEGI tIhA== X-Gm-Message-State: AMCzsaV9RSywTVfvaKQ/SzHV8c1QxEFcdIuMLOTZ+tZp9f75I5Txpi9y VfKhU56mFsmGnhVBMaMV/kXYofHtn4s= X-Google-Smtp-Source: ABhQp+Ra+1b6wnUB8Fn8Nak1XOK+nSjeUFUi5Zq5Yhs3iggwEHxJRwJJrEeIzklspOdhpq3Ls7hf2g== X-Received: by 10.98.60.23 with SMTP id j23mr17285274pfa.190.1508869160092; Tue, 24 Oct 2017 11:19:20 -0700 (PDT) Received: from [172.16.30.6] ([12.179.176.147]) by smtp.googlemail.com with ESMTPSA id a81sm1526396pfe.32.2017.10.24.11.19.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2017 11:19:19 -0700 (PDT) Subject: Re: svn commit: r324957 - head/sys/dev/iscsi To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201710241459.v9OExVSF003079@repo.freebsd.org> From: Andriy Gapon Message-ID: <79303709-fed8-210a-16e8-2209cce58dbc@FreeBSD.org> Date: Tue, 24 Oct 2017 21:19:15 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <201710241459.v9OExVSF003079@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 24 Oct 2017 18:19:21 -0000 On 24/10/2017 17:59, Andriy Gapon wrote: > Author: avg > Date: Tue Oct 24 14:59:31 2017 > New Revision: 324957 > URL: https://svnweb.freebsd.org/changeset/base/324957 > > Log: > iscsi_shutdown_post: do nothing if panic-ing By the way, this change raised a question if we even should post shutdown_pre_sync and shutdown_post_sync events if the sync itself is disabled via RB_NOSYNC. From the purely semantic point of view it feels that the answer should be no. But there could be some dependencies on those events being posted in all cases. On the other hand, it seems like at present almost every handler has to check for either RB_NOSYNC or panicstr. Opinions are welcome :-) > There is nothing that that routine should or could really do in that > context. > > Reported by: Ben RUBSON > MFC after: 1 week > > Modified: > head/sys/dev/iscsi/iscsi.c > > Modified: head/sys/dev/iscsi/iscsi.c > ============================================================================== > --- head/sys/dev/iscsi/iscsi.c Tue Oct 24 14:34:25 2017 (r324956) > +++ head/sys/dev/iscsi/iscsi.c Tue Oct 24 14:59:31 2017 (r324957) > @@ -2458,8 +2458,10 @@ static void > iscsi_shutdown_post(struct iscsi_softc *sc) > { > > - ISCSI_DEBUG("removing all sessions due to shutdown"); > - iscsi_terminate_sessions(sc); > + if (panicstr == NULL) { > + ISCSI_DEBUG("removing all sessions due to shutdown"); > + iscsi_terminate_sessions(sc); > + } > } > > static int > -- Andriy Gapon