Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Dec 2017 15:34:40 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326730 - head/sys/dev/iscsi
Message-ID:  <201712091534.vB9FYeDo092584@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sat Dec  9 15:34:40 2017
New Revision: 326730
URL: https://svnweb.freebsd.org/changeset/base/326730

Log:
  Move the DIAGNOSTIC check for lost iSCSI PDUs from icl_conn_close()
  to icl_conn_free().  It's perfectly valid for the counter to be non-zero
  in the former.
  
  MFC after:	2 weeks
  Sponsored by:	playkey.net

Modified:
  head/sys/dev/iscsi/icl_soft.c

Modified: head/sys/dev/iscsi/icl_soft.c
==============================================================================
--- head/sys/dev/iscsi/icl_soft.c	Sat Dec  9 08:21:29 2017	(r326729)
+++ head/sys/dev/iscsi/icl_soft.c	Sat Dec  9 15:34:40 2017	(r326730)
@@ -1170,6 +1170,11 @@ void
 icl_soft_conn_free(struct icl_conn *ic)
 {
 
+#ifdef DIAGNOSTIC
+	KASSERT(ic->ic_outstanding_pdus == 0,
+	    ("destroying session with %d outstanding PDUs",
+	     ic->ic_outstanding_pdus));
+#endif
 	cv_destroy(&ic->ic_send_cv);
 	cv_destroy(&ic->ic_receive_cv);
 	kobj_delete((struct kobj *)ic, M_ICL_SOFT);
@@ -1410,11 +1415,6 @@ icl_soft_conn_close(struct icl_conn *ic)
 
 	KASSERT(STAILQ_EMPTY(&ic->ic_to_send),
 	    ("destroying session with non-empty send queue"));
-#ifdef DIAGNOSTIC
-	KASSERT(ic->ic_outstanding_pdus == 0,
-	    ("destroying session with %d outstanding PDUs",
-	     ic->ic_outstanding_pdus));
-#endif
 	ICL_CONN_UNLOCK(ic);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712091534.vB9FYeDo092584>