Pull HPA options into a containing struct.

Currently that just means max_alloc, but we're about to add more.  While we're
touching these lines anyways, tweak things to be more in line with testing.
This commit is contained in:
David Goldblatt
2020-12-08 16:33:39 -08:00
committed by David Goldblatt
parent bdb7307ff2
commit b3df80bc79
10 changed files with 52 additions and 28 deletions

View File

@@ -37,9 +37,12 @@ create_test_data() {
err = emap_init(&test_data->emap, test_data->base, /* zeroed */ false);
assert_false(err, "");
hpa_shard_opts_t opts = HPA_SHARD_OPTS_DEFAULT;
opts.slab_max_alloc = ALLOC_MAX;
err = hpa_shard_init(&test_data->shard, &test_data->emap,
test_data->base, &test_data->shard_edata_cache, SHARD_IND,
ALLOC_MAX);
&opts);
assert_false(err, "");
return (hpa_shard_t *)test_data;