Whamcloud - gitweb
Merge from b_devel -> b_orphan
authoradilger <adilger>
Wed, 4 Jun 2003 21:34:50 +0000 (21:34 +0000)
committeradilger <adilger>
Wed, 4 Jun 2003 21:34:50 +0000 (21:34 +0000)
  DEVEL_ORPHAN_UPDATE_PARENT_20030528 -> DEVEL_ORPHAN_UPDATE_PARENT_20030604

This is a non-functional commit, with osc/osc_request.c not compiling because
it is missing the "llog_commit_master" data struct, and does not have any
commit threads started yet.  I'm beginning to think the right thing to do
here is to create a single global llog_commit_master struct for the OSC, and
start a single thread at module setup time, and clean it all up at module
unload time, but I could be convinced otherwise.

27 files changed:
lnet/Makefile.am
lnet/doc/ieee.bst
lnet/doc/portals3.lyx
lnet/include/linux/kp30.h
lnet/include/lnet/defines.h
lnet/include/lnet/internal.h
lnet/include/lnet/lib-lnet.h
lnet/include/lnet/lib-p30.h
lnet/include/lnet/myrnal.h
lnet/include/lnet/nal.h
lnet/include/lnet/ppid.h
lnet/include/lnet/stringtab.h
lnet/libcfs/debug.c
lnet/libcfs/module.c
lustre/portals/Makefile.am
lustre/portals/doc/ieee.bst
lustre/portals/doc/portals3.lyx
lustre/portals/include/linux/kp30.h
lustre/portals/include/portals/defines.h
lustre/portals/include/portals/lib-p30.h
lustre/portals/include/portals/myrnal.h
lustre/portals/include/portals/nal.h
lustre/portals/include/portals/ppid.h
lustre/portals/include/portals/stringtab.h
lustre/portals/libcfs/debug.c
lustre/portals/libcfs/module.c
lustre/scripts/llite-group.sh

index 26293f2..1a223f2 100644 (file)
@@ -3,7 +3,7 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-EXTRA_DIST = Rules.linux archdep.m4 
+EXTRA_DIST = Rules.linux archdep.m4 include 
 DIST_SUBDIRS = libcfs portals knals unals utils tests doc router
 if LIBLUSTRE
 SUBDIRS = portals unals utils
index c3d0150..4df7c50 100644 (file)
@@ -1,7 +1,5 @@
 % ---------------------------------------------------------------
 %
-% $Id: ieee.bst,v 1.1.8.1 2003/05/23 07:02:28 adilger Exp $
-%
 % by Paolo.Ienne@di.epfl.ch
 %
 % ---------------------------------------------------------------
index 65e02bf..8429280 100644 (file)
@@ -7,8 +7,6 @@
 {\begin{quote}\textbf{Discussion}: \slshape}%
 {\end{quote}}
 \pagestyle{myheadings}
-\markboth{$Revision: 1.1.8.1 $\hfil$Date: 2003/05/23 07:02:29 $}%
-{$Date: 2003/05/23 07:02:29 $\hfil$Revision: 1.1.8.1 $}
 \end_preamble
 \language american
 \inputencoding auto
index c5ff808..b21167a 100644 (file)
@@ -116,7 +116,7 @@ do {                                                                          \
              portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24))))        \
                 portals_debug_msg(DEBUG_SUBSYSTEM, mask,                      \
                                   __FILE__, __FUNCTION__, __LINE__,           \
-                                  CDEBUG_STACK(), format , ## a);             \
+                                  CDEBUG_STACK(), format, ## a);              \
 } while (0)
 
 #define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a)
@@ -216,24 +216,26 @@ extern void kportal_assertion_failed(char *expr,char *file,char *func,int line);
 #endif
 
 #ifdef __arch_um__
-#define LBUG()                                                          \
+#define LBUG_WITH_LOC(file, func, line)                                 \
 do {                                                                    \
         CEMERG("LBUG - trying to dump log to /tmp/lustre-log\n");       \
         portals_debug_dumplog();                                        \
-        portals_run_lbug_upcall(__FILE__, __FUNCTION__, __LINE__);      \
+        portals_run_lbug_upcall(file, func, line);                      \
         panic("LBUG");                                                  \
 } while (0)
 #else
-#define LBUG()                                                          \
+#define LBUG_WITH_LOC(file, func, line)                                 \
 do {                                                                    \
         CEMERG("LBUG\n");                                               \
         portals_debug_dumplog();                                        \
-        portals_run_lbug_upcall(__FILE__, __FUNCTION__, __LINE__);      \
+        portals_run_lbug_upcall(file, func, line);                      \
         set_task_state(current, TASK_UNINTERRUPTIBLE);                  \
         schedule();                                                     \
 } while (0)
 #endif /* __arch_um__ */
 
+#define LBUG() LBUG_WITH_LOC(__FILE__, __FUNCTION__, __LINE__)
+
 /*
  * Memory
  */
index 62e888f..785ce73 100644 (file)
@@ -1,5 +1,4 @@
 /*
-** $Id: defines.h,v 1.1.8.1 2003/05/23 07:02:35 adilger Exp $
 **
 ** This files contains definitions that are used throughout the cplant code.
 */
index b5e4098..a70b465 100644 (file)
@@ -1,6 +1,3 @@
-/*
-** $Id: internal.h,v 1.1.8.1 2003/05/23 07:02:35 adilger Exp $
-*/
 #ifndef _P30_INTERNAL_H_
 #define _P30_INTERNAL_H_
 
index 4a61e76..ca92e5f 100644 (file)
@@ -170,10 +170,10 @@ lib_msg_free (nal_cb_t *nal, lib_msg_t *msg)
 
 #else
 
-extern kmem_cache_t *ptl_md_slab; 
-extern kmem_cache_t *ptl_msg_slab; 
-extern kmem_cache_t *ptl_me_slab; 
-extern kmem_cache_t *ptl_eq_slab; 
+extern kmem_cache_t *ptl_md_slab;
+extern kmem_cache_t *ptl_msg_slab;
+extern kmem_cache_t *ptl_me_slab;
+extern kmem_cache_t *ptl_eq_slab;
 extern atomic_t      md_in_use_count;
 extern atomic_t      msg_in_use_count;
 extern atomic_t      me_in_use_count;
@@ -246,7 +246,7 @@ static inline lib_msg_t *
 lib_msg_alloc(nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_msg_t *msg = kmem_cache_alloc(ptl_msg_slab, GFP_ATOMIC); 
+        lib_msg_t *msg = kmem_cache_alloc(ptl_msg_slab, GFP_ATOMIC);
 
         if (msg == NULL)
                 return (NULL);
index 4a61e76..ca92e5f 100644 (file)
@@ -170,10 +170,10 @@ lib_msg_free (nal_cb_t *nal, lib_msg_t *msg)
 
 #else
 
-extern kmem_cache_t *ptl_md_slab; 
-extern kmem_cache_t *ptl_msg_slab; 
-extern kmem_cache_t *ptl_me_slab; 
-extern kmem_cache_t *ptl_eq_slab; 
+extern kmem_cache_t *ptl_md_slab;
+extern kmem_cache_t *ptl_msg_slab;
+extern kmem_cache_t *ptl_me_slab;
+extern kmem_cache_t *ptl_eq_slab;
 extern atomic_t      md_in_use_count;
 extern atomic_t      msg_in_use_count;
 extern atomic_t      me_in_use_count;
@@ -246,7 +246,7 @@ static inline lib_msg_t *
 lib_msg_alloc(nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_msg_t *msg = kmem_cache_alloc(ptl_msg_slab, GFP_ATOMIC); 
+        lib_msg_t *msg = kmem_cache_alloc(ptl_msg_slab, GFP_ATOMIC);
 
         if (msg == NULL)
                 return (NULL);
index bec3d64..13790f7 100644 (file)
@@ -1,7 +1,3 @@
-/*
-** $Id: myrnal.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $
-*/
-
 #ifndef MYRNAL_H
 #define MYRNAL_H
 
index 18f0a9a..7cb3ab7 100644 (file)
@@ -1,6 +1,3 @@
-/*
-** $Id: nal.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $
-*/
 #ifndef _NAL_H_
 #define _NAL_H_
 
index 973c8df..760f465 100644 (file)
@@ -1,7 +1,3 @@
-/*
- * TITLE(ppid_h, "@(#) $Id: ppid.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $");
- */
-
 #ifndef _INCppidh_
 #define _INCppidh_
 
index 74bd960..33e4375 100644 (file)
@@ -1,6 +1,3 @@
 /*
-** $Id: stringtab.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $
-*/
-/*
  * stringtab.h
  */
index 6233b8d..8d26dbb 100644 (file)
@@ -237,7 +237,8 @@ int portals_do_debug_dumplog(void *arg)
         file = filp_open(debug_file_name, O_CREAT|O_TRUNC|O_RDWR, 0644);
 
         if (!file || IS_ERR(file)) {
-                CERROR("cannot open %s for dumping", debug_file_name);
+                CERROR("cannot open %s for dumping: %ld\n", debug_file_name,
+                       PTR_ERR(file));
                 GOTO(out, PTR_ERR(file));
         } else {
                 printk(KERN_ALERT "dumping log to %s ... writing ...\n",
@@ -274,7 +275,7 @@ int portals_debug_daemon(void *arg)
         void *journal_info;
         mm_segment_t oldfs;
         unsigned long force_flush = 0;
-        unsigned long size;
+        unsigned long size, off, flags;
         int rc;
 
         kportal_daemonize("ldebug_daemon");
@@ -295,7 +296,17 @@ int portals_debug_daemon(void *arg)
 
         debug_daemon_state.overlapped = 0;
         debug_daemon_state.stopped = 0;
+
+        spin_lock_irqsave(&portals_debug_lock, flags);
+        off = atomic_read(&debug_off_a) + 1;
+        if (debug_wrapped)
+                off = (off >= debug_size)? 0 : off;
+        else
+                off = 0;
+        atomic_set(&debug_daemon_next_write, off);
         atomic_set(&debug_daemon_state.paused, 0);
+        spin_unlock_irqrestore(&portals_debug_lock, flags);
+
         oldfs = get_fs();
         set_fs(KERNEL_DS);
         while (1) {
@@ -431,8 +442,6 @@ int portals_debug_daemon_start(char *file, unsigned int size)
         init_waitqueue_head(&debug_daemon_state.lctl);
         init_waitqueue_head(&debug_daemon_state.daemon);
 
-        atomic_set(&debug_daemon_next_write, atomic_read(&debug_off_a));
-
         daemon_file_size_limit = size << 20;
 
         debug_daemon_state.lctl_event = 0;
index c4ca2e3..5e3fcb5 100644 (file)
@@ -67,7 +67,7 @@ kportal_assertion_failed (char *expr, char *file, char *func, int line)
 {
         portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK(),
                           "ASSERTION(%s) failed\n", expr);
-        LBUG();
+        LBUG_WITH_LOC(file, func, line);
 }
 #endif
 
index 26293f2..1a223f2 100644 (file)
@@ -3,7 +3,7 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-EXTRA_DIST = Rules.linux archdep.m4 
+EXTRA_DIST = Rules.linux archdep.m4 include 
 DIST_SUBDIRS = libcfs portals knals unals utils tests doc router
 if LIBLUSTRE
 SUBDIRS = portals unals utils
index c3d0150..4df7c50 100644 (file)
@@ -1,7 +1,5 @@
 % ---------------------------------------------------------------
 %
-% $Id: ieee.bst,v 1.1.8.1 2003/05/23 07:02:28 adilger Exp $
-%
 % by Paolo.Ienne@di.epfl.ch
 %
 % ---------------------------------------------------------------
index 65e02bf..8429280 100644 (file)
@@ -7,8 +7,6 @@
 {\begin{quote}\textbf{Discussion}: \slshape}%
 {\end{quote}}
 \pagestyle{myheadings}
-\markboth{$Revision: 1.1.8.1 $\hfil$Date: 2003/05/23 07:02:29 $}%
-{$Date: 2003/05/23 07:02:29 $\hfil$Revision: 1.1.8.1 $}
 \end_preamble
 \language american
 \inputencoding auto
index c5ff808..b21167a 100644 (file)
@@ -116,7 +116,7 @@ do {                                                                          \
              portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24))))        \
                 portals_debug_msg(DEBUG_SUBSYSTEM, mask,                      \
                                   __FILE__, __FUNCTION__, __LINE__,           \
-                                  CDEBUG_STACK(), format , ## a);             \
+                                  CDEBUG_STACK(), format, ## a);              \
 } while (0)
 
 #define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a)
@@ -216,24 +216,26 @@ extern void kportal_assertion_failed(char *expr,char *file,char *func,int line);
 #endif
 
 #ifdef __arch_um__
-#define LBUG()                                                          \
+#define LBUG_WITH_LOC(file, func, line)                                 \
 do {                                                                    \
         CEMERG("LBUG - trying to dump log to /tmp/lustre-log\n");       \
         portals_debug_dumplog();                                        \
-        portals_run_lbug_upcall(__FILE__, __FUNCTION__, __LINE__);      \
+        portals_run_lbug_upcall(file, func, line);                      \
         panic("LBUG");                                                  \
 } while (0)
 #else
-#define LBUG()                                                          \
+#define LBUG_WITH_LOC(file, func, line)                                 \
 do {                                                                    \
         CEMERG("LBUG\n");                                               \
         portals_debug_dumplog();                                        \
-        portals_run_lbug_upcall(__FILE__, __FUNCTION__, __LINE__);      \
+        portals_run_lbug_upcall(file, func, line);                      \
         set_task_state(current, TASK_UNINTERRUPTIBLE);                  \
         schedule();                                                     \
 } while (0)
 #endif /* __arch_um__ */
 
+#define LBUG() LBUG_WITH_LOC(__FILE__, __FUNCTION__, __LINE__)
+
 /*
  * Memory
  */
index 62e888f..785ce73 100644 (file)
@@ -1,5 +1,4 @@
 /*
-** $Id: defines.h,v 1.1.8.1 2003/05/23 07:02:35 adilger Exp $
 **
 ** This files contains definitions that are used throughout the cplant code.
 */
index 4a61e76..ca92e5f 100644 (file)
@@ -170,10 +170,10 @@ lib_msg_free (nal_cb_t *nal, lib_msg_t *msg)
 
 #else
 
-extern kmem_cache_t *ptl_md_slab; 
-extern kmem_cache_t *ptl_msg_slab; 
-extern kmem_cache_t *ptl_me_slab; 
-extern kmem_cache_t *ptl_eq_slab; 
+extern kmem_cache_t *ptl_md_slab;
+extern kmem_cache_t *ptl_msg_slab;
+extern kmem_cache_t *ptl_me_slab;
+extern kmem_cache_t *ptl_eq_slab;
 extern atomic_t      md_in_use_count;
 extern atomic_t      msg_in_use_count;
 extern atomic_t      me_in_use_count;
@@ -246,7 +246,7 @@ static inline lib_msg_t *
 lib_msg_alloc(nal_cb_t *nal)
 {
         /* ALWAYS called with statelock held */
-        lib_msg_t *msg = kmem_cache_alloc(ptl_msg_slab, GFP_ATOMIC); 
+        lib_msg_t *msg = kmem_cache_alloc(ptl_msg_slab, GFP_ATOMIC);
 
         if (msg == NULL)
                 return (NULL);
index bec3d64..13790f7 100644 (file)
@@ -1,7 +1,3 @@
-/*
-** $Id: myrnal.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $
-*/
-
 #ifndef MYRNAL_H
 #define MYRNAL_H
 
index 18f0a9a..7cb3ab7 100644 (file)
@@ -1,6 +1,3 @@
-/*
-** $Id: nal.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $
-*/
 #ifndef _NAL_H_
 #define _NAL_H_
 
index 973c8df..760f465 100644 (file)
@@ -1,7 +1,3 @@
-/*
- * TITLE(ppid_h, "@(#) $Id: ppid.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $");
- */
-
 #ifndef _INCppidh_
 #define _INCppidh_
 
index 74bd960..33e4375 100644 (file)
@@ -1,6 +1,3 @@
 /*
-** $Id: stringtab.h,v 1.1.8.1 2003/05/23 07:02:36 adilger Exp $
-*/
-/*
  * stringtab.h
  */
index 6233b8d..8d26dbb 100644 (file)
@@ -237,7 +237,8 @@ int portals_do_debug_dumplog(void *arg)
         file = filp_open(debug_file_name, O_CREAT|O_TRUNC|O_RDWR, 0644);
 
         if (!file || IS_ERR(file)) {
-                CERROR("cannot open %s for dumping", debug_file_name);
+                CERROR("cannot open %s for dumping: %ld\n", debug_file_name,
+                       PTR_ERR(file));
                 GOTO(out, PTR_ERR(file));
         } else {
                 printk(KERN_ALERT "dumping log to %s ... writing ...\n",
@@ -274,7 +275,7 @@ int portals_debug_daemon(void *arg)
         void *journal_info;
         mm_segment_t oldfs;
         unsigned long force_flush = 0;
-        unsigned long size;
+        unsigned long size, off, flags;
         int rc;
 
         kportal_daemonize("ldebug_daemon");
@@ -295,7 +296,17 @@ int portals_debug_daemon(void *arg)
 
         debug_daemon_state.overlapped = 0;
         debug_daemon_state.stopped = 0;
+
+        spin_lock_irqsave(&portals_debug_lock, flags);
+        off = atomic_read(&debug_off_a) + 1;
+        if (debug_wrapped)
+                off = (off >= debug_size)? 0 : off;
+        else
+                off = 0;
+        atomic_set(&debug_daemon_next_write, off);
         atomic_set(&debug_daemon_state.paused, 0);
+        spin_unlock_irqrestore(&portals_debug_lock, flags);
+
         oldfs = get_fs();
         set_fs(KERNEL_DS);
         while (1) {
@@ -431,8 +442,6 @@ int portals_debug_daemon_start(char *file, unsigned int size)
         init_waitqueue_head(&debug_daemon_state.lctl);
         init_waitqueue_head(&debug_daemon_state.daemon);
 
-        atomic_set(&debug_daemon_next_write, atomic_read(&debug_off_a));
-
         daemon_file_size_limit = size << 20;
 
         debug_daemon_state.lctl_event = 0;
index c4ca2e3..5e3fcb5 100644 (file)
@@ -67,7 +67,7 @@ kportal_assertion_failed (char *expr, char *file, char *func, int line)
 {
         portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK(),
                           "ASSERTION(%s) failed\n", expr);
-        LBUG();
+        LBUG_WITH_LOC(file, func, line);
 }
 #endif
 
index 879a858..ed914e8 100644 (file)
@@ -36,7 +36,7 @@ start() {
 
 stop() {
         echo -n "Shutting down $SERVICE: "
-        python2 $LCONF -v --cleanup --failover $confopt
+        python2 $LCONF -v --cleanup --force --failover $confopt
         RETVAL=$?
         echo done
 }