From: Robert Read Date: Thu, 18 Mar 2010 20:06:54 +0000 (-0700) Subject: b=11680 Add /proc/sys/lnet/force_lbug X-Git-Tag: 1.10.0.39~46 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=433b459f8bef83fbf84b4daf9a28653efeed903d;p=fs%2Flustre-release.git b=11680 Add /proc/sys/lnet/force_lbug This patch adds a proc entry called force_lbug. a=Christopher J. Morrone i=johann --- diff --git a/libcfs/libcfs/linux/linux-proc.c b/libcfs/libcfs/linux/linux-proc.c index 553e8f2..a36cf1d 100644 --- a/libcfs/libcfs/linux/linux-proc.c +++ b/libcfs/libcfs/linux/linux-proc.c @@ -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 @@ -331,6 +332,13 @@ int LL_PROC_PROTO(proc_console_backoff) return rc; } +int LL_PROC_PROTO(libcfs_force_lbug) +{ + if (write) + LBUG(); + return 0; +} + static cfs_sysctl_table_t lnet_table[] = { /* * NB No .strategy entries have been provided since sysctl(8) prefers @@ -472,6 +480,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} };