From owner-svn-src-head@freebsd.org Sat Dec 9 15:34:42 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 10F1BE8E91F; Sat, 9 Dec 2017 15:34:42 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D218269563; Sat, 9 Dec 2017 15:34:41 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB9FYeUi092585; Sat, 9 Dec 2017 15:34:40 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB9FYeDo092584; Sat, 9 Dec 2017 15:34:40 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201712091534.vB9FYeDo092584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 9 Dec 2017 15:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326730 - head/sys/dev/iscsi X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/dev/iscsi X-SVN-Commit-Revision: 326730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Sat, 09 Dec 2017 15:34:42 -0000 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); }