Whamcloud - gitweb
LU-17191 osc: only call xa_insert for new entries 13/52713/9
authorJames Simmons <jsimmons@infradead.org>
Fri, 3 Nov 2023 00:33:50 +0000 (20:33 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Nov 2023 22:03:05 +0000 (22:03 +0000)
commit67e0d9e40acc6adcebf89e2a4ac3860f0c4273d2
tree1cf39aa10986368cfec18b3312cf102d3119e0a3
parentee0e9447e7022e2caa8b161657d505e17ccdc4a1
LU-17191 osc: only call xa_insert for new entries

The handling of updating the Xarray entry is incorrect. If the
Xarray already exist and we call xa_insert() it will return -EBUSY
and not continue examining the entry. The correct approach is
if xa_load() returns a value never call xa_insert(). With the
return value of xa_load() we test if type bit was set and if not
set it.

We add ll_xa_insert to spelling.txt since the return value changed
with kernel versions. This will avoid mistakes in the future for
cases we look at the return value of xa_insert().

Test-Parameters: testlist=sanity-quota
Test-parameters: clientdistro=ubuntu2204 testlist=sanity-quota
Fixes: ac8c28f959 ("LU-8130 osc: convert osc_quota hash to xarray")
Change-Id: Icd88f5e47fb24f669bf362c1daec500b743b447b
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52713
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
contrib/scripts/spelling.txt
lustre/osc/osc_quota.c