Whamcloud - gitweb
b=23820 Handle unsent requests with rq_net_err in ptlrpc_check_set()
[fs/lustre-release.git] / lustre / ptlrpc / client.c
index 60d6206..214be9c 100644 (file)
@@ -75,7 +75,7 @@ struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid)
 
         err = ptlrpc_uuid_to_peer(uuid, &peer, &self);
         if (err != 0) {
-                CDEBUG(D_NETERROR, "cannot find peer %s!\n", uuid->uuid);
+                CNETERR("cannot find peer %s!\n", uuid->uuid);
                 return NULL;
         }
 
@@ -1445,12 +1445,6 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
                         LASSERT(req->rq_next_phase != req->rq_phase);
                         LASSERT(req->rq_next_phase != RQ_PHASE_UNDEFINED);
 
-                        /* Abort the bulk, if the request itself has been
-                         * aborted, for instance, on a client eviction. */
-                        if (req->rq_err && req->rq_status == -EINTR &&
-                            req->rq_bulk != NULL)
-                                ptlrpc_abort_bulk(req->rq_bulk);
-
                         /*
                          * Skip processing until reply is unlinked. We
                          * can't return to pool before that and we can't
@@ -1500,6 +1494,15 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
                         if (ptlrpc_client_recv_or_unlink(req) ||
                             ptlrpc_client_bulk_active(req))
                                 continue;
+                        /* If there is no need to resend, fail it now. */
+                        if (req->rq_no_resend) {
+                                if (req->rq_status == 0)
+                                        req->rq_status = -EIO;
+                                ptlrpc_rqphase_move(req, RQ_PHASE_INTERPRET);
+                                GOTO(interpret, req->rq_status);
+                        } else {
+                                continue;
+                        }
                 }
 
                 if (req->rq_err) {
@@ -2285,7 +2288,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;
@@ -2324,7 +2327,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:
                 cfs_spin_lock(&req->rq_lock);