From c22a0e42df9385674a750ebac1bdf2efdc504518 Mon Sep 17 00:00:00 2001 From: braam Date: Sun, 10 Nov 2002 08:34:42 +0000 Subject: [PATCH 1/1] - change the OST / MDT thread names to also include the host pid in case of UML to aid debugging. --- lustre/ldlm/ldlm_lockd.c | 4 ++-- lustre/mds/handler.c | 2 +- lustre/ost/ost_handler.c | 2 +- lustre/ptlrpc/service.c | 5 +++++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index dc5bc64..3319f03 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -621,7 +621,7 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *buf) for (i = 0; i < LDLM_NUM_THREADS; i++) { char name[32]; - sprintf(name, "lustre_dlm_%02d", i); + sprintf(name, "ldlm_%02d", i); rc = ptlrpc_start_thread(obddev, ldlm->ldlm_cancel_service, name); if (rc) { @@ -633,7 +633,7 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *buf) for (i = 0; i < LDLM_NUM_THREADS; i++) { char name[32]; - sprintf(name, "lustre_dlm_%02d", i); + sprintf(name, "ldlm_%02d", i); rc = ptlrpc_start_thread(obddev, ldlm->ldlm_cb_service, name); if (rc) { CERROR("cannot start LDLM thread #%d: rc %d\n", i, rc); diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 7f34755..90060cf 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1489,7 +1489,7 @@ static int mdt_setup(struct obd_device *obddev, obd_count len, void *buf) for (i = 0; i < MDT_NUM_THREADS; i++) { char name[32]; - sprintf(name, "lustre_MDT_%02d", i); + sprintf(name, "ll_mdt_%02d", i); rc = ptlrpc_start_thread(obddev, mds->mds_service, name); if (rc) { CERROR("cannot start MDT thread #%d: rc %d\n", i, rc); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index e1bbaec..de4414a 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -620,7 +620,7 @@ static int ost_setup(struct obd_device *obddev, obd_count len, void *buf) for (i = 0; i < OST_NUM_THREADS; i++) { char name[32]; - sprintf(name, "lustre_ost_%02d", i); + sprintf(name, "ll_ost_%02d", i); err = ptlrpc_start_thread(obddev, ost->ost_service, name); if (err) { CERROR("error starting thread #%d: rc %d\n", i, err); diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index e80a8de..5e6a626 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -249,7 +249,12 @@ static int ptlrpc_main(void *arg) spin_unlock_irq(¤t->sigmask_lock); #endif +#ifdef __arch_um__ + sprintf(current->comm, "%s|%d", + data->name, current->thread.extern_pid); +#else strcpy(current->comm, data->name); +#endif unlock_kernel(); OBD_ALLOC(event, sizeof(*event)); -- 1.8.3.1