svn commit: r324382 - stable/11/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Sat Oct 7 09:47:33 UTC 2017


Author: mav
Date: Sat Oct  7 09:47:31 2017
New Revision: 324382
URL: https://svnweb.freebsd.org/changeset/base/324382

Log:
  MFC r324123: Add sysctl/tunable for maximal request time.

Modified:
  stable/11/sys/cam/ctl/ctl.c
  stable/11/sys/cam/ctl/ctl_io.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cam/ctl/ctl.c
==============================================================================
--- stable/11/sys/cam/ctl/ctl.c	Sat Oct  7 08:44:08 2017	(r324381)
+++ stable/11/sys/cam/ctl/ctl.c	Sat Oct  7 09:47:31 2017	(r324382)
@@ -40,8 +40,6 @@
  * Author: Ken Merry <ken at FreeBSD.org>
  */
 
-#define _CTL_C
-
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
@@ -410,6 +408,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, debug, CTLFLAG_RWT
 static int ctl_lun_map_size = 1024;
 SYSCTL_INT(_kern_cam_ctl, OID_AUTO, lun_map_size, CTLFLAG_RWTUN,
     &ctl_lun_map_size, 0, "Size of per-port LUN map (max LUN + 1)");
+#ifdef  CTL_TIME_IO
+static int ctl_time_io_secs = CTL_TIME_IO_DEFAULT_SECS;
+SYSCTL_INT(_kern_cam_ctl, OID_AUTO, time_io_secs, CTLFLAG_RWTUN,
+    &ctl_time_io_secs, 0, "Log requests taking more seconds");
+#endif
 
 /*
  * Supported pages (0x00), Serial number (0x80), Device ID (0x83),

Modified: stable/11/sys/cam/ctl/ctl_io.h
==============================================================================
--- stable/11/sys/cam/ctl/ctl_io.h	Sat Oct  7 08:44:08 2017	(r324381)
+++ stable/11/sys/cam/ctl/ctl_io.h	Sat Oct  7 09:47:31 2017	(r324382)
@@ -40,12 +40,6 @@
 #ifndef	_CTL_IO_H_
 #define	_CTL_IO_H_
 
-#ifdef _CTL_C
-#define EXTERN(__var,__val) __var = __val
-#else
-#define EXTERN(__var,__val) extern __var
-#endif
-
 #define	CTL_MAX_CDBLEN	32
 /*
  * Uncomment this next line to enable printing out times for I/Os
@@ -55,7 +49,6 @@
 #define	CTL_TIME_IO
 #ifdef  CTL_TIME_IO
 #define	CTL_TIME_IO_DEFAULT_SECS	90
-EXTERN(int ctl_time_io_secs, CTL_TIME_IO_DEFAULT_SECS);
 #endif
 
 /*


More information about the svn-src-stable mailing list