Whamcloud - gitweb
do panic dump logs with the notifier list
authorbraam <braam>
Sat, 22 Jun 2002 18:36:42 +0000 (18:36 +0000)
committerbraam <braam>
Sat, 22 Jun 2002 18:36:42 +0000 (18:36 +0000)
lustre/patches/patch-2.4.18
lustre/patches/patch-2.4.18-chaos1

index f2aca43..7b75328 100644 (file)
  extern void    journal_unlock_updates (journal_t *);
 --- lum-pristine/kernel/ksyms.c        Mon Feb 25 12:38:13 2002
 +++ lum/kernel/ksyms.c Fri Jun 14 16:47:50 2002
-@@ -271,6 +271,11 @@
+@@ -271,6 +271,12 @@
  EXPORT_SYMBOL(lock_may_write);
  EXPORT_SYMBOL(dcache_readdir);
  
 +/* lustre */
++EXPORT_SYMBOL(panic_notifier_list);
 +EXPORT_SYMBOL(pagecache_lock);
 +EXPORT_SYMBOL(do_kern_mount);
 +EXPORT_SYMBOL(kmem_cache_validate);
                path_release(&nd);
        }
        return error;
-@@ -363,6 +379,10 @@
- {
-       struct file * f;
-       int err = -EBADF;
-+      struct lookup_intent it;
-+
-+      memset(&it, 0, sizeof(it));
-+      it.it_op = IT_GETATTR;
-       f = fget(fd);
-       if (f) {
---- linux-2.4.18-chaos2-pristine/kernel/panic.c        Fri Jun 14 09:33:02 2002
-+++ linux-2.4.18-chaos2/kernel/panic.c Fri Jun 21 16:49:27 2002
-@@ -9,6 +9,7 @@
-  * to indicate a major problem.
-  */
- #include <linux/config.h>
-+#include <linux/module.h>
- #include <linux/sched.h>
- #include <linux/delay.h>
- #include <linux/reboot.h>
-@@ -24,9 +25,23 @@
- asmlinkage void sys_sync(void);       /* it's really int */
- int panic_timeout;
--
-+static void (*dumplustre)(void);
- struct notifier_block *panic_notifier_list;
-+static void register_dumplog(void)
-+{
-+      dumplustre = inter_module_get_request("portals_debug_dumplog", "portals");
-+}
-+
-+static void unregister_dumplog(void)
-+{
-+  if(dumplustre)
-+      inter_module_put("portals_debug_dumplog");
-+}
-+
-+EXPORT_SYMBOL(register_dumplog);
-+EXPORT_SYMBOL(unregister_dumplog);
-+
- static int __init panic_setup(char *str)
- {
-       panic_timeout = simple_strtoul(str, NULL, 0);
-@@ -49,10 +64,17 @@
- {
-       static char buf[1024];
-       va_list args;
-+
- #if defined(CONFIG_ARCH_S390)
-         unsigned long caller = (unsigned long) __builtin_return_address(0);
- #endif
-+      if(dumplustre) { 
-+              void (*dodump)(void) = dumplustre;
-+              dumplustre = NULL;
-+              dodump();
-+      }
-+
- #ifdef CONFIG_MCL_COREDUMP
-       crash_save_regs();
- #endif
-@@ -63,6 +85,7 @@
-       va_end(args);
-       printk(KERN_EMERG "Kernel panic: %s\n",buf);
-+
- #ifdef CONFIG_MCL_COREDUMP
-       if (!panicmsg) {
-               panicmsg = buf;
---- linux-2.4.18-chaos2-pristine/kernel/Makefile       Fri Jun 14 09:33:02 2002
-+++ linux-2.4.18-chaos2/kernel/Makefile        Fri Jun 21 15:04:01 2002
-@@ -9,7 +9,7 @@
- O_TARGET := kernel.o
--export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o \
-+export-objs = panic.o signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o \
-             syscall_ksyms.o
- obj-y     = sched.o dma.o fork.o exec_domain.o panic.o printk.o \
index e405c75..7b9cea0 100644 (file)
  extern void    journal_unlock_updates (journal_t *);
 --- kernel-rh-2.4.18-pristine/kernel/ksyms.c   Thu Jun 13 12:27:15 2002
 +++ kernel-rh-2.4.18/kernel/ksyms.c    Thu Jun 20 11:24:56 2002
-@@ -305,6 +305,12 @@
+@@ -305,6 +305,13 @@
  EXPORT_SYMBOL(lock_may_write);
  EXPORT_SYMBOL(dcache_readdir);
  
 +/* lustre */
++EXPORT_SYMBOL(panic_notifier_list);
 +EXPORT_SYMBOL(pagecache_lock);
 +EXPORT_SYMBOL(kmem_cache_validate);
 +EXPORT_SYMBOL(do_kern_mount);
                path_release(&nd);
        }
        return error;
-@@ -269,20 +273,23 @@
- {
-       struct nameidata nd;
-       int error;
-+      struct lookup_intent it;
-+      it.it_op = IT_READLINK;
-       if (bufsiz <= 0)
-               return -EINVAL;
--      error = user_path_walk_link(path, &nd);
-+      error = user_path_walk_link_it(path, &nd, &it);
-       if (!error) {
-               struct inode * inode = nd.dentry->d_inode;
--
-+              nd.dentry->d_it = &it;
-               error = -EINVAL;
-               if (inode->i_op && inode->i_op->readlink &&
-                   !(error = do_revalidate(nd.dentry))) {
-                       UPDATE_ATIME(inode);
-                       error = inode->i_op->readlink(nd.dentry, buf, bufsiz);
-               }
-+              intent_release(nd.dentry);
-               path_release(&nd);
-       }
-       return error;
---- linux-2.4.18-chaos2-pristine/kernel/panic.c        Fri Jun 14 09:33:02 2002
-+++ linux-2.4.18-chaos2/kernel/panic.c Fri Jun 21 16:49:27 2002
-@@ -9,6 +9,7 @@
-  * to indicate a major problem.
-  */
- #include <linux/config.h>
-+#include <linux/module.h>
- #include <linux/sched.h>
- #include <linux/delay.h>
- #include <linux/reboot.h>
-@@ -24,9 +25,23 @@
- asmlinkage void sys_sync(void);       /* it's really int */
- int panic_timeout;
--
-+static void (*dumplustre)(void);
- struct notifier_block *panic_notifier_list;
-+static void register_dumplog(void)
-+{
-+      dumplustre = inter_module_get_request("portals_debug_dumplog", "portals");
-+}
-+
-+static void unregister_dumplog(void)
-+{
-+  if(dumplustre)
-+      inter_module_put("portals_debug_dumplog");
-+}
-+
-+EXPORT_SYMBOL(register_dumplog);
-+EXPORT_SYMBOL(unregister_dumplog);
-+
- static int __init panic_setup(char *str)
- {
-       panic_timeout = simple_strtoul(str, NULL, 0);
-@@ -49,10 +64,17 @@
- {
-       static char buf[1024];
-       va_list args;
-+
- #if defined(CONFIG_ARCH_S390)
-         unsigned long caller = (unsigned long) __builtin_return_address(0);
- #endif
-+      if(dumplustre) { 
-+              void (*dodump)(void) = dumplustre;
-+              dumplustre = NULL;
-+              dodump();
-+      }
-+
- #ifdef CONFIG_MCL_COREDUMP
-       crash_save_regs();
- #endif
-@@ -63,6 +85,7 @@
-       va_end(args);
-       printk(KERN_EMERG "Kernel panic: %s\n",buf);
-+
- #ifdef CONFIG_MCL_COREDUMP
-       if (!panicmsg) {
-               panicmsg = buf;
---- linux-2.4.18-chaos2-pristine/kernel/Makefile       Fri Jun 14 09:33:02 2002
-+++ linux-2.4.18-chaos2/kernel/Makefile        Fri Jun 21 15:04:01 2002
-@@ -9,7 +9,7 @@
- O_TARGET := kernel.o
--export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o \
-+export-objs = panic.o signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o \
-             syscall_ksyms.o
- obj-y     = sched.o dma.o fork.o exec_domain.o panic.o printk.o \