Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Nov 2014 00:59:52 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274940 - head/sys/cam/ctl
Message-ID:  <201411240059.sAO0xqiQ094316@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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