Whamcloud - gitweb
b=17682 Improve debug capability for production systems
authorDmitry Zogin <dmitry.zoguine@oracle.com>
Thu, 16 Sep 2010 12:16:41 +0000 (08:16 -0400)
committerAndrew Perepechko <andrew.perepechko@sun.com>
Thu, 16 Sep 2010 12:28:07 +0000 (16:28 +0400)
 Improve performance of D_RPCTRACE debugging.

 i=andreas.dilger
 i=andrew.perepechko

lustre/mds/mds_reint.c
lustre/ptlrpc/client.c
lustre/ptlrpc/events.c

index 7703b8a..533027b 100644 (file)
@@ -223,7 +223,6 @@ int mds_finish_transno(struct mds_obd *mds, struct inode **inodes, void *handle,
         __u64 transno, prev_transno;
         int err;
         loff_t off;
-        int log_pri = D_RPCTRACE;
         struct inode *inode = inodes ? inodes[0] : NULL;
         int version_set = handle ? 1 : 0;
         ENTRY;
@@ -335,23 +334,21 @@ int mds_finish_transno(struct mds_obd *mds, struct inode **inodes, void *handle,
                         mds_commit_cb(obd, transno, exp, err);
         }
 
+        DEBUG_REQ(err ? D_ERROR : D_INFO, req,
+                  "wrote trans #"LPU64" rc %d client %s at idx %u: err = %d",
+                  transno, rc, lcd->lcd_uuid, med->med_lr_idx, err);
+
         if (err) {
-                log_pri = D_ERROR;
                 if (rc == 0)
                         rc = err;
         }
 
-        DEBUG_REQ(log_pri, req,
-                  "wrote trans #"LPU64" rc %d client %s at idx %u: err = %d",
-                  transno, rc, lcd->lcd_uuid, med->med_lr_idx, err);
-
         err = mds_lov_write_objids(obd);
         if (err) {
-                log_pri = D_ERROR;
+                CERROR("wrote objids: err = %d\n", err);
                 if (rc == 0)
                         rc = err;
         }
-        CDEBUG(log_pri, "wrote objids: err = %d\n", err);
 
 commit:
         err = fsfilt_commit(obd, inode, handle, 0);
index 4af9a73..e56933d 100644 (file)
@@ -1911,7 +1911,7 @@ void ptlrpc_free_committed(struct obd_import *imp)
 
         if (imp->imp_peer_committed_transno == imp->imp_last_transno_checked &&
             imp->imp_generation == imp->imp_last_generation_checked) {
-                CDEBUG(D_RPCTRACE, "%s: skip recheck: last_committed "LPU64"\n",
+                CDEBUG(D_INFO, "%s: skip recheck: last_committed "LPU64"\n",
                        imp->imp_obd->obd_name, imp->imp_peer_committed_transno);
                 EXIT;
                 return;
@@ -1946,7 +1946,7 @@ void ptlrpc_free_committed(struct obd_import *imp)
                         break;
                 }
 
-                DEBUG_REQ(D_RPCTRACE, req, "commit (last_committed "LPU64")",
+                DEBUG_REQ(D_INFO, req, "commit (last_committed "LPU64")",
                           imp->imp_peer_committed_transno);
 free_req:
                 spin_lock(&req->rq_lock);
index 3f87642..d820570 100644 (file)
@@ -111,7 +111,7 @@ void reply_in_callback(lnet_event_t *ev)
 
         if (ev->type == LNET_EVENT_UNLINK) {
                 LASSERT(ev->unlinked);
-                DEBUG_REQ(D_RPCTRACE, req, "unlink");
+                DEBUG_REQ(D_NET, req, "unlink");
                 goto out_wake;
         }
 
@@ -285,7 +285,7 @@ void request_in_callback(lnet_event_t *ev)
         CFS_INIT_LIST_HEAD(&req->rq_exp_list);
         atomic_set(&req->rq_refcount, 1);
         if (ev->type == LNET_EVENT_PUT)
-                DEBUG_REQ(D_RPCTRACE, req, "incoming req");
+                DEBUG_REQ(D_NET, req, "incoming req");
 
         spin_lock(&service->srv_lock);