Whamcloud - gitweb
LU-15305 obdclass: fix race in class_del_profile 02/48802/4
authorLi Dongyang <dongyangli@ddn.com>
Fri, 7 Oct 2022 12:09:10 +0000 (23:09 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Oct 2022 17:27:36 +0000 (17:27 +0000)
commit83d3f42118579d7fb7c3002533c047badcf41e0d
tree5cb982e4ec8696301150947fa547504253340ecd
parent1df5199097ef0d789fea050c0bc19358e2354063
LU-15305 obdclass: fix race in class_del_profile

Move profile lookup and remove from lustre_profile_list
into the same critical section, otherwise we could race with
class_del_profiles or another class_del_profile.

Do not create duplicate mount opts in the client config,
otherwise we will add duplicate lustre_profile to
lustre_profile_list for a single mount.

Change-Id: I648aa206716213b064d045f546516b219337e0ed
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48802
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mgs/mgs_llog.c
lustre/obdclass/obd_config.c