Whamcloud - gitweb
DDN-4630 sec: protect against concurrent mi_ginfo change
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 22 Feb 2024 12:44:57 +0000 (13:44 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 24 Feb 2024 03:47:28 +0000 (03:47 +0000)
commitd9869f52e96985ad66e97c4058a4eb40650c9d34
treea319c521838b44d959c190f447c38e5b2a0af5fa
parentbf198406102d2f653243f637d3541846b67c42e5
DDN-4630 sec: protect against concurrent mi_ginfo change

With the INTERNAL upcall mechanism, we put in the upcall cache the
groups received from the client, by appending them to a list built
from previous requests.
An existing entry is never modified once it is marked as VALID, it is
replaced with a new one, with a larger groups list. However, the group
info associated with an entry can change when updated from NEW to
VALID. This means the number of groups can only grow from 0 (group
info not set) to the current number of collected groups.
In case of concurrent cache entry update, we need to check the group
info and start over adding the groups associated with the current
request.

Fixes: 4515e5365f ("LU-17015 build: rework upcall cache")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ie7088bdbfcae396602b59e2ab07fbfbbb14d96af
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54146
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/mdt/mdt_identity.c
lustre/obdclass/upcall_cache_internal.c