Whamcloud - gitweb
Branch b1_8
authorbobijam <bobijam>
Thu, 16 Jul 2009 01:32:15 +0000 (01:32 +0000)
committerbobijam <bobijam>
Thu, 16 Jul 2009 01:32:15 +0000 (01:32 +0000)
b=17682
i=alexey.lyashkov (shadow)
i=sheng.yang

DLM debug message improvement.

lustre/ldlm/ldlm_lockd.c
lustre/ldlm/ldlm_request.c
lustre/ptlrpc/pinger.c

index 75019be..03b5340 100644 (file)
@@ -477,7 +477,6 @@ int ldlm_del_waiting_lock(struct ldlm_lock *lock)
                  * from a list */
                 LDLM_LOCK_PUT(lock);
 
-        LDLM_DEBUG(lock, "%s", ret == 0 ? "wasn't waiting" : "removed");
         return ret;
 }
 
@@ -1339,8 +1338,6 @@ int ldlm_request_cancel(struct ptlrpc_request *req,
         if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY)
                 RETURN(0);
 
-        LDLM_DEBUG_NOLOCK("server-side cancel handler START: %d locks",
-                          count - first);
         for (i = first; i < count; i++) {
                 lock = ldlm_handle2lock(&dlm_req->lock_handle[i]);
                 if (!lock) {
@@ -1370,7 +1367,6 @@ int ldlm_request_cancel(struct ptlrpc_request *req,
                 ldlm_reprocess_all(pres);
                 ldlm_resource_putref(pres);
         }
-        LDLM_DEBUG_NOLOCK("server-side cancel handler END");
         RETURN(done);
 }
 
index 3621d9d..54a5211 100644 (file)
@@ -533,7 +533,6 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
                 memcpy(lvb, lock->l_lvb_data, lvb_len);
         }
 
-        LDLM_DEBUG(lock, "client-side enqueue END");
         EXIT;
 cleanup:
         if (cleanup_phase == 1 && rc)
@@ -674,7 +673,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
         if (is_replay) {
                 lock = ldlm_handle2lock(lockh);
                 LASSERT(lock != NULL);
-                LDLM_DEBUG(lock, "client-side enqueue START");
                 LASSERT(exp == lock->l_conn_export);
         } else {
                 lock = ldlm_lock_create(ns, res_id, einfo->ei_type,
@@ -757,7 +755,6 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
                 RETURN(0);
         }
 
-        LDLM_DEBUG(lock, "sending request");
         rc = ptlrpc_queue_wait(req);
         err = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, policy ? 1 : 0,
                                     einfo->ei_mode, flags, lvb, lvb_len,
index ef33565..931775b 100644 (file)
@@ -50,7 +50,7 @@
 
 struct semaphore pinger_sem;
 static struct list_head pinger_imports = CFS_LIST_HEAD_INIT(pinger_imports);
-static struct list_head timeout_list = CFS_LIST_HEAD_INIT(timeout_list); 
+static struct list_head timeout_list = CFS_LIST_HEAD_INIT(timeout_list);
 
 struct ptlrpc_request *
 ptlrpc_prep_ping(struct obd_import *imp)
@@ -147,7 +147,7 @@ static void ptlrpc_update_next_ping(struct obd_import *imp, int soon)
         /* May harmlessly race with ptlrpc_update_next_ping() */
         imp->imp_next_ping = cfs_time_add(ctime, dtime);
 
-        CDEBUG(D_HA, "Setting %s next ping to "CFS_TIME_T" ("CFS_TIME_T")\n",
+        CDEBUG(D_INFO, "Setting %s next ping to "CFS_TIME_T" ("CFS_TIME_T")\n",
                obd2cli_tgt(imp->imp_obd), imp->imp_next_ping, dtime);
 
 #endif /* ENABLE_PINGER */
@@ -169,17 +169,17 @@ cfs_duration_t pinger_check_timeout(cfs_time_t time)
         struct timeout_item *item;
         cfs_time_t timeout = PING_INTERVAL;
 
-       /* The timeout list is a increase order sorted list */
+        /* The timeout list is a increase order sorted list */
         mutex_down(&pinger_sem);
         list_for_each_entry(item, &timeout_list, ti_chain) {
-               int ti_timeout = item->ti_timeout;
-               if (timeout > ti_timeout)
-                        timeout = ti_timeout;
-               break;
-       }
+                int ti_timeout = item->ti_timeout;
+                if (timeout > ti_timeout)
+                         timeout = ti_timeout;
+                break;
+        }
         mutex_up(&pinger_sem);
-        
-       return cfs_time_sub(cfs_time_add(time, cfs_time_seconds(timeout)),
+
+        return cfs_time_sub(cfs_time_add(time, cfs_time_seconds(timeout)),
                                          cfs_time_current());
 }
 
@@ -431,7 +431,7 @@ struct timeout_item* ptlrpc_new_timeout(int time, enum timeout_event event,
                                         timeout_cb_t cb, void *data)
 {
         struct timeout_item *ti;
-        
+
         OBD_ALLOC_PTR(ti);
         if (!ti)
                 return(NULL);
@@ -442,7 +442,7 @@ struct timeout_item* ptlrpc_new_timeout(int time, enum timeout_event event,
         ti->ti_event = event;
         ti->ti_cb = cb;
         ti->ti_cb_data = data;
-        
+
         return ti;
 }
 
@@ -476,7 +476,7 @@ out:
         return item;
 }
 
-/* Add a client_obd to the timeout event list, when timeout(@time) 
+/* Add a client_obd to the timeout event list, when timeout(@time)
  * happens, the callback(@cb) will be called.
  */
 int ptlrpc_add_timeout_client(int time, enum timeout_event event,
@@ -494,15 +494,15 @@ int ptlrpc_add_timeout_client(int time, enum timeout_event event,
         list_add(obd_list, &ti->ti_obd_list);
         mutex_up(&pinger_sem);
         return 0;
-}           
+}
 
-int ptlrpc_del_timeout_client(struct list_head *obd_list, 
+int ptlrpc_del_timeout_client(struct list_head *obd_list,
                               enum timeout_event event)
 {
         struct timeout_item *ti = NULL, *item;
 
         if (list_empty(obd_list))
-                return 0;  
+                return 0;
         mutex_down(&pinger_sem);
         list_del_init(obd_list);
         /**
@@ -522,7 +522,7 @@ int ptlrpc_del_timeout_client(struct list_head *obd_list,
         }
         mutex_up(&pinger_sem);
         return 0;
-}  
+}
 
 int ptlrpc_pinger_remove_timeouts(void)
 {
@@ -880,13 +880,13 @@ int ptlrpc_add_timeout_client(int time, enum timeout_event event,
                               struct list_head *obd_list)
 {
         return 0;
-}           
+}
 
 int ptlrpc_del_timeout_client(struct list_head *obd_list,
                               enum timeout_event event)
 {
         return 0;
-}  
+}
 
 int ptlrpc_pinger_add_import(struct obd_import *imp)
 {