The functionality enabled by --enable-panic-dumplog was inadvertently
removed in Commit
ae0704381efc ("LU-9859 libcfs: merge linux-debug.c
into debug.c")
Restore it.
While we are there, add conditional-compliation for other code that is
only needed when this is enabled.
Test-Parameters: trivial
Fixes:
ae0704381efc ("LU-9859 libcfs: merge linux-debug.c into debug.c")
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: If85882045c66e54ff8493396589d4ecbf13f8f3d
Reviewed-on: https://review.whamcloud.com/41488
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs_panic_in_progress = 1;
mb();
+#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()) {
+ cfs_trace_debug_print();
+ } else {
+ libcfs_debug_dumplog_internal((void *)(long)current->pid);
+ }
+#endif
return 0;
}
}
}
+#ifdef LNET_DUMP_ON_PANIC
void cfs_trace_debug_print(void)
{
struct page_collection pc;
cfs_tage_free(tage);
}
}
+#endif /* LNET_DUMP_ON_PANIC */
int cfs_tracefile_dump_all_pages(char *filename)
{