From a8b4b37eb87ab756b6b9669b776dfc2864b0b053 Mon Sep 17 00:00:00 2001 From: wangdi Date: Mon, 21 Jul 2003 13:46:36 +0000 Subject: [PATCH] add some features for crash --- .../kernel_patches/patches/lkcd-cvs-2.5.69.patch | 102 +++++++++++++-------- 1 file changed, 63 insertions(+), 39 deletions(-) diff --git a/lustre/kernel_patches/patches/lkcd-cvs-2.5.69.patch b/lustre/kernel_patches/patches/lkcd-cvs-2.5.69.patch index ee94909..ec5e66d 100644 --- a/lustre/kernel_patches/patches/lkcd-cvs-2.5.69.patch +++ b/lustre/kernel_patches/patches/lkcd-cvs-2.5.69.patch @@ -1,5 +1,10 @@ ---- linux-2.5.69/drivers/dump/Makefile.lkcdbase Mon Jun 2 17:29:39 2003 -+++ linux-2.5.69/drivers/dump/Makefile Fri Apr 25 00:24:15 2003 + + + + 0 files changed + +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/Makefile 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,14 @@ +# +# Makefile for the dump device drivers. @@ -15,8 +20,8 @@ +obj-$(CONFIG_CRASH_DUMP_NETDEV) += dump_netdev.o +obj-$(CONFIG_CRASH_DUMP_COMPRESS_RLE) += dump_rle.o +obj-$(CONFIG_CRASH_DUMP_COMPRESS_GZIP) += dump_gzip.o ---- linux-2.5.69/drivers/dump/dump_blockdev.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_blockdev.c Sun May 18 22:30:52 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_blockdev.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,461 @@ +/* + * Implements the dump driver interface for saving a dump to @@ -479,8 +484,8 @@ + +module_init(dump_blockdev_init); +module_exit(dump_blockdev_cleanup); ---- linux-2.5.69/drivers/dump/dump_execute.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_execute.c Fri Feb 7 06:47:58 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_execute.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,126 @@ +/* + * The file has the common/generic dump execution code @@ -608,8 +613,8 @@ + + return ret; +} ---- linux-2.5.69/drivers/dump/dump_filters.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_filters.c Mon Feb 3 05:06:28 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_filters.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,143 @@ +/* + * Default filters to select data to dump for various passes. @@ -754,9 +759,9 @@ + { .name = "", .selector = NULL, .level_mask = 0} +}; + ---- linux-2.5.69/drivers/dump/dump_fmt.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_fmt.c Fri Feb 7 06:47:58 2003 -@@ -0,0 +1,395 @@ +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_fmt.c 2003-07-21 19:30:19.000000000 +0800 +@@ -0,0 +1,399 @@ +/* + * Implements the routines which handle the format specific + * aspects of dump for the default dump format. @@ -852,6 +857,8 @@ +static int lcrash_init_dump_header(const char *panic_str) +{ + struct timeval dh_time; ++ struct sysinfo info; ++ + /* make sure the dump header isn't TOO big */ + if ((sizeof(struct __dump_header) + + sizeof(struct __dump_header_asm)) > DUMP_BUFFER_SIZE) { @@ -870,6 +877,8 @@ + dump_header.dh_memory_start = PAGE_OFFSET; + dump_header.dh_memory_end = DUMP_MAGIC_NUMBER; + dump_header.dh_header_size = sizeof(struct __dump_header); ++ si_meminfo(&info); ++ dump_header.dh_memory_size = (u64)info.totalram; + dump_header.dh_page_size = PAGE_SIZE; + dump_header.dh_dump_level = dump_config.level; + dump_header.dh_current_task = (unsigned long) current; @@ -1152,8 +1161,8 @@ + .ops = &dump_fmt_lcrash_ops +}; + ---- linux-2.5.69/drivers/dump/dump_gzip.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_gzip.c Fri Dec 13 00:51:31 2002 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_gzip.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,118 @@ +/* + * GZIP Compression functions for kernel crash dumps. @@ -1273,8 +1282,8 @@ +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("LKCD Development Team "); +MODULE_DESCRIPTION("Gzip compression module for crash dump driver"); ---- linux-2.5.69/drivers/dump/dump_i386.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_i386.c Wed Mar 5 02:49:22 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_i386.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,329 @@ +/* + * Architecture specific (i386) functions for Linux crash dumps. @@ -1605,8 +1614,8 @@ + return pfn_is_ram(index); +} + ---- linux-2.5.69/drivers/dump/dump_memdev.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_memdev.c Tue Mar 25 21:34:35 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_memdev.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,640 @@ +/* + * Implements the dump driver interface for saving a dump in available @@ -2248,8 +2257,8 @@ +/* may be overwritten if a previous dump exists */ +struct dump_memdev *dump_memdev = &default_dump_memdev; + ---- linux-2.5.69/drivers/dump/dump_netdev.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_netdev.c Tue May 20 03:04:07 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_netdev.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,863 @@ +/* + * Implements the dump driver interface for saving a dump via network @@ -3114,8 +3123,8 @@ + +module_init(dump_netdev_init); +module_exit(dump_netdev_cleanup); ---- linux-2.5.69/drivers/dump/dump_overlay.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_overlay.c Fri Feb 7 06:47:58 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_overlay.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,848 @@ +/* + * Two-stage soft-boot based dump scheme methods (memory overlay @@ -3965,8 +3974,8 @@ + .dev = NULL, +}; + ---- linux-2.5.69/drivers/dump/dump_rle.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_rle.c Fri Dec 13 00:51:31 2002 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_rle.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,175 @@ +/* + * RLE Compression functions for kernel crash dumps. @@ -4143,8 +4152,8 @@ +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("LKCD Development Team "); +MODULE_DESCRIPTION("RLE compression module for crash dump driver"); ---- linux-2.5.69/drivers/dump/dump_scheme.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_scheme.c Fri Apr 25 00:24:15 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_scheme.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,357 @@ +/* + * Default single stage dump scheme methods @@ -4503,8 +4512,8 @@ + .dev = NULL, +}; + ---- linux-2.5.69/drivers/dump/dump_setup.c.lkcdbase Mon Jun 2 17:29:49 2003 -+++ linux-2.5.69/drivers/dump/dump_setup.c Tue Apr 29 03:37:19 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_setup.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,803 @@ +/* + * Standard kernel function entry points for Linux crash dumps. @@ -5309,8 +5318,8 @@ + +module_init(dump_init); +module_exit(dump_cleanup); ---- linux-2.5.69/include/linux/dumpdev.h.lkcdbase Mon Jun 2 17:28:52 2003 -+++ linux-2.5.69/include/linux/dumpdev.h Mon Jun 2 17:31:01 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/include/linux/dumpdev.h 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,161 @@ +/* + * Generic dump device interfaces for flexible system dump @@ -5473,8 +5482,8 @@ +extern void dump_unregister_device(struct dump_dev *); + +#endif /* _LINUX_DUMPDEV_H */ ---- linux-2.5.69/include/linux/dump.h.lkcdbase Mon Jun 2 17:28:56 2003 -+++ linux-2.5.69/include/linux/dump.h Mon Jun 2 17:31:01 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/include/linux/dump.h 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,376 @@ +/* + * Kernel header file for Linux crash dumps. @@ -5852,8 +5861,8 @@ +#endif /* !CONFIG_CRASH_DUMP */ + +#endif /* _DUMP_H */ ---- linux-2.5.69/include/linux/dump_netdev.h.lkcdbase Mon Jun 2 17:29:01 2003 -+++ linux-2.5.69/include/linux/dump_netdev.h Mon Jun 2 17:31:01 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/include/linux/dump_netdev.h 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,80 @@ +/* + * linux/drivers/net/netconsole.h @@ -5935,8 +5944,8 @@ +#define HEADER_LEN (1 + sizeof(reply_t)) + + ---- linux-2.5.69/include/asm-i386/dump.h.lkcdbase Mon Jun 2 17:28:47 2003 -+++ linux-2.5.69/include/asm-i386/dump.h Mon Jun 2 17:31:10 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/include/asm-i386/dump.h 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,93 @@ +/* + * Kernel header file for Linux crash dumps. @@ -6031,8 +6040,8 @@ +#endif /* __KERNEL__ */ + +#endif /* _ASM_DUMP_H */ ---- linux-2.5.69/init/kerntypes.c.lkcdbase Mon Jun 2 17:29:10 2003 -+++ linux-2.5.69/init/kerntypes.c Mon Jun 2 17:29:06 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/init/kerntypes.c 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,31 @@ +/* + * kerntypes.c @@ -6065,8 +6074,8 @@ +kerntypes_dummy(void) +{ +} ---- linux-2.5.69/drivers/dump/dump_methods.h.lkcdbase Mon Jun 2 17:56:12 2003 -+++ linux-2.5.69/drivers/dump/dump_methods.h Mon Jun 2 17:55:51 2003 +--- /dev/null 2002-08-31 07:31:37.000000000 +0800 ++++ linux-2.5.73-root/drivers/dump/dump_methods.h 2003-07-21 19:28:20.000000000 +0800 @@ -0,0 +1,348 @@ +/* + * Generic interfaces for flexible system dump @@ -6416,3 +6425,18 @@ + + +#endif /* _LINUX_DUMP_METHODS_H */ +--- linux-2.5.73/Makefile~lkcd-cvs-2.5.69 2003-07-21 19:26:46.000000000 +0800 ++++ linux-2.5.73-root/Makefile 2003-07-21 19:28:20.000000000 +0800 +@@ -228,6 +228,10 @@ export AFLAGS AFLAGS_KERNEL AFLAGS_MODUL + + export MODVERDIR := .tmp_versions + ++ifeq ($(CONFIG_CRASH_DUMP),y) ++ CFLAGS += -g ++endif ++ + # The temporary file to save gcc -MD generated dependencies must not + # contain a comma + comma := , + +_ -- 1.8.3.1