Whamcloud - gitweb
b=1615
authoryoufeng <youfeng>
Fri, 26 Sep 2003 03:59:10 +0000 (03:59 +0000)
committeryoufeng <youfeng>
Fri, 26 Sep 2003 03:59:10 +0000 (03:59 +0000)
a greppable magic string to aid LLNL in extracting the lustre messages from
syslog. "Lustre:" for less important messages, and "LustreError" for more
important messages.

26 files changed:
lnet/klnds/gmlnd/gmlnd_cb.c
lnet/klnds/gmlnd/gmnal.c
lnet/klnds/lgmlnd/lgmnal_utils.c
lnet/klnds/qswlnd/qswlnd.c
lnet/klnds/scimaclnd/scimacnal_cb.c
lnet/klnds/socklnd/socklnd.c
lnet/klnds/toelnd/toenal.c
lnet/libcfs/debug.c
lnet/libcfs/module.c
lnet/tests/ping_cli.c
lnet/tests/ping_srv.c
lnet/tests/sping_cli.c
lnet/tests/sping_srv.c
lustre/portals/knals/gmnal/gmnal.c
lustre/portals/knals/gmnal/gmnal_cb.c
lustre/portals/knals/lgmnal/lgmnal_utils.c
lustre/portals/knals/qswnal/qswnal.c
lustre/portals/knals/scimacnal/scimacnal_cb.c
lustre/portals/knals/socknal/socknal.c
lustre/portals/knals/toenal/toenal.c
lustre/portals/libcfs/debug.c
lustre/portals/libcfs/module.c
lustre/portals/tests/ping_cli.c
lustre/portals/tests/ping_srv.c
lustre/portals/tests/sping_cli.c
lustre/portals/tests/sping_srv.c

index 3d4c86d..4728eca 100644 (file)
@@ -108,7 +108,7 @@ kgmnal_printf(nal_cb_t *nal, const char *fmt, ...)
                 vsnprintf( msg, sizeof(msg), fmt, ap );
                 va_end( ap );
 
-                printk("CPUId: %d %s",smp_processor_id(), msg);
+                printk("Lustre: CPUId: %d %s",smp_processor_id(), msg);
         }
 }
 
@@ -278,7 +278,7 @@ kgmnal_send(nal_cb_t        *nal,
         } else if (buf_len <= MSG_LEN_LARGE) {
                 buf_size = MSG_SIZE_LARGE;
         } else {
-                printk("kgmnal:request exceeds TX MTU size (%d).\n",
+                printk("LustreError: kgmnal:request exceeds TX MTU size (%d).\n",
                        MSG_SIZE_LARGE);
                 rc = -1;
                 goto send_exit;
index 0cffc15..24708f7 100644 (file)
@@ -100,7 +100,7 @@ kgmnal_rx_t *kgm_add_recv(kgmnal_data_t *data,int ndx)
         PORTAL_ALLOC(conn, sizeof(kgmnal_rx_t));
         /* Check for out of mem here */
         if (conn==NULL) {
-                        printk("kgm_add_recv: memory alloc failed\n");
+                        printk("LustreError: kgm_add_recv: memory alloc failed\n");
                         return NULL;
         }
 
@@ -184,7 +184,7 @@ kgmnal_initialize(void)
         /* Allocate transmit descriptors */
         PORTAL_ALLOC (kgmnal_data.kgm_trans, sizeof(kgmnal_tx_t)*TXMSGS);
         if (kgmnal_data.kgm_trans==NULL) {
-                printk("kgmnal: init: failed to allocate transmit "
+                printk("LustreError: kgmnal: init: failed to allocate transmit "
                        "descriptors\n");
                 return -1;
         }
index 8a91ca4..d60e36a 100644 (file)
@@ -44,26 +44,26 @@ void lgmnal_print(const char *fmt, ...)
 
 
        va_start(ap, fmt);
-       sprintf(fixedbuf, "LGMNAL::");
-       len = vsnprintf(fixedbuf+8, DEFAULT_LEN-8, fmt, ap);
-       if ((len+8) >= DEFAULT_LEN) {
-               PORTAL_ALLOC(varbuf, len+1+8);
+       sprintf(fixedbuf, "Lustre: LGMNAL::");
+       len = vsnprintf(fixedbuf+16, DEFAULT_LEN-16, fmt, ap);
+       if ((len+16) >= DEFAULT_LEN) {
+               PORTAL_ALLOC(varbuf, len+1+16);
                if (!varbuf) {
-                       printk("lgmnal_cb_printf Failed to malloc\n");
-                       printk("Truncated message is\n");
+                       printk("LustreError: lgmnal_cb_printf Failed to malloc\n");
+                       printk("Lustre: Truncated message is\n");
                        printk(fixedbuf);
                        va_end(ap);
                        return;
                }
-               sprintf(varbuf, "LGMNAL::");
-               len = vsnprintf(varbuf+8, len+1, fmt, ap);
+               sprintf(varbuf, "Lustre: LGMNAL::");
+               len = vsnprintf(varbuf+16, len+1, fmt, ap);
        } else {
                varbuf = fixedbuf;
        }
        va_end(ap);
        printk(varbuf);
        if (fixedbuf != varbuf)
-               PORTAL_FREE(varbuf, len+1+8);
+               PORTAL_FREE(varbuf, len+1+16);
        return;
 }
        
index d4ee960..897904f 100644 (file)
@@ -322,7 +322,7 @@ kqswnal_finalise (void)
 
        CDEBUG (D_MALLOC, "done kmem %d\n", atomic_read(&portal_kmemory));
 
-       printk (KERN_INFO "Routing QSW NAL unloaded (final mem %d)\n",
+       printk (KERN_INFO "Lustre: Routing QSW NAL unloaded (final mem %d)\n",
                 atomic_read(&portal_kmemory));
 }
 
@@ -630,7 +630,7 @@ kqswnal_initialise (void)
        PORTAL_SYMBOL_REGISTER(kqswnal_ni);
        kqswnal_data.kqn_init = KQN_INIT_ALL;
 
-       printk(KERN_INFO "Routing QSW NAL loaded on node %d of %d "
+       printk(KERN_INFO "Lustre: Routing QSW NAL loaded on node %d of %d "
               "(Routing %s, initial mem %d)\n", 
               kqswnal_data.kqn_elanid, kqswnal_data.kqn_nnodes,
               kpr_routing (&kqswnal_data.kqn_router) ? "enabled" : "disabled",
index cc0c102..7d5796e 100644 (file)
@@ -74,7 +74,7 @@ kscimacnal_printf(nal_cb_t *nal, const char *fmt, ...)
                 vsnprintf( msg, sizeof(msg), fmt, ap );
                 va_end( ap );
 
-                printk("CPUId: %d %s",smp_processor_id(), msg);
+                printk("Lustre: CPUId: %d %s",smp_processor_id(), msg);
         }
 }
 
index e7232a0..2b2a112 100644 (file)
@@ -160,7 +160,7 @@ ksocknal_bind_irq (unsigned int irq)
         snprintf (cmdline, sizeof (cmdline),
                   "echo %d > /proc/irq/%u/smp_affinity", 1 << info->ksni_sched, irq);
 
-        printk (KERN_INFO "Binding irq %u to CPU %d with cmd: %s\n",
+        printk (KERN_INFO "Lustre: Binding irq %u to CPU %d with cmd: %s\n",
                 irq, info->ksni_sched, cmdline);
 
         /* FIXME: Find a better method of setting IRQ affinity...
@@ -1349,7 +1349,7 @@ ksocknal_module_fini (void)
         CDEBUG(D_MALLOC, "after NAL cleanup: kmem %d\n",
                atomic_read (&portal_kmemory));
 
-        printk(KERN_INFO "Routing socket NAL unloaded (final mem %d)\n",
+        printk(KERN_INFO "Lustre: Routing socket NAL unloaded (final mem %d)\n",
                atomic_read(&portal_kmemory));
 }
 
@@ -1564,7 +1564,7 @@ ksocknal_module_init (void)
         /* flag everything initialised */
         ksocknal_data.ksnd_init = SOCKNAL_INIT_ALL;
 
-        printk(KERN_INFO "Routing socket NAL loaded (Routing %s, initial "
+        printk(KERN_INFO "Lustre: Routing socket NAL loaded (Routing %s, initial "
                "mem %d)\n",
                kpr_routing (&ksocknal_data.ksnd_router) ?
                "enabled" : "disabled", pkmem);
index 77ee473..dc7e447 100644 (file)
@@ -438,7 +438,7 @@ ktoenal_module_fini (void)
         CDEBUG(D_MALLOC, "after NAL cleanup: kmem %d\n",
                atomic_read (&portal_kmemory));
 
-        printk(KERN_INFO "Routing socket NAL unloaded (final mem %d)\n",
+        printk(KERN_INFO "Lustre: Routing socket NAL unloaded (final mem %d)\n",
                atomic_read(&portal_kmemory));
 }
 
@@ -612,7 +612,7 @@ ktoenal_module_init (void)
         /* flag everything initialised */
         ktoenal_data.ksnd_init = SOCKNAL_INIT_ALL;
 
-       printk(KERN_INFO"Routing TOE NAL loaded (Routing %s, initial mem %d)\n",
+       printk(KERN_INFO "Lustre: Routing TOE NAL loaded (Routing %s, initial mem %d)\n",
               kpr_routing(&ktoenal_data.ksnd_router) ? "enabled" : "disabled",
                pkmem);
 
index 16ef401..a1d124e 100644 (file)
@@ -244,7 +244,7 @@ int portals_do_debug_dumplog(void *arg)
                        PTR_ERR(file));
                 GOTO(out, PTR_ERR(file));
         } else {
-                printk(KERN_ALERT "dumping log to %s ... writing ...\n",
+                printk(KERN_ALERT "LustreError: dumping log to %s ... writing ...\n",
                        debug_file_name);
         }
 
@@ -259,7 +259,7 @@ int portals_do_debug_dumplog(void *arg)
         } else {
                 rc = file->f_op->write(file, debug_buf, debug_off,&file->f_pos);
         }
-        printk("wrote %d bytes\n", rc);
+        printk("LustreError: wrote %d bytes\n", rc);
         set_fs(oldfs);
 
         rc = file->f_op->fsync(file, file->f_dentry, 1);
@@ -293,7 +293,7 @@ int portals_debug_daemon(void *arg)
                 CERROR("cannot open %s for logging", debug_daemon_file_path);
                 GOTO(out1, PTR_ERR(file));
         } else {
-                printk(KERN_ALERT "daemon dumping log to %s ... writing ...\n",
+                printk(KERN_ALERT "LustreError: daemon dumping log to %s ... writing ...\n",
                        debug_daemon_file_path);
         }
 
@@ -340,7 +340,7 @@ int portals_debug_daemon(void *arg)
                                                size, &file->f_pos);
                         if (rc < 0) {
                                 printk(KERN_ALERT
-                                           "Debug_daemon write error %d\n", rc);
+                                           "LustreError: Debug_daemon write error %d\n", rc);
                                 goto out;
                         }
                         start += rc;
@@ -362,7 +362,7 @@ int portals_debug_daemon(void *arg)
                         rc = file->f_op->fsync(file, file->f_dentry, 1);
                         if (rc < 0) {
                                 printk(KERN_ALERT
-                                       "Debug_daemon sync error %d\n", rc);
+                                       "LustreError: Debug_daemon sync error %d\n", rc);
                                 goto out;
                         }
                         if (debug_daemon_state.stopped)
@@ -406,12 +406,12 @@ void portals_debug_print(void)
 
         while (start1 < end1) {
                 int count = MIN(1024, end1 - start1);
-                printk("%*s", count, start1);
+                printk("LustreError: %*s", count, start1);
                 start1 += 1024;
         }
         while (start2 < end2) {
                 int count = MIN(1024, end2 - start2);
-                printk("%*s", count, start2);
+                printk("LustreError: %*s", count, start2);
                 start2 += 1024;
         }
 }
@@ -426,7 +426,7 @@ void portals_debug_dumplog(void)
         rc = kernel_thread(portals_do_debug_dumplog,
                            NULL, CLONE_VM | CLONE_FS | CLONE_FILES);
         if (rc < 0) {
-                printk(KERN_ERR "cannot start dump thread\n");
+                printk(KERN_ERR "LustreError: cannot start dump thread\n");
                 return;
         }
         sleep_on(&debug_ctlwq);
@@ -450,7 +450,7 @@ int portals_debug_daemon_start(char *file, unsigned int size)
         debug_daemon_state.lctl_event = 0;
         rc = kernel_thread(portals_debug_daemon, NULL, 0);
         if (rc < 0) {
-                printk(KERN_ERR "cannot start debug daemon thread\n");
+                printk(KERN_ERR "LustreError: cannot start debug daemon thread\n");
                 strncpy(debug_daemon_file_path, "\0", 1);
                 return rc;
         }
@@ -753,7 +753,7 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn,
         unsigned long debug_off;
 
         if (debug_buf == NULL) {
-                printk("portals_debug_msg: debug_buf is NULL!\n");
+                printk("LustreError: portals_debug_msg: debug_buf is NULL!\n");
                 return;
         }
 
@@ -784,7 +784,7 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn,
         max_nob = debug_size - debug_off + DEBUG_OVERFLOW;
         if (max_nob <= 0) {
                 spin_unlock_irqrestore(&portals_debug_lock, flags);
-                printk("logic error in portals_debug_msg: <0 bytes to write\n");
+                printk("LustreError: logic error in portals_debug_msg: <0 bytes to write\n");
                 return;
         }
 
@@ -828,11 +828,13 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn,
         /* Print to console, while msg is contiguous in debug_buf */
         /* NB safely terminated see above */
         if ((mask & D_EMERG) != 0)
-                printk(KERN_EMERG "%s", debug_buf + debug_off + prefix_nob);
+                printk(KERN_EMERG "LustreError: %s",
+                       debug_buf + debug_off + prefix_nob);
         if ((mask & D_ERROR) != 0)
-                printk(KERN_ERR   "%s", debug_buf + debug_off + prefix_nob);
+                printk(KERN_ERR   "LustreError: %s",
+                       debug_buf + debug_off + prefix_nob);
         else if (portal_printk)
-                printk("<%d>%s", portal_printk, debug_buf+debug_off+prefix_nob);
+                printk("<%d>LustreError: %s", portal_printk, debug_buf+debug_off+prefix_nob);
         base_offset = debug_off & 0xFFFF;
 
         debug_off += prefix_nob + msg_nob;
@@ -855,7 +857,7 @@ out:
 
 void portals_debug_set_level(unsigned int debug_level)
 {
-        printk("Setting portals debug level to %08x\n", debug_level);
+        printk("Lustre: Setting portals debug level to %08x\n", debug_level);
         portal_debug = debug_level;
 }
 
index 4948769..179240e 100644 (file)
@@ -467,7 +467,7 @@ static int init_kportals_module(void)
 
         rc = portals_debug_init(5 * 1024 * 1024);
         if (rc < 0) {
-                printk(KERN_ERR "portals_debug_init: %d\n", rc);
+                printk(KERN_ERR "LustreError: portals_debug_init: %d\n", rc);
                 return (rc);
         }
 
@@ -524,7 +524,7 @@ static void exit_kportals_module(void)
 
         rc = portals_debug_cleanup();
         if (rc)
-                printk(KERN_ERR "portals_debug_cleanup: %d\n", rc);
+                printk(KERN_ERR "LustreError: portals_debug_cleanup: %d\n", rc);
 }
 
 EXPORT_SYMBOL(lib_dispatch);
index 4d04ffb..22bdb45 100644 (file)
@@ -91,14 +91,14 @@ static int pingcli_callback(ptl_event_t *ev)
         magic = *(int *)(ev->mem_desc.start + ev->offset);
 
         if(magic != 0xcafebabe) {
-                printk ("Unexpected response \n");
+                printk ("LustreError: Unexpected response \n");
                 return 1;
         }
 
         if((i == count) || !count)
                 wake_up_process (client->tsk);
         else
-                printk ("Received response after timeout for %d\n",i);
+                printk ("LustreError: Received response after timeout for %d\n",i);
         return 1;
 }
 
@@ -229,15 +229,15 @@ pingcli_start(struct portal_ioctl_data *args)
                          pingcli_shutdown (1);
                          return NULL;
                 }
-                printk ("sent msg no %d", count);
+                printk ("Lustre: sent msg no %d", count);
 
                 set_current_state (TASK_INTERRUPTIBLE);
                 rc = schedule_timeout (20 * args->ioc_timeout);
                 if (rc == 0) {
-                        printk ("   ::  timeout .....\n");
+                        printk ("LustreError:   ::  timeout .....\n");
                 } else {
                         do_gettimeofday (&tv2);
-                        printk("   ::  Reply in %u usec\n",
+                        printk("Lustre:   ::  Reply in %u usec\n",
                                 (unsigned)((tv2.tv_sec - tv1.tv_sec)
                                  * 1000000 +  (tv2.tv_usec - tv1.tv_usec)));
                 }
index 873e11c..2a96f55 100644 (file)
@@ -121,7 +121,7 @@ int pingsrv_thread(void *arg)
                 
                 
                 if(magic != 0xdeadbeef) {
-                        printk("Unexpected Packet to the server\n");
+                        printk("LustreError: Unexpected Packet to the server\n");
                         
                 } 
                 memcpy (server->in_buf, &ping_bulk_magic, sizeof(ping_bulk_magic));
@@ -183,7 +183,7 @@ static int pingsrv_callback(ptl_event_t *ev)
         }
         server->evnt = *ev;
         
-        printk ("received ping from nid "LPX64" "
+        printk ("Lustre: received ping from nid "LPX64" "
                "(off=%u rlen=%u mlen=%u head=%x seq=%d size=%d)\n",
                ev->initiator.nid, ev->offset, ev->rlength, ev->mlength,
                *((int *)(ev->mem_desc.start + ev->offset)),
index 35e114b..c37db4c 100644 (file)
@@ -219,11 +219,11 @@ pingcli_start(struct portal_ioctl_data *args)
         set_current_state (TASK_INTERRUPTIBLE);
         rc = schedule_timeout (20 * args->ioc_timeout);
         if (rc == 0) {
-                printk (" Time out on the server\n");
+                printk ("LustreError: Time out on the server\n");
                 pingcli_shutdown (2);
                 return NULL;
         } else
-                printk("Received respose from the server \n");
+                printk("Lustre: Received respose from the server \n");
 
 
         pingcli_shutdown (2);
index 2b45a46..0d52e1f 100644 (file)
@@ -175,7 +175,7 @@ static int pingsrv_callback(ptl_event_t *ev)
         }
         server->evnt = *ev;
         
-        printk ("received ping from nid "LPX64" "
+        printk ("Lustre: received ping from nid "LPX64" "
                "(off=%u rlen=%u mlen=%u head=%x)\n",
                ev->initiator.nid, ev->offset, ev->rlength, ev->mlength,
                *((int *)(ev->mem_desc.start + ev->offset)));
index 0cffc15..24708f7 100644 (file)
@@ -100,7 +100,7 @@ kgmnal_rx_t *kgm_add_recv(kgmnal_data_t *data,int ndx)
         PORTAL_ALLOC(conn, sizeof(kgmnal_rx_t));
         /* Check for out of mem here */
         if (conn==NULL) {
-                        printk("kgm_add_recv: memory alloc failed\n");
+                        printk("LustreError: kgm_add_recv: memory alloc failed\n");
                         return NULL;
         }
 
@@ -184,7 +184,7 @@ kgmnal_initialize(void)
         /* Allocate transmit descriptors */
         PORTAL_ALLOC (kgmnal_data.kgm_trans, sizeof(kgmnal_tx_t)*TXMSGS);
         if (kgmnal_data.kgm_trans==NULL) {
-                printk("kgmnal: init: failed to allocate transmit "
+                printk("LustreError: kgmnal: init: failed to allocate transmit "
                        "descriptors\n");
                 return -1;
         }
index 3d4c86d..4728eca 100644 (file)
@@ -108,7 +108,7 @@ kgmnal_printf(nal_cb_t *nal, const char *fmt, ...)
                 vsnprintf( msg, sizeof(msg), fmt, ap );
                 va_end( ap );
 
-                printk("CPUId: %d %s",smp_processor_id(), msg);
+                printk("Lustre: CPUId: %d %s",smp_processor_id(), msg);
         }
 }
 
@@ -278,7 +278,7 @@ kgmnal_send(nal_cb_t        *nal,
         } else if (buf_len <= MSG_LEN_LARGE) {
                 buf_size = MSG_SIZE_LARGE;
         } else {
-                printk("kgmnal:request exceeds TX MTU size (%d).\n",
+                printk("LustreError: kgmnal:request exceeds TX MTU size (%d).\n",
                        MSG_SIZE_LARGE);
                 rc = -1;
                 goto send_exit;
index 8a91ca4..d60e36a 100644 (file)
@@ -44,26 +44,26 @@ void lgmnal_print(const char *fmt, ...)
 
 
        va_start(ap, fmt);
-       sprintf(fixedbuf, "LGMNAL::");
-       len = vsnprintf(fixedbuf+8, DEFAULT_LEN-8, fmt, ap);
-       if ((len+8) >= DEFAULT_LEN) {
-               PORTAL_ALLOC(varbuf, len+1+8);
+       sprintf(fixedbuf, "Lustre: LGMNAL::");
+       len = vsnprintf(fixedbuf+16, DEFAULT_LEN-16, fmt, ap);
+       if ((len+16) >= DEFAULT_LEN) {
+               PORTAL_ALLOC(varbuf, len+1+16);
                if (!varbuf) {
-                       printk("lgmnal_cb_printf Failed to malloc\n");
-                       printk("Truncated message is\n");
+                       printk("LustreError: lgmnal_cb_printf Failed to malloc\n");
+                       printk("Lustre: Truncated message is\n");
                        printk(fixedbuf);
                        va_end(ap);
                        return;
                }
-               sprintf(varbuf, "LGMNAL::");
-               len = vsnprintf(varbuf+8, len+1, fmt, ap);
+               sprintf(varbuf, "Lustre: LGMNAL::");
+               len = vsnprintf(varbuf+16, len+1, fmt, ap);
        } else {
                varbuf = fixedbuf;
        }
        va_end(ap);
        printk(varbuf);
        if (fixedbuf != varbuf)
-               PORTAL_FREE(varbuf, len+1+8);
+               PORTAL_FREE(varbuf, len+1+16);
        return;
 }
        
index d4ee960..897904f 100644 (file)
@@ -322,7 +322,7 @@ kqswnal_finalise (void)
 
        CDEBUG (D_MALLOC, "done kmem %d\n", atomic_read(&portal_kmemory));
 
-       printk (KERN_INFO "Routing QSW NAL unloaded (final mem %d)\n",
+       printk (KERN_INFO "Lustre: Routing QSW NAL unloaded (final mem %d)\n",
                 atomic_read(&portal_kmemory));
 }
 
@@ -630,7 +630,7 @@ kqswnal_initialise (void)
        PORTAL_SYMBOL_REGISTER(kqswnal_ni);
        kqswnal_data.kqn_init = KQN_INIT_ALL;
 
-       printk(KERN_INFO "Routing QSW NAL loaded on node %d of %d "
+       printk(KERN_INFO "Lustre: Routing QSW NAL loaded on node %d of %d "
               "(Routing %s, initial mem %d)\n", 
               kqswnal_data.kqn_elanid, kqswnal_data.kqn_nnodes,
               kpr_routing (&kqswnal_data.kqn_router) ? "enabled" : "disabled",
index cc0c102..7d5796e 100644 (file)
@@ -74,7 +74,7 @@ kscimacnal_printf(nal_cb_t *nal, const char *fmt, ...)
                 vsnprintf( msg, sizeof(msg), fmt, ap );
                 va_end( ap );
 
-                printk("CPUId: %d %s",smp_processor_id(), msg);
+                printk("Lustre: CPUId: %d %s",smp_processor_id(), msg);
         }
 }
 
index e7232a0..2b2a112 100644 (file)
@@ -160,7 +160,7 @@ ksocknal_bind_irq (unsigned int irq)
         snprintf (cmdline, sizeof (cmdline),
                   "echo %d > /proc/irq/%u/smp_affinity", 1 << info->ksni_sched, irq);
 
-        printk (KERN_INFO "Binding irq %u to CPU %d with cmd: %s\n",
+        printk (KERN_INFO "Lustre: Binding irq %u to CPU %d with cmd: %s\n",
                 irq, info->ksni_sched, cmdline);
 
         /* FIXME: Find a better method of setting IRQ affinity...
@@ -1349,7 +1349,7 @@ ksocknal_module_fini (void)
         CDEBUG(D_MALLOC, "after NAL cleanup: kmem %d\n",
                atomic_read (&portal_kmemory));
 
-        printk(KERN_INFO "Routing socket NAL unloaded (final mem %d)\n",
+        printk(KERN_INFO "Lustre: Routing socket NAL unloaded (final mem %d)\n",
                atomic_read(&portal_kmemory));
 }
 
@@ -1564,7 +1564,7 @@ ksocknal_module_init (void)
         /* flag everything initialised */
         ksocknal_data.ksnd_init = SOCKNAL_INIT_ALL;
 
-        printk(KERN_INFO "Routing socket NAL loaded (Routing %s, initial "
+        printk(KERN_INFO "Lustre: Routing socket NAL loaded (Routing %s, initial "
                "mem %d)\n",
                kpr_routing (&ksocknal_data.ksnd_router) ?
                "enabled" : "disabled", pkmem);
index 77ee473..dc7e447 100644 (file)
@@ -438,7 +438,7 @@ ktoenal_module_fini (void)
         CDEBUG(D_MALLOC, "after NAL cleanup: kmem %d\n",
                atomic_read (&portal_kmemory));
 
-        printk(KERN_INFO "Routing socket NAL unloaded (final mem %d)\n",
+        printk(KERN_INFO "Lustre: Routing socket NAL unloaded (final mem %d)\n",
                atomic_read(&portal_kmemory));
 }
 
@@ -612,7 +612,7 @@ ktoenal_module_init (void)
         /* flag everything initialised */
         ktoenal_data.ksnd_init = SOCKNAL_INIT_ALL;
 
-       printk(KERN_INFO"Routing TOE NAL loaded (Routing %s, initial mem %d)\n",
+       printk(KERN_INFO "Lustre: Routing TOE NAL loaded (Routing %s, initial mem %d)\n",
               kpr_routing(&ktoenal_data.ksnd_router) ? "enabled" : "disabled",
                pkmem);
 
index 16ef401..a1d124e 100644 (file)
@@ -244,7 +244,7 @@ int portals_do_debug_dumplog(void *arg)
                        PTR_ERR(file));
                 GOTO(out, PTR_ERR(file));
         } else {
-                printk(KERN_ALERT "dumping log to %s ... writing ...\n",
+                printk(KERN_ALERT "LustreError: dumping log to %s ... writing ...\n",
                        debug_file_name);
         }
 
@@ -259,7 +259,7 @@ int portals_do_debug_dumplog(void *arg)
         } else {
                 rc = file->f_op->write(file, debug_buf, debug_off,&file->f_pos);
         }
-        printk("wrote %d bytes\n", rc);
+        printk("LustreError: wrote %d bytes\n", rc);
         set_fs(oldfs);
 
         rc = file->f_op->fsync(file, file->f_dentry, 1);
@@ -293,7 +293,7 @@ int portals_debug_daemon(void *arg)
                 CERROR("cannot open %s for logging", debug_daemon_file_path);
                 GOTO(out1, PTR_ERR(file));
         } else {
-                printk(KERN_ALERT "daemon dumping log to %s ... writing ...\n",
+                printk(KERN_ALERT "LustreError: daemon dumping log to %s ... writing ...\n",
                        debug_daemon_file_path);
         }
 
@@ -340,7 +340,7 @@ int portals_debug_daemon(void *arg)
                                                size, &file->f_pos);
                         if (rc < 0) {
                                 printk(KERN_ALERT
-                                           "Debug_daemon write error %d\n", rc);
+                                           "LustreError: Debug_daemon write error %d\n", rc);
                                 goto out;
                         }
                         start += rc;
@@ -362,7 +362,7 @@ int portals_debug_daemon(void *arg)
                         rc = file->f_op->fsync(file, file->f_dentry, 1);
                         if (rc < 0) {
                                 printk(KERN_ALERT
-                                       "Debug_daemon sync error %d\n", rc);
+                                       "LustreError: Debug_daemon sync error %d\n", rc);
                                 goto out;
                         }
                         if (debug_daemon_state.stopped)
@@ -406,12 +406,12 @@ void portals_debug_print(void)
 
         while (start1 < end1) {
                 int count = MIN(1024, end1 - start1);
-                printk("%*s", count, start1);
+                printk("LustreError: %*s", count, start1);
                 start1 += 1024;
         }
         while (start2 < end2) {
                 int count = MIN(1024, end2 - start2);
-                printk("%*s", count, start2);
+                printk("LustreError: %*s", count, start2);
                 start2 += 1024;
         }
 }
@@ -426,7 +426,7 @@ void portals_debug_dumplog(void)
         rc = kernel_thread(portals_do_debug_dumplog,
                            NULL, CLONE_VM | CLONE_FS | CLONE_FILES);
         if (rc < 0) {
-                printk(KERN_ERR "cannot start dump thread\n");
+                printk(KERN_ERR "LustreError: cannot start dump thread\n");
                 return;
         }
         sleep_on(&debug_ctlwq);
@@ -450,7 +450,7 @@ int portals_debug_daemon_start(char *file, unsigned int size)
         debug_daemon_state.lctl_event = 0;
         rc = kernel_thread(portals_debug_daemon, NULL, 0);
         if (rc < 0) {
-                printk(KERN_ERR "cannot start debug daemon thread\n");
+                printk(KERN_ERR "LustreError: cannot start debug daemon thread\n");
                 strncpy(debug_daemon_file_path, "\0", 1);
                 return rc;
         }
@@ -753,7 +753,7 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn,
         unsigned long debug_off;
 
         if (debug_buf == NULL) {
-                printk("portals_debug_msg: debug_buf is NULL!\n");
+                printk("LustreError: portals_debug_msg: debug_buf is NULL!\n");
                 return;
         }
 
@@ -784,7 +784,7 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn,
         max_nob = debug_size - debug_off + DEBUG_OVERFLOW;
         if (max_nob <= 0) {
                 spin_unlock_irqrestore(&portals_debug_lock, flags);
-                printk("logic error in portals_debug_msg: <0 bytes to write\n");
+                printk("LustreError: logic error in portals_debug_msg: <0 bytes to write\n");
                 return;
         }
 
@@ -828,11 +828,13 @@ portals_debug_msg(int subsys, int mask, char *file, const char *fn,
         /* Print to console, while msg is contiguous in debug_buf */
         /* NB safely terminated see above */
         if ((mask & D_EMERG) != 0)
-                printk(KERN_EMERG "%s", debug_buf + debug_off + prefix_nob);
+                printk(KERN_EMERG "LustreError: %s",
+                       debug_buf + debug_off + prefix_nob);
         if ((mask & D_ERROR) != 0)
-                printk(KERN_ERR   "%s", debug_buf + debug_off + prefix_nob);
+                printk(KERN_ERR   "LustreError: %s",
+                       debug_buf + debug_off + prefix_nob);
         else if (portal_printk)
-                printk("<%d>%s", portal_printk, debug_buf+debug_off+prefix_nob);
+                printk("<%d>LustreError: %s", portal_printk, debug_buf+debug_off+prefix_nob);
         base_offset = debug_off & 0xFFFF;
 
         debug_off += prefix_nob + msg_nob;
@@ -855,7 +857,7 @@ out:
 
 void portals_debug_set_level(unsigned int debug_level)
 {
-        printk("Setting portals debug level to %08x\n", debug_level);
+        printk("Lustre: Setting portals debug level to %08x\n", debug_level);
         portal_debug = debug_level;
 }
 
index 4948769..179240e 100644 (file)
@@ -467,7 +467,7 @@ static int init_kportals_module(void)
 
         rc = portals_debug_init(5 * 1024 * 1024);
         if (rc < 0) {
-                printk(KERN_ERR "portals_debug_init: %d\n", rc);
+                printk(KERN_ERR "LustreError: portals_debug_init: %d\n", rc);
                 return (rc);
         }
 
@@ -524,7 +524,7 @@ static void exit_kportals_module(void)
 
         rc = portals_debug_cleanup();
         if (rc)
-                printk(KERN_ERR "portals_debug_cleanup: %d\n", rc);
+                printk(KERN_ERR "LustreError: portals_debug_cleanup: %d\n", rc);
 }
 
 EXPORT_SYMBOL(lib_dispatch);
index 4d04ffb..22bdb45 100644 (file)
@@ -91,14 +91,14 @@ static int pingcli_callback(ptl_event_t *ev)
         magic = *(int *)(ev->mem_desc.start + ev->offset);
 
         if(magic != 0xcafebabe) {
-                printk ("Unexpected response \n");
+                printk ("LustreError: Unexpected response \n");
                 return 1;
         }
 
         if((i == count) || !count)
                 wake_up_process (client->tsk);
         else
-                printk ("Received response after timeout for %d\n",i);
+                printk ("LustreError: Received response after timeout for %d\n",i);
         return 1;
 }
 
@@ -229,15 +229,15 @@ pingcli_start(struct portal_ioctl_data *args)
                          pingcli_shutdown (1);
                          return NULL;
                 }
-                printk ("sent msg no %d", count);
+                printk ("Lustre: sent msg no %d", count);
 
                 set_current_state (TASK_INTERRUPTIBLE);
                 rc = schedule_timeout (20 * args->ioc_timeout);
                 if (rc == 0) {
-                        printk ("   ::  timeout .....\n");
+                        printk ("LustreError:   ::  timeout .....\n");
                 } else {
                         do_gettimeofday (&tv2);
-                        printk("   ::  Reply in %u usec\n",
+                        printk("Lustre:   ::  Reply in %u usec\n",
                                 (unsigned)((tv2.tv_sec - tv1.tv_sec)
                                  * 1000000 +  (tv2.tv_usec - tv1.tv_usec)));
                 }
index 873e11c..2a96f55 100644 (file)
@@ -121,7 +121,7 @@ int pingsrv_thread(void *arg)
                 
                 
                 if(magic != 0xdeadbeef) {
-                        printk("Unexpected Packet to the server\n");
+                        printk("LustreError: Unexpected Packet to the server\n");
                         
                 } 
                 memcpy (server->in_buf, &ping_bulk_magic, sizeof(ping_bulk_magic));
@@ -183,7 +183,7 @@ static int pingsrv_callback(ptl_event_t *ev)
         }
         server->evnt = *ev;
         
-        printk ("received ping from nid "LPX64" "
+        printk ("Lustre: received ping from nid "LPX64" "
                "(off=%u rlen=%u mlen=%u head=%x seq=%d size=%d)\n",
                ev->initiator.nid, ev->offset, ev->rlength, ev->mlength,
                *((int *)(ev->mem_desc.start + ev->offset)),
index 35e114b..c37db4c 100644 (file)
@@ -219,11 +219,11 @@ pingcli_start(struct portal_ioctl_data *args)
         set_current_state (TASK_INTERRUPTIBLE);
         rc = schedule_timeout (20 * args->ioc_timeout);
         if (rc == 0) {
-                printk (" Time out on the server\n");
+                printk ("LustreError: Time out on the server\n");
                 pingcli_shutdown (2);
                 return NULL;
         } else
-                printk("Received respose from the server \n");
+                printk("Lustre: Received respose from the server \n");
 
 
         pingcli_shutdown (2);
index 2b45a46..0d52e1f 100644 (file)
@@ -175,7 +175,7 @@ static int pingsrv_callback(ptl_event_t *ev)
         }
         server->evnt = *ev;
         
-        printk ("received ping from nid "LPX64" "
+        printk ("Lustre: received ping from nid "LPX64" "
                "(off=%u rlen=%u mlen=%u head=%x)\n",
                ev->initiator.nid, ev->offset, ev->rlength, ev->mlength,
                *((int *)(ev->mem_desc.start + ev->offset)));