From 215a5858c146ec7536ab6fae722059ba29395fcd Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 11 May 2005 00:07:36 +0000 Subject: [PATCH] Branch b1_4 b=5493 add asserts to help track this down --- lustre/obdclass/genops.c | 2 ++ lustre/ptlrpc/client.c | 2 ++ lustre/ptlrpc/recov_thread.c | 1 + 3 files changed, 5 insertions(+) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 83de073..2cee678 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -587,6 +587,8 @@ static void import_handle_addref(void *import) struct obd_import *class_import_get(struct obd_import *import) { + LASSERT(atomic_read(&import->imp_refcount) >= 0); + LASSERT(atomic_read(&import->imp_refcount) < 0x5a5a5a); atomic_inc(&import->imp_refcount); CDEBUG(D_IOCTL, "import %p refcount=%d\n", import, atomic_read(&import->imp_refcount)); diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 5044fe5..a2deced 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -190,6 +190,8 @@ struct ptlrpc_request *ptlrpc_prep_req(struct obd_import *imp, int opcode, LASSERT((unsigned long)imp > 0x1000); LASSERT(imp != LP_POISON); + LASSERT((unsigned long)imp->imp_client > 0x1000); + LASSERT(imp->imp_client != LP_POISON); OBD_ALLOC(request, sizeof(*request)); if (!request) { diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index 19aea6c..3a78b18 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -272,6 +272,7 @@ static int log_commit_thread(void *arg) sending_list = &lcm->lcm_llcd_pending; resend: + import = NULL; if (lcm->lcm_flags & LLOG_LCM_FL_EXIT) { lcm->lcm_llcd_maxfree = 0; lcm->lcm_llcd_minfree = 0; -- 1.8.3.1