From 6a201d7bef929967fbfa2e0c53163548003cc5fe Mon Sep 17 00:00:00 2001 From: youfeng Date: Fri, 26 Sep 2003 03:59:10 +0000 Subject: [PATCH] b=1615 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. --- lnet/klnds/gmlnd/gmlnd_cb.c | 4 ++-- lnet/klnds/gmlnd/gmnal.c | 4 ++-- lnet/klnds/lgmlnd/lgmnal_utils.c | 18 +++++++-------- lnet/klnds/qswlnd/qswlnd.c | 4 ++-- lnet/klnds/scimaclnd/scimacnal_cb.c | 2 +- lnet/klnds/socklnd/socklnd.c | 6 ++--- lnet/klnds/toelnd/toenal.c | 4 ++-- lnet/libcfs/debug.c | 32 ++++++++++++++------------- lnet/libcfs/module.c | 4 ++-- lnet/tests/ping_cli.c | 10 ++++----- lnet/tests/ping_srv.c | 4 ++-- lnet/tests/sping_cli.c | 4 ++-- lnet/tests/sping_srv.c | 2 +- lustre/portals/knals/gmnal/gmnal.c | 4 ++-- lustre/portals/knals/gmnal/gmnal_cb.c | 4 ++-- lustre/portals/knals/lgmnal/lgmnal_utils.c | 18 +++++++-------- lustre/portals/knals/qswnal/qswnal.c | 4 ++-- lustre/portals/knals/scimacnal/scimacnal_cb.c | 2 +- lustre/portals/knals/socknal/socknal.c | 6 ++--- lustre/portals/knals/toenal/toenal.c | 4 ++-- lustre/portals/libcfs/debug.c | 32 ++++++++++++++------------- lustre/portals/libcfs/module.c | 4 ++-- lustre/portals/tests/ping_cli.c | 10 ++++----- lustre/portals/tests/ping_srv.c | 4 ++-- lustre/portals/tests/sping_cli.c | 4 ++-- lustre/portals/tests/sping_srv.c | 2 +- 26 files changed, 100 insertions(+), 96 deletions(-) diff --git a/lnet/klnds/gmlnd/gmlnd_cb.c b/lnet/klnds/gmlnd/gmlnd_cb.c index 3d4c86d..4728eca 100644 --- a/lnet/klnds/gmlnd/gmlnd_cb.c +++ b/lnet/klnds/gmlnd/gmlnd_cb.c @@ -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; diff --git a/lnet/klnds/gmlnd/gmnal.c b/lnet/klnds/gmlnd/gmnal.c index 0cffc158..24708f7 100644 --- a/lnet/klnds/gmlnd/gmnal.c +++ b/lnet/klnds/gmlnd/gmnal.c @@ -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; } diff --git a/lnet/klnds/lgmlnd/lgmnal_utils.c b/lnet/klnds/lgmlnd/lgmnal_utils.c index 8a91ca4..d60e36a 100644 --- a/lnet/klnds/lgmlnd/lgmnal_utils.c +++ b/lnet/klnds/lgmlnd/lgmnal_utils.c @@ -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; } diff --git a/lnet/klnds/qswlnd/qswlnd.c b/lnet/klnds/qswlnd/qswlnd.c index d4ee960..897904f 100644 --- a/lnet/klnds/qswlnd/qswlnd.c +++ b/lnet/klnds/qswlnd/qswlnd.c @@ -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", diff --git a/lnet/klnds/scimaclnd/scimacnal_cb.c b/lnet/klnds/scimaclnd/scimacnal_cb.c index cc0c102..7d5796e 100644 --- a/lnet/klnds/scimaclnd/scimacnal_cb.c +++ b/lnet/klnds/scimaclnd/scimacnal_cb.c @@ -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); } } diff --git a/lnet/klnds/socklnd/socklnd.c b/lnet/klnds/socklnd/socklnd.c index e7232a0..2b2a112 100644 --- a/lnet/klnds/socklnd/socklnd.c +++ b/lnet/klnds/socklnd/socklnd.c @@ -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); diff --git a/lnet/klnds/toelnd/toenal.c b/lnet/klnds/toelnd/toenal.c index 77ee473..dc7e447 100644 --- a/lnet/klnds/toelnd/toenal.c +++ b/lnet/klnds/toelnd/toenal.c @@ -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); diff --git a/lnet/libcfs/debug.c b/lnet/libcfs/debug.c index 16ef401..a1d124e 100644 --- a/lnet/libcfs/debug.c +++ b/lnet/libcfs/debug.c @@ -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; } diff --git a/lnet/libcfs/module.c b/lnet/libcfs/module.c index 4948769..179240e 100644 --- a/lnet/libcfs/module.c +++ b/lnet/libcfs/module.c @@ -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); diff --git a/lnet/tests/ping_cli.c b/lnet/tests/ping_cli.c index 4d04ffb..22bdb45 100644 --- a/lnet/tests/ping_cli.c +++ b/lnet/tests/ping_cli.c @@ -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))); } diff --git a/lnet/tests/ping_srv.c b/lnet/tests/ping_srv.c index 873e11c..2a96f55 100644 --- a/lnet/tests/ping_srv.c +++ b/lnet/tests/ping_srv.c @@ -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)), diff --git a/lnet/tests/sping_cli.c b/lnet/tests/sping_cli.c index 35e114b..c37db4c 100644 --- a/lnet/tests/sping_cli.c +++ b/lnet/tests/sping_cli.c @@ -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); diff --git a/lnet/tests/sping_srv.c b/lnet/tests/sping_srv.c index 2b45a46..0d52e1f 100644 --- a/lnet/tests/sping_srv.c +++ b/lnet/tests/sping_srv.c @@ -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))); diff --git a/lustre/portals/knals/gmnal/gmnal.c b/lustre/portals/knals/gmnal/gmnal.c index 0cffc158..24708f7 100644 --- a/lustre/portals/knals/gmnal/gmnal.c +++ b/lustre/portals/knals/gmnal/gmnal.c @@ -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; } diff --git a/lustre/portals/knals/gmnal/gmnal_cb.c b/lustre/portals/knals/gmnal/gmnal_cb.c index 3d4c86d..4728eca 100644 --- a/lustre/portals/knals/gmnal/gmnal_cb.c +++ b/lustre/portals/knals/gmnal/gmnal_cb.c @@ -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; diff --git a/lustre/portals/knals/lgmnal/lgmnal_utils.c b/lustre/portals/knals/lgmnal/lgmnal_utils.c index 8a91ca4..d60e36a 100644 --- a/lustre/portals/knals/lgmnal/lgmnal_utils.c +++ b/lustre/portals/knals/lgmnal/lgmnal_utils.c @@ -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; } diff --git a/lustre/portals/knals/qswnal/qswnal.c b/lustre/portals/knals/qswnal/qswnal.c index d4ee960..897904f 100644 --- a/lustre/portals/knals/qswnal/qswnal.c +++ b/lustre/portals/knals/qswnal/qswnal.c @@ -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", diff --git a/lustre/portals/knals/scimacnal/scimacnal_cb.c b/lustre/portals/knals/scimacnal/scimacnal_cb.c index cc0c102..7d5796e 100644 --- a/lustre/portals/knals/scimacnal/scimacnal_cb.c +++ b/lustre/portals/knals/scimacnal/scimacnal_cb.c @@ -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); } } diff --git a/lustre/portals/knals/socknal/socknal.c b/lustre/portals/knals/socknal/socknal.c index e7232a0..2b2a112 100644 --- a/lustre/portals/knals/socknal/socknal.c +++ b/lustre/portals/knals/socknal/socknal.c @@ -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); diff --git a/lustre/portals/knals/toenal/toenal.c b/lustre/portals/knals/toenal/toenal.c index 77ee473..dc7e447 100644 --- a/lustre/portals/knals/toenal/toenal.c +++ b/lustre/portals/knals/toenal/toenal.c @@ -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); diff --git a/lustre/portals/libcfs/debug.c b/lustre/portals/libcfs/debug.c index 16ef401..a1d124e 100644 --- a/lustre/portals/libcfs/debug.c +++ b/lustre/portals/libcfs/debug.c @@ -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; } diff --git a/lustre/portals/libcfs/module.c b/lustre/portals/libcfs/module.c index 4948769..179240e 100644 --- a/lustre/portals/libcfs/module.c +++ b/lustre/portals/libcfs/module.c @@ -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); diff --git a/lustre/portals/tests/ping_cli.c b/lustre/portals/tests/ping_cli.c index 4d04ffb..22bdb45 100644 --- a/lustre/portals/tests/ping_cli.c +++ b/lustre/portals/tests/ping_cli.c @@ -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))); } diff --git a/lustre/portals/tests/ping_srv.c b/lustre/portals/tests/ping_srv.c index 873e11c..2a96f55 100644 --- a/lustre/portals/tests/ping_srv.c +++ b/lustre/portals/tests/ping_srv.c @@ -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)), diff --git a/lustre/portals/tests/sping_cli.c b/lustre/portals/tests/sping_cli.c index 35e114b..c37db4c 100644 --- a/lustre/portals/tests/sping_cli.c +++ b/lustre/portals/tests/sping_cli.c @@ -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); diff --git a/lustre/portals/tests/sping_srv.c b/lustre/portals/tests/sping_srv.c index 2b45a46..0d52e1f 100644 --- a/lustre/portals/tests/sping_srv.c +++ b/lustre/portals/tests/sping_srv.c @@ -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))); -- 1.8.3.1