From owner-svn-src-all@FreeBSD.ORG Mon Nov 24 00:59:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61DCC8AE; Mon, 24 Nov 2014 00:59:52 +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 4EDECE51; Mon, 24 Nov 2014 00:59:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAO0xqRm094317; Mon, 24 Nov 2014 00:59:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAO0xqiQ094316; Mon, 24 Nov 2014 00:59:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201411240059.sAO0xqiQ094316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 24 Nov 2014 00:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274940 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2014 00:59:52 -0000 Author: mav Date: Mon Nov 24 00:59:51 2014 New Revision: 274940 URL: https://svnweb.freebsd.org/changeset/base/274940 Log: Read cs_outstanding_ctl_pdus before incrementing it for NEXUS RESET task. This removes extra log noise on idle connection termination. MFC after: 1 week Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Nov 24 00:47:04 2014 (r274939) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Mon Nov 24 00:59:51 2014 (r274940) @@ -1076,6 +1076,7 @@ cfiscsi_session_terminate_tasks(struct c io->io_hdr.nexus.targ_lun = 0; io->taskio.tag_type = CTL_TAG_SIMPLE; /* XXX */ io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; + wait = cs->cs_outstanding_ctl_pdus; refcount_acquire(&cs->cs_outstanding_ctl_pdus); error = ctl_queue(io); if (error != CTL_RETVAL_COMPLETE) { @@ -1103,7 +1104,6 @@ cfiscsi_session_terminate_tasks(struct c /* * Wait for CTL to terminate all the tasks. */ - wait = cs->cs_outstanding_ctl_pdus; if (wait > 0) CFISCSI_SESSION_WARN(cs, "waiting for CTL to terminate %d tasks", wait);