Whamcloud - gitweb
Branch b1_4
authornathan <nathan>
Wed, 11 May 2005 00:07:36 +0000 (00:07 +0000)
committernathan <nathan>
Wed, 11 May 2005 00:07:36 +0000 (00:07 +0000)
b=5493
add asserts to help track this down

lustre/obdclass/genops.c
lustre/ptlrpc/client.c
lustre/ptlrpc/recov_thread.c

index 83de073..2cee678 100644 (file)
@@ -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));
index 5044fe5..a2deced 100644 (file)
@@ -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) {
index 19aea6c..3a78b18 100644 (file)
@@ -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;