Whamcloud - gitweb
LU-12559 ptlrpc: Hold imp lock for idle reconnect 30/35530/4
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 16 Jul 2019 19:26:43 +0000 (15:26 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 17 Sep 2019 05:46:21 +0000 (05:46 +0000)
commite9472c54ac820c3a0db2318a6ef894c3971e6e0b
tree48f7f4c0f552c5b5c68d0423fb65716a32ffad50
parentf176efd183ead0b3008eb502c78b00f0c127f992
LU-12559 ptlrpc: Hold imp lock for idle reconnect

Idle reconnect sets import state to IMP_NEW, then releases
the import lock before calling ptlrpc_connect_import.  This
creates a gap where an import in IMP_NEW state is exposed,
which can cause new requests to fail with EIO.

Hold the lock across the call so as not to expose imports
in this state.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I9f8509d11c4d5a8917a313349534d98b964cd588
Reviewed-on: https://review.whamcloud.com/35530
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_net.h
lustre/ptlrpc/client.c
lustre/ptlrpc/import.c