svn commit: r265493 - stable/10/sys/cam/ctl

Edward Tomasz Napierala trasz at FreeBSD.org
Wed May 7 06:24:47 UTC 2014


Author: trasz
Date: Wed May  7 06:24:46 2014
New Revision: 265493
URL: http://svnweb.freebsd.org/changeset/base/265493

Log:
  MFC r263979:
  
  Hide CTL messages about SCSI error responses.  Too many users take
  them for actual target errors.  They can be enabled back by setting
  kern.cam.ctl.verbose=1, or booting with bootverbose.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/cam/ctl/ctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl.c	Wed May  7 06:22:51 2014	(r265492)
+++ stable/10/sys/cam/ctl/ctl.c	Wed May  7 06:24:46 2014	(r265493)
@@ -325,6 +325,10 @@ static int worker_threads = 1;
 TUNABLE_INT("kern.cam.ctl.worker_threads", &worker_threads);
 SYSCTL_INT(_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN,
     &worker_threads, 1, "Number of worker threads");
+static int verbose = 0;
+TUNABLE_INT("kern.cam.ctl.verbose", &verbose);
+SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verbose, CTLFLAG_RWTUN,
+    &verbose, 0, "Show SCSI errors returned to initiator");
 
 /*
  * Serial number (0x80), device id (0x83), and supported pages (0x00)
@@ -12351,7 +12355,8 @@ ctl_process_done(union ctl_io *io, int h
 	case CTL_IO_SCSI:
 		break;
 	case CTL_IO_TASK:
-		ctl_io_error_print(io, NULL);
+		if (bootverbose || verbose > 0)
+			ctl_io_error_print(io, NULL);
 		if (io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC)
 			ctl_free_io(io);
 		else
@@ -12607,7 +12612,8 @@ ctl_process_done(union ctl_io *io, int h
 					    "skipped", skipped_prints);
 #endif
 				}
-				ctl_io_error_print(io, NULL);
+				if (bootverbose || verbose > 0)
+					ctl_io_error_print(io, NULL);
 			}
 		} else {
 			if (have_lock == 0)
@@ -12618,7 +12624,8 @@ ctl_process_done(union ctl_io *io, int h
 	case CTL_IO_TASK:
 		if (have_lock == 0)
 			mtx_unlock(&ctl_softc->ctl_lock);
-		ctl_io_error_print(io, NULL);
+		if (bootverbose || verbose > 0)
+			ctl_io_error_print(io, NULL);
 		break;
 	default:
 		if (have_lock == 0)


More information about the svn-src-all mailing list