Commit 8d2dab89 authored by Alexander Boyko's avatar Alexander Boyko Committed by Greg Kroah-Hartman

staging: lustre: ptlrpc: race at req processing

Fix: 5c689e68 ("staging/lustre/ptlrpc: race at req processing")
decreased the race window, but does not remove it. Disable rq_resend
right after MSG_REPLAY flag set. Import lock protects two threads
from race between set/clear MSG_REPLAY and rq_resend flags.
Signed-off-by: default avatarAlexander Boyko <alexander_boyko@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5554
Xyratex-bug-id: MRP-1888
Reviewed-on: http://review.whamcloud.com/10735Reviewed-by: default avatarNiu Yawei <yawei.niu@intel.com>
Reviewed-by: default avatarMike Pershin <mike.pershin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 95a9cd32
...@@ -2714,6 +2714,10 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req, ...@@ -2714,6 +2714,10 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,
lustre_msg_add_flags(req->rq_reqmsg, MSG_REPLAY); lustre_msg_add_flags(req->rq_reqmsg, MSG_REPLAY);
spin_lock(&req->rq_lock);
req->rq_resend = 0;
spin_unlock(&req->rq_lock);
LASSERT(imp->imp_replayable); LASSERT(imp->imp_replayable);
/* Balanced in ptlrpc_free_committed, usually. */ /* Balanced in ptlrpc_free_committed, usually. */
ptlrpc_request_addref(req); ptlrpc_request_addref(req);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment