Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2017 21:19:15 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r324957 - head/sys/dev/iscsi
Message-ID:  <79303709-fed8-210a-16e8-2209cce58dbc@FreeBSD.org>
In-Reply-To: <201710241459.v9OExVSF003079@repo.freebsd.org>
References:  <201710241459.v9OExVSF003079@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <ben.rubson@gmail.com>
>   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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?79303709-fed8-210a-16e8-2209cce58dbc>