From owner-svn-src-stable@FreeBSD.ORG Wed May 7 06:13:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5A82820; Wed, 7 May 2014 06:13:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 785C289C; Wed, 7 May 2014 06:13:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s476D0Uu082437; Wed, 7 May 2014 06:13:00 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s476D0CJ082435; Wed, 7 May 2014 06:13:00 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201405070613.s476D0CJ082435@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 7 May 2014 06:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265488 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 06:13:00 -0000 Author: trasz Date: Wed May 7 06:12:59 2014 New Revision: 265488 URL: http://svnweb.freebsd.org/changeset/base/265488 Log: MFC r263743: Move the ic_outstanding_count under #ifdef DIAGNOSTIC. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Wed May 7 06:10:55 2014 (r265487) +++ stable/10/sys/dev/iscsi/icl.c Wed May 7 06:12:59 2014 (r265488) @@ -135,11 +135,15 @@ icl_pdu_new(struct icl_conn *ic, int fla { struct icl_pdu *ip; +#ifdef DIAGNOSTIC refcount_acquire(&ic->ic_outstanding_pdus); +#endif ip = uma_zalloc(icl_pdu_zone, flags | M_ZERO); if (ip == NULL) { ICL_WARN("failed to allocate %zd bytes", sizeof(*ip)); +#ifdef DIAGNOSTIC refcount_release(&ic->ic_outstanding_pdus); +#endif return (NULL); } @@ -159,7 +163,9 @@ icl_pdu_free(struct icl_pdu *ip) m_freem(ip->ip_ahs_mbuf); m_freem(ip->ip_data_mbuf); uma_zfree(icl_pdu_zone, ip); +#ifdef DIAGNOSTIC refcount_release(&ic->ic_outstanding_pdus); +#endif } /* @@ -977,7 +983,9 @@ icl_conn_new(void) mtx_init(&ic->ic_lock, "icl_lock", NULL, MTX_DEF); cv_init(&ic->ic_send_cv, "icl_tx"); cv_init(&ic->ic_receive_cv, "icl_rx"); +#ifdef DIAGNOSTIC refcount_init(&ic->ic_outstanding_pdus, 0); +#endif ic->ic_max_data_segment_length = ICL_MAX_DATA_SEGMENT_LENGTH; return (ic); Modified: stable/10/sys/dev/iscsi/icl.h ============================================================================== --- stable/10/sys/dev/iscsi/icl.h Wed May 7 06:10:55 2014 (r265487) +++ stable/10/sys/dev/iscsi/icl.h Wed May 7 06:12:59 2014 (r265488) @@ -76,7 +76,9 @@ void icl_pdu_free(struct icl_pdu *ip); struct icl_conn { struct mtx ic_lock; struct socket *ic_socket; +#ifdef DIAGNOSTIC volatile u_int ic_outstanding_pdus; +#endif TAILQ_HEAD(, icl_pdu) ic_to_send; size_t ic_receive_len; int ic_receive_state;