Author: mav
Date: Sat Sep 30 13:17:31 2017
New Revision: 324123
URL: https://svnweb.freebsd.org/changeset/base/324123

Log:
  Add sysctl/tunable for maximal request time.
  
  MFC after:    1 week

Modified:
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_io.h

Modified: head/sys/cam/ctl/ctl.c
==============================================================================
--- head/sys/cam/ctl/ctl.c      Sat Sep 30 12:30:05 2017        (r324122)
+++ head/sys/cam/ctl/ctl.c      Sat Sep 30 13:17:31 2017        (r324123)
@@ -40,8 +40,6 @@
  * Author: Ken Merry <k...@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: head/sys/cam/ctl/ctl_io.h
==============================================================================
--- head/sys/cam/ctl/ctl_io.h   Sat Sep 30 12:30:05 2017        (r324122)
+++ head/sys/cam/ctl/ctl_io.h   Sat Sep 30 13:17:31 2017        (r324123)
@@ -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
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to