svn commit: r274840 - head/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Sat Nov 22 04:40:25 UTC 2014
Author: mav
Date: Sat Nov 22 04:40:24 2014
New Revision: 274840
URL: https://svnweb.freebsd.org/changeset/base/274840
Log:
Make iSCSI frontend less chatty while waiting for tasks 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 Sat Nov 22 03:03:11 2014 (r274839)
+++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sat Nov 22 04:40:24 2014 (r274840)
@@ -1058,7 +1058,7 @@ cfiscsi_session_terminate_tasks(struct c
{
struct cfiscsi_data_wait *cdw;
union ctl_io *io;
- int error, last;
+ int error, last, wait;
if (cs->cs_target == NULL)
return; /* No target yet, so nothing to do. */
@@ -1103,16 +1103,20 @@ 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);
for (;;) {
refcount_acquire(&cs->cs_outstanding_ctl_pdus);
last = refcount_release(&cs->cs_outstanding_ctl_pdus);
if (last != 0)
break;
- CFISCSI_SESSION_WARN(cs, "waiting for CTL to terminate tasks, "
- "%d remaining", cs->cs_outstanding_ctl_pdus);
tsleep(__DEVOLATILE(void *, &cs->cs_outstanding_ctl_pdus),
0, "cfiscsi_terminate", hz / 100);
}
+ if (wait > 0)
+ CFISCSI_SESSION_WARN(cs, "tasks terminated");
}
static void
More information about the svn-src-all
mailing list