adilger@clusterfs.com
2007-Jan-18 03:07 UTC
[Lustre-devel] [Bug 10982] LASSERT in an interrupt handler doesn''t work
Please don''t reply to lustre-devel. Instead, comment in Bugzilla by using the following link: https://bugzilla.lustre.org/show_bug.cgi?id=10982 (From update of attachment 8932)>+# LN_CONFIG_PANIC_DUMPLOG >+# >+# check if tunable panic_dumplog is wanted >+# >+AC_DEFUN([LN_CONFIG_PANIC_DUMPLOG], >+[AC_MSG_CHECKING([for tunable panic_dumplog support]) >+AC_ARG_ENABLE([panic_dumplog], >+ AC_HELP_STRING([--enable-panic_dumplog], >+ [enable panic_dumplog]), >+ [],[enable_panic_dumplog=''no'']) >+if test x$enable_panic_dumplog = xyes ; then >+ AC_DEFINE(LNET_DUMP_ON_PANIC, 1, [use dumplog on panic]) >+ AC_MSG_RESULT([yes (by request)]) >+else >+ AC_MSG_RESULT([no]) >+fi >+]) >+ >+# >+static int panic_notifier(struct notifier_block *self, unsigned long unused1, >+ void *unused2) >+{ >+#ifdef LNET_DUMP_ON_PANIC >+ /* This is currently disabled because it spews far too much to the >+ * console on the rare cases it is ever triggered. */ >+ >+ if (in_interrupt()) { >+ trace_debug_print(); >+ } else { >+ while (current->lock_depth >= 0) >+ unlock_kernel(); >+ >+ libcfs_debug_dumplog_internal((void *)(long)cfs_curproc_pid()); >+ } >+#endifUnfortunately, the work to make this a configurable option is mostly wasted effort. The comment is correct that this option spews too much to the console to be useful. What is missing is that because the log format is now binary in the kernel it is also completely useless. I would instead recommend just removing all of the panic notifier code and the surrounding complexity, along with the added breakage in darwin and winnt because of the lack of its implementation.