svn commit: r324957 - head/sys/dev/iscsi

Andriy Gapon avg at FreeBSD.org
Tue Oct 24 18:19:21 UTC 2017


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 at 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


More information about the svn-src-all mailing list