Whamcloud - gitweb
LU-12559 ptlrpc: Hold imp lock for idle reconnect 15/36215/3
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 16 Jul 2019 19:26:43 +0000 (15:26 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Oct 2019 20:30:17 +0000 (20:30 +0000)
commitdf5d7a7816e8472397e5f99fd2d44d4cd2a4754d
tree1feaefd24a0d83f765b3c302cd8355061d2f6af0
parentef1a94ee7fd859ea5c3af6b3028df78e6acea8c7
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.

Lustre-change: https://review.whamcloud.com/35530
Lustre-commit: e9472c54ac820c3a0db2318a6ef894c3971e6e0b

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