Whamcloud - gitweb
LU-5116 ptlrpc: race at req processing 71/10471/2
authorAlexander.Boyko <alexander_boyko@xyratex.com>
Wed, 28 May 2014 17:52:13 +0000 (21:52 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 30 May 2014 03:58:15 +0000 (03:58 +0000)
commit56e5a6bb4fc0329092f85016b8664da0b6ffa8a8
tree06ec12c4e68b445b0a6cd3b07a1babddf0ffe384
parent148995d855297677e13f00e181a53347b5e767e9
LU-5116 ptlrpc: race at req processing

Race between ptlrpc_resend_req() and ptlrpc_check_set().
1 thread do ptlrpc_check_set()->after_reply()
2 thread do ptlrpc_resend_req()
The result is request with rq_resend = 1 and MSG_REPLY flag.
When this request will came to server it will cause client eviction.
The patch skip ptlrpc_resend_req logic if rq_replied is set,
and clear rq_resend flag at reply_in_callback() when client got
reply.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1888
Change-Id: If47b9a1f559ab16e4b416332ada7c73a8758d46c
Reviewed-on: http://review.whamcloud.com/10471
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/client.c
lustre/ptlrpc/events.c
lustre/ptlrpc/niobuf.c