Whamcloud - gitweb
LU-16981 lod: update llc_stripe_count after ost inactive 59/51759/5
authorThomas Bertschinger <bertschinger@lanl.gov>
Tue, 25 Jul 2023 16:03:47 +0000 (12:03 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 23 Sep 2023 06:02:49 +0000 (06:02 +0000)
commit78336aa166f4a7a0128a5891c747eecf26ff9565
treee630fc0847f248741a4415ffbfd71c7201e8398f
parent7f89e8c8975fcc82983c5756438861d66e64ec23
LU-16981 lod: update llc_stripe_count after ost inactive

If an OST gets deactivated while lod_ost_alloc_qos() is trying to
allocate stripes for a file create, then normally this is caught and
EAGAIN is returned which causes the lod_comp->llc_stripe_count to
get updated to accurately reflect the stripe count. But there is a
race condition and if the OST is deactivated after the call to
ltd_qos_is_usable() but before the stripes are allocated, then
updating the stripe count never occurred.

This causes an LBUG later in lod_striped_create() because fewer
stripes are allocated than the number in llc_stripe_count so it
finds a stripe that is NULL.

The solution is to properly update lod_comp->llc_stripe_count when
the number of stripes created is less than expected.

Fixes: ced540165ef5 ("LU-16623 lod: handle object allocation consistently")
Test-Parameters: testlist=sanity env=ONLY=27V,ONLY_REPEAT=100
Signed-off-by: Thomas Bertschinger <bertschinger@lanl.gov>
Change-Id: Ia1264f24904fed00454b3bc3c0d6c7b9b947737f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51759
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/lod/lod_qos.c
lustre/tests/sanity.sh