Whamcloud - gitweb
LU-14110 obdclass: Protect cl_env_percpu[]
authorEtienne AUJAMES <eaujames@ddn.com>
Thu, 14 Apr 2022 16:18:00 +0000 (09:18 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 26 Apr 2022 00:09:25 +0000 (00:09 +0000)
commit5a2ca53599e0386867e92744b37a00a86ef9b653
tree13f69caa55f398e7d93821b40aeb44a3a57c4f07
parentacc6f3762417ef0bb7324e48f85bdf2a46bdbf39
LU-14110 obdclass: Protect cl_env_percpu[]

cl_env_percpu is not protected against multi client mounts on the
same node: "keys_fill" could be called with the same cl_env_percpu
context by several mount processes (race on lu_context.lc_value).

This patch add a mutex for cl_env_percpu to proctect contexts
"refill".

Lustre-change: https://review.whamcloud.com/40565
Lustre-commit: 881551fbb7335694b89a877072bcda0aeaf8705c

Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Change-Id: Icfd6f3715899fa4ac5279e932f462e7cf29d98bd
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/47073
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/obd_support.h
lustre/llite/llite_lib.c
lustre/obdclass/cl_object.c
lustre/tests/sanityn.sh