Whamcloud - gitweb
LU-17251 osp: force precreate if create_count grows
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 3 Nov 2023 00:32:44 +0000 (18:32 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 9 Nov 2023 08:42:12 +0000 (08:42 +0000)
commitd6e35cc09ab39e2ac22a6a02eb46a2e4c9fb5772
treeecc641ebfca34e717eb278042e00376c990b10f6
parentcd313088ec2df0fb5cecebe0837712fad28b98ee
LU-17251 osp: force precreate if create_count grows

Force the MDS to precreate OST objects if "osp.*.create_count" is
written and the OSP does not have at least that many precreated
objects locally.  This avoids doing complex operations in test
scripts to force precreation to run, which slows down the tests
and increases the chance that a test might fail.

Previously opd_precreate_force was only used for handling OSTs
that were reformatted and this reset "create_count" to minimum, so
move that to the reformat case rather than in the precreate code
path so it does not reset "create_count" when it was just set.

Remove the "env" argument from several precreate-related functions,
since it wasn't used in those functions, and that made it difficult
to call them from the "create_count" parameter handling.

Lustre-change: https://review.whamcloud.com/52968
Lustre-commit: TBD (from 0206ef4d765aca3f298e24dd630f155114781986)

Test-Parameters: testlist=parallel-scale env=ONLY=test_rr_alloc
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iac35c1b981fcd6ab2d1ea5abc9ffe2e4563ebbe5
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52998
Tested-by: jenkins <devops@whamcloud.com>
lustre/osp/lproc_osp.c
lustre/osp/osp_internal.h
lustre/osp/osp_object.c
lustre/osp/osp_precreate.c