From afeba23b78b96aa4720eb777a4fff6a0ee6da4f1 Mon Sep 17 00:00:00 2001 From: bobijam <bobijam> Date: Thu, 29 May 2008 02:52:13 +0000 Subject: [PATCH] Branch HEAD 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 | 1 + lustre/ldlm/ldlm_lib.c | 2 +- lustre/ptlrpc/niobuf.c | 9 +++++++-- lustre/ptlrpc/ptlrpc_module.c | 1 + lustre/tests/sanity.sh | 4 ++-- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 04098d3a25..097f7fd0b9 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -709,6 +709,7 @@ static inline int ptlrpc_bulk_active (struct ptlrpc_bulk_desc *desc) int ptlrpc_send_reply(struct ptlrpc_request *req, int); 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 ptl_send_rpc(struct ptlrpc_request *request, int noreply); diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 5d2e4641fd..063f9d761c 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1866,7 +1866,7 @@ int target_send_reply_msg(struct ptlrpc_request *req, int rc, int fail_id) if (unlikely(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"); } diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index cb92a0ad19..4f71dcb0e8 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -381,7 +381,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; @@ -397,10 +397,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; diff --git a/lustre/ptlrpc/ptlrpc_module.c b/lustre/ptlrpc/ptlrpc_module.c index 1bf4afd32e..21c97cb7b3 100644 --- a/lustre/ptlrpc/ptlrpc_module.c +++ b/lustre/ptlrpc/ptlrpc_module.c @@ -136,6 +136,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); diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index e9e1e60d76..f63b443b7b 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -7,8 +7,8 @@ set -e ONLY=${ONLY:-"$*"} -# bug number for skipped test: 2108 9789 3637 9789 3561 12622 12653 12653 13310 10764 -ALWAYS_EXCEPT=" 42a 42b 42c 42d 45 51d 65a 65e 74b 75 $SANITY_EXCEPT" +# bug number for skipped test: 2108 9789 3637 9789 3561 12653 12653 10764 +ALWAYS_EXCEPT=" 42a 42b 42c 42d 45 65a 65e 75 $SANITY_EXCEPT" # bug number for skipped test: 2108 9789 3637 9789 3561 5188/5749 1443 #ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27m 42a 42b 42c 42d 45 68 76"} # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT! -- GitLab