Whamcloud - gitweb
LU-15305 obdclass: fix race in class_del_profile 78/49178/4
authorLi Dongyang <dongyangli@ddn.com>
Fri, 7 Oct 2022 12:09:10 +0000 (23:09 +1100)
committerOleg Drokin <green@whamcloud.com>
Tue, 29 Nov 2022 07:17:40 +0000 (07:17 +0000)
commit906b5d9dbe82beed41f191bd69ce1f72504a77c5
treec6258975a7bfdcca9ebec072bb3906bb8da2d08d
parentd0b3f364b14d484906ab862eebeed43adb36fb40
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.

Lustre-change: https://review.whamcloud.com/48802
Lustre-commit: 83d3f42118579d7fb7c3002533c047badcf41e0d

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