Whamcloud - gitweb
LU-1095 debug: Quiet/cleanup various common console messages
[fs/lustre-release.git] / lustre / ldlm / ldlm_request.c
index bc78f92..f98c8dd 100644 (file)
@@ -105,12 +105,17 @@ int ldlm_expired_completion_wait(void *data)
                 if (ptlrpc_check_suspend())
                         RETURN(0);
 
-                LDLM_ERROR(lock, "lock timed out (enqueued at "CFS_TIME_T", "
-                           CFS_DURATION_T"s ago); not entering recovery in "
-                           "server code, just going back to sleep",
-                           lock->l_last_activity,
-                           cfs_time_sub(cfs_time_current_sec(),
-                           lock->l_last_activity));
+               LCONSOLE_WARN("lock timed out (enqueued at "CFS_TIME_T", "
+                             CFS_DURATION_T"s ago)\n",
+                             lock->l_last_activity,
+                             cfs_time_sub(cfs_time_current_sec(),
+                                          lock->l_last_activity));
+               LDLM_DEBUG(lock, "lock timed out (enqueued at "CFS_TIME_T", "
+                          CFS_DURATION_T"s ago); not entering recovery in "
+                          "server code, just going back to sleep",
+                          lock->l_last_activity,
+                          cfs_time_sub(cfs_time_current_sec(),
+                                       lock->l_last_activity));
                 if (cfs_time_after(cfs_time_current(), next_dump)) {
                         last_dump = next_dump;
                         next_dump = cfs_time_shift(300);
@@ -1233,10 +1238,11 @@ int ldlm_cli_cancel_req(struct obd_export *exp, cfs_list_t *cancels,
                         ptlrpc_req_finished(req);
                         continue;
                 } else if (rc != ELDLM_OK) {
-                       if (rc != -ESHUTDOWN)
-                               CERROR("Got rc %d from cancel RPC: canceling "
-                                      "anyway\n", rc);
-                        break;
+                       /* -ESHUTDOWN is common on umount */
+                       CDEBUG_LIMIT(rc == -ESHUTDOWN ? D_DLMTRACE : D_ERROR,
+                                    "Got rc %d from cancel RPC: "
+                                    "canceling anyway\n", rc);
+                       break;
                 }
                 sent = count;
                 break;
@@ -1870,11 +1876,11 @@ int ldlm_cli_cancel_list(cfs_list_t *cancels, int count,
                                                   cancels, 1, flags);
                 }
 
-                if (res < 0) {
-                       if (res != -ESHUTDOWN)
-                               CERROR("ldlm_cli_cancel_list: %d\n", res);
-                        res = count;
-                }
+               if (res < 0) {
+                       CDEBUG_LIMIT(res == -ESHUTDOWN ? D_DLMTRACE : D_ERROR,
+                                    "ldlm_cli_cancel_list: %d\n", res);
+                       res = count;
+               }
 
                 count -= res;
                 ldlm_lock_list_put(cancels, l_bl_ast, res);