Whamcloud - gitweb
b=11680 Add /proc/sys/lnet/force_lbug
authorChristopher J. Morrone <morrone@llnl.gov>
Fri, 15 Jan 2010 00:27:17 +0000 (01:27 +0100)
committerJohann Lombardi <johann@sun.com>
Fri, 15 Jan 2010 00:27:17 +0000 (01:27 +0100)
This patch adds a proc entry called force_lbug.

lnet/libcfs/linux/linux-proc.c

index a968a6d..2df0510 100644 (file)
@@ -104,6 +104,7 @@ enum {
         PSDEV_LNET_DEBUG_MB,      /* size of debug buffer */
         PSDEV_LNET_DEBUG_LOG_UPCALL, /* debug log upcall script */
         PSDEV_LNET_WATCHDOG_RATELIMIT,  /* ratelimit watchdog messages  */
+        PSDEV_LNET_FORCE_LBUG,    /* hook to force an LBUG */
 };
 #else
 #define CTL_LNET                        CTL_UNNUMBERED
@@ -330,6 +331,13 @@ int LL_PROC_PROTO(proc_console_backoff)
         return rc;
 }
 
+int LL_PROC_PROTO(libcfs_force_lbug)
+{
+
+        LBUG();
+
+}
+
 static cfs_sysctl_table_t lnet_table[] = {
         /*
          * NB No .strategy entries have been provided since sysctl(8) prefers
@@ -469,6 +477,13 @@ static cfs_sysctl_table_t lnet_table[] = {
                 .extra1   = &min_watchdog_ratelimit,
                 .extra2   = &max_watchdog_ratelimit,
         },
+        {       .ctl_name = PSDEV_LNET_FORCE_LBUG,
+                .procname = "force_lbug",
+                .data     = NULL,
+                .maxlen   = 0,
+                .mode     = 0200,
+                .proc_handler = &libcfs_force_lbug
+        },
         {0}
 };