svn commit: r265656 - stable/9/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Thu May 8 08:24:09 UTC 2014


Author: mav
Date: Thu May  8 08:24:08 2014
New Revision: 265656
URL: http://svnweb.freebsd.org/changeset/base/265656

Log:
  MFC r263979 (by trasz):
  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.

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

Modified: stable/9/sys/cam/ctl/ctl.c
==============================================================================
--- stable/9/sys/cam/ctl/ctl.c	Thu May  8 08:23:24 2014	(r265655)
+++ stable/9/sys/cam/ctl/ctl.c	Thu May  8 08:24:08 2014	(r265656)
@@ -324,6 +324,10 @@ SYSCTL_NODE(_kern_cam, OID_AUTO, ctl, CT
 SYSCTL_INT(_kern_cam_ctl, OID_AUTO, disable, CTLFLAG_RDTUN, &ctl_disable, 0,
 	   "Disable CTL");
 TUNABLE_INT("kern.cam.ctl.disable", &ctl_disable);
+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)
@@ -12264,7 +12268,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
@@ -12520,7 +12525,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)
@@ -12531,7 +12537,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-stable-9 mailing list