Whamcloud - gitweb
exclude fail import and some debug output for fake requests.
authorshadow <shadow>
Wed, 10 Jun 2009 18:26:36 +0000 (18:26 +0000)
committershadow <shadow>
Wed, 10 Jun 2009 18:26:36 +0000 (18:26 +0000)
Branch b1_8
b=18357
i=green
i=panda

lustre/include/lustre_net.h
lustre/ptlrpc/client.c

index 6734dec..5fce5c9 100644 (file)
@@ -323,7 +323,8 @@ struct ptlrpc_request {
                 rq_packed_final:1,  /* packed final reply */
                 rq_sent_final:1,    /* stop sending early replies */
                 rq_hp:1,            /* high priority RPC */
-                rq_at_linked:1;     /* link into service's srv_at_array */
+                rq_at_linked:1,     /* link into service's srv_at_array */
+                rq_fake:1;          /* fake request - just for timeout only */
         enum rq_phase rq_phase;     /* one of RQ_PHASE_* */
         enum rq_phase rq_next_phase; /* one of RQ_PHASE_* to be used next */
         atomic_t rq_refcount;   /* client-side refcount for SENT race,
index 3895f0d..2652070 100644 (file)
@@ -645,6 +645,7 @@ struct ptlrpc_request *ptlrpc_prep_fakereq(struct obd_import *imp,
         request->rq_receiving_reply = 0;
         request->rq_must_unlink = 0;
         request->rq_no_delay = request->rq_no_resend = 1;
+        request->rq_fake = 1;
 
         spin_lock_init(&request->rq_lock);
         CFS_INIT_LIST_HEAD(&request->rq_list);
@@ -1387,9 +1388,10 @@ int ptlrpc_check_set(struct ptlrpc_request_set *set)
                 CDEBUG(D_RPCTRACE, "Completed RPC pname:cluuid:pid:xid:nid:"
                        "opc %s:%s:%d:x"LPU64":%s:%d\n", cfs_curproc_comm(),
                        imp->imp_obd->obd_uuid.uuid,
-                       lustre_msg_get_status(req->rq_reqmsg), req->rq_xid,
+                       req->rq_reqmsg ? lustre_msg_get_status(req->rq_reqmsg):-1,
+                       req->rq_xid,
                        libcfs_nid2str(imp->imp_connection->c_peer.nid),
-                       lustre_msg_get_opc(req->rq_reqmsg));
+                       req->rq_reqmsg ? lustre_msg_get_opc(req->rq_reqmsg) : -1);
 
                 spin_lock(&imp->imp_lock);
                 /* Request already may be not on sending or delaying list. This
@@ -1443,6 +1445,9 @@ int ptlrpc_expire_one_request(struct ptlrpc_request *req, int async_unlink)
                 RETURN(1);
         }
 
+        if (req->rq_fake)
+                RETURN(1);
+
         atomic_inc(&imp->imp_timeouts);
 
         /* The DLM server doesn't want recovery run on its imports. */