Whamcloud - gitweb
* Print portals error string in ptllnd warnings/errors
[fs/lustre-release.git] / lnet / klnds / ptllnd / ptllnd_cb.c
index 91772f9..d734ba8 100644 (file)
@@ -227,8 +227,9 @@ kptllnd_active_rdma(kptl_rx_t *rx, lnet_msg_t *lntmsg, int type,
         ptlrc = PtlMDBind(kptllnd_data.kptl_nih, tx->tx_rdma_md, 
                           PTL_UNLINK, &mdh);
         if (ptlrc != PTL_OK) {
-                CERROR("PtlMDBind(%s) failed: %d\n",
-                       libcfs_id2str(peer->peer_id), ptlrc);
+                CERROR("PtlMDBind(%s) failed: %s(%d)\n",
+                       libcfs_id2str(peer->peer_id),
+                       kptllnd_errtype2str(ptlrc), ptlrc);
                 tx->tx_status = -EIO;
                 kptllnd_tx_decref(tx);
                 return -EIO;
@@ -271,8 +272,9 @@ kptllnd_active_rdma(kptl_rx_t *rx, lnet_msg_t *lntmsg, int type,
                                0);                    /* offset */
 
         if (ptlrc != PTL_OK) {
-                CERROR("Ptl%s failed: %d\n", 
-                       (type == TX_TYPE_GET_RESPONSE) ? "Put" : "Get", ptlrc);
+                CERROR("Ptl%s failed: %s(%d)\n", 
+                       (type == TX_TYPE_GET_RESPONSE) ? "Put" : "Get",
+                       kptllnd_errtype2str(ptlrc), ptlrc);
                 
                 kptllnd_peer_close(peer, -EIO);
                 /* Everything (including this RDMA) queued on the peer will
@@ -648,6 +650,7 @@ kptllnd_watchdog(void *arg)
         int                 id = (long)arg;
         char                name[16];
         wait_queue_t        waitlink;
+        int                 stamp = 0;
         int                 peer_index = 0;
         unsigned long       deadline = jiffies;
         int                 timeout;
@@ -685,12 +688,13 @@ kptllnd_watchdog(void *arg)
                                 chunk = 1;
 
                         for (i = 0; i < chunk; i++) {
-                                kptllnd_peer_check_bucket(peer_index);
+                                kptllnd_peer_check_bucket(peer_index, stamp);
                                 peer_index = (peer_index + 1) %
                                      kptllnd_data.kptl_peer_hash_size;
                         }
 
                         deadline += p * HZ;
+                        stamp++;
                         continue;
                 }