Skip to content
Snippets Groups Projects
Commit bca20ddd authored by Bobi Jam's avatar Bobi Jam
Browse files

Branch HEAD

b=11680
i=wangdi
i=shadow

Description: make panic on lbug configurable
parent 4bc3c774
No related merge requests found
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
ptllnd - Portals 3.3 / UNICOS/lc 1.5.x, 2.0.x ptllnd - Portals 3.3 / UNICOS/lc 1.5.x, 2.0.x
* bug fixes * bug fixes
Severity : normal
Bugzilla : 11680
Description: make panic on lbug configurable
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
2007-04-01 Cluster File Systems, Inc. <info@clusterfs.com> 2007-04-01 Cluster File Systems, Inc. <info@clusterfs.com>
......
...@@ -76,6 +76,7 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys); ...@@ -76,6 +76,7 @@ int libcfs_debug_str2mask(int *mask, const char *str, int is_subsys);
/* Has there been an LBUG? */ /* Has there been an LBUG? */
extern unsigned int libcfs_catastrophe; extern unsigned int libcfs_catastrophe;
extern unsigned int libcfs_panic_on_lbug;
/* /*
* struct ptldebug_header is defined in libcfs/<os>/libcfs.h * struct ptldebug_header is defined in libcfs/<os>/libcfs.h
......
...@@ -59,6 +59,9 @@ EXPORT_SYMBOL(portal_enter_debugger); ...@@ -59,6 +59,9 @@ EXPORT_SYMBOL(portal_enter_debugger);
unsigned int libcfs_catastrophe; unsigned int libcfs_catastrophe;
EXPORT_SYMBOL(libcfs_catastrophe); EXPORT_SYMBOL(libcfs_catastrophe);
unsigned int libcfs_panic_on_lbug = 0;
EXPORT_SYMBOL(libcfs_panic_on_lbug);
atomic_t libcfs_kmemory = ATOMIC_INIT(0); atomic_t libcfs_kmemory = ATOMIC_INIT(0);
EXPORT_SYMBOL(libcfs_kmemory); EXPORT_SYMBOL(libcfs_kmemory);
......
...@@ -142,6 +142,8 @@ void lbug_with_loc(char *file, const char *func, const int line) ...@@ -142,6 +142,8 @@ void lbug_with_loc(char *file, const char *func, const int line)
libcfs_debug_dumpstack(NULL); libcfs_debug_dumpstack(NULL);
libcfs_debug_dumplog(); libcfs_debug_dumplog();
libcfs_run_lbug_upcall(file, func, line); libcfs_run_lbug_upcall(file, func, line);
if (libcfs_panic_on_lbug)
panic("LBUG");
set_task_state(current, TASK_UNINTERRUPTIBLE); set_task_state(current, TASK_UNINTERRUPTIBLE);
while (1) while (1)
schedule(); schedule();
......
...@@ -73,6 +73,7 @@ enum { ...@@ -73,6 +73,7 @@ enum {
PSDEV_LNET_UPCALL, /* User mode upcall script */ PSDEV_LNET_UPCALL, /* User mode upcall script */
PSDEV_LNET_MEMUSED, /* bytes currently PORTAL_ALLOCated */ PSDEV_LNET_MEMUSED, /* bytes currently PORTAL_ALLOCated */
PSDEV_LNET_CATASTROPHE, /* if we have LBUGged or panic'd */ PSDEV_LNET_CATASTROPHE, /* if we have LBUGged or panic'd */
PSDEV_LNET_PANIC_ON_LBUG, /* flag to panic on LBUG */
}; };
int LL_PROC_PROTO(proc_dobitmasks); int LL_PROC_PROTO(proc_dobitmasks);
...@@ -146,6 +147,14 @@ static struct ctl_table lnet_table[] = { ...@@ -146,6 +147,14 @@ static struct ctl_table lnet_table[] = {
.mode = 0444, .mode = 0444,
.proc_handler = &proc_dointvec .proc_handler = &proc_dointvec
}, },
{
.ctl_name = PSDEV_LNET_PANIC_ON_LBUG,
.procname = "panic_on_lbug",
.data = &libcfs_panic_on_lbug,
.maxlen = sizeof(int),
.mode = 0444,
.proc_handler = &proc_dointvec
},
{0} {0}
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment