Whamcloud - gitweb
Branch b1_6
authorbobijam <bobijam>
Thu, 29 May 2008 02:35:27 +0000 (02:35 +0000)
committerbobijam <bobijam>
Thu, 29 May 2008 02:35:27 +0000 (02:35 +0000)
b=13310
o=eeb
i=joahnn, nikita

The bug is that target_send_reply_msg() calls ptlrpc_error() if 'rc != 0', but
"difficult" replies may not be passed to rpc_error().

lustre/include/lustre_net.h
lustre/ldlm/ldlm_lib.c
lustre/ptlrpc/niobuf.c
lustre/ptlrpc/ptlrpc_module.c
lustre/tests/sanity.sh

index ce3a7a7..515cd9e 100644 (file)
@@ -638,6 +638,7 @@ static inline int ptlrpc_bulk_active (struct ptlrpc_bulk_desc *desc)
 #define PTLRPC_REPLY_EARLY           0x02
 int ptlrpc_send_reply(struct ptlrpc_request *req, int flags);
 int ptlrpc_reply(struct ptlrpc_request *req);
+int ptlrpc_send_error(struct ptlrpc_request *req, int difficult);
 int ptlrpc_error(struct ptlrpc_request *req);
 void ptlrpc_resend_req(struct ptlrpc_request *request);
 int ptlrpc_at_get_net_latency(struct ptlrpc_request *req);
index cb5c4ef..97f502f 100644 (file)
@@ -1596,7 +1596,7 @@ target_send_reply_msg (struct ptlrpc_request *req, int rc, int fail_id)
         if (rc) {
                 DEBUG_REQ(D_ERROR, req, "processing error (%d)", rc);
                 req->rq_status = rc;
-                return (ptlrpc_error(req));
+                return (ptlrpc_send_error(req, 1));
         } else {
                 DEBUG_REQ(D_NET, req, "sending reply");
         }
index f0e86c0..3b64084 100644 (file)
@@ -417,7 +417,7 @@ int ptlrpc_reply (struct ptlrpc_request *req)
         return (ptlrpc_send_reply (req, 0));
 }
 
-int ptlrpc_error(struct ptlrpc_request *req)
+int ptlrpc_send_error(struct ptlrpc_request *req, int may_be_difficult)
 {
         int rc;
         ENTRY;
@@ -430,10 +430,15 @@ int ptlrpc_error(struct ptlrpc_request *req)
 
         req->rq_type = PTL_RPC_MSG_ERR;
 
-        rc = ptlrpc_send_reply(req, 0);
+        rc = ptlrpc_send_reply(req, may_be_difficult);
         RETURN(rc);
 }
 
+int ptlrpc_error(struct ptlrpc_request *req)
+{
+        return ptlrpc_send_error(req, 0);
+}
+
 int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
 {
         int rc;
index 4f0e2a2..60eb510 100644 (file)
@@ -130,6 +130,7 @@ EXPORT_SYMBOL(ptlrpc_register_bulk);
 EXPORT_SYMBOL(ptlrpc_unregister_bulk);
 EXPORT_SYMBOL(ptlrpc_send_reply);
 EXPORT_SYMBOL(ptlrpc_reply);
+EXPORT_SYMBOL(ptlrpc_send_error);
 EXPORT_SYMBOL(ptlrpc_error);
 EXPORT_SYMBOL(ptlrpc_resend_req);
 EXPORT_SYMBOL(ptl_send_rpc);
index 77febfa..cfc8eba 100644 (file)
@@ -7,8 +7,8 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
-# bug number for skipped test:  13297 2108 9789 3637 9789 3561 12622 15528/2330 13310 10764
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27u   42a  42b  42c  42d  45   51d   62         74b   75 $SANITY_EXCEPT" }
+# bug number for skipped test:  13297 2108 9789 3637 9789 3561 12622 15528/2330 10764
+ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27u   42a  42b  42c  42d  45   51d   62         75 $SANITY_EXCEPT" }
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 # Tests that fail on uml, maybe elsewhere, FIXME