Whamcloud - gitweb
LU-5569 ptlrpc: change reverse import life cycle 50/11750/15
authorAlexey Lyashkov <alexey_lyashkov@xyratex.com>
Fri, 5 Jun 2015 15:46:48 +0000 (11:46 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 19 Sep 2015 03:50:11 +0000 (03:50 +0000)
commit892078e3b566c04471e7dcf2c28e66f2f3584f93
tree23c95266d6b766c27f38e7237be733db3102de41
parentbfa4bc911208f7a7a447984a40266c70ad8814ab
LU-5569 ptlrpc: change reverse import life cycle

Make reverse import on server have same life cycle for a client
import, otherwise a reverse import disconnecting on each client
reconnect open several races in request sending (AST mostly) code.

First problem is send_rpc vs class_destroy_import() race. If send RPC
(or resending) issued after class_destroy_import() function it will
fail due to generation check.

The second problem is resending via a different router (to a different nid).
The target_handle_connect() function doesn't update the connection
information for older reverse import, so if the connection information
or security flavor has changed we won't be able to deliver an RPC
from server to the client.

The third problem is that connection flags aren't updated atomically
for an import. The target_handle_connect() function connects the new
import before the message header flags are set, so if we send an RPC
in that time it may have the wrong flags.

The final fourth problem is none wakeup an older RPC if client
reconnected to ability to resend after network flap. This was
not a problem without Vitaly's "resend AST callbacks" patch
(commit 30be03b4dd59389) as it was not possible to resend RPCs.
Now, however, this problem results in failing to resend ASTs at
all, or adding long timeout to AST RPCs.

Xyratex-bug-id: MRP-2038
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: I5dd65a0a507827d6a43683dedbbc0cee263ee0d0
Reviewed-on: http://review.whamcloud.com/11750
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_lib.h
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lib.c
lustre/obdclass/genops.c
lustre/ptlrpc/import.c
lustre/target/tgt_lastrcvd.c
lustre/tests/recovery-small.sh