Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/pool/srv_target.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* (C) Copyright 2016-2025 Intel Corporation.
* (C) Copyright 2025 Google LLC
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -903,6 +903,12 @@ pool_alloc_ref(void *key, unsigned int ksize, void *varg,
if (rc != ABT_SUCCESS)
D_GOTO(err_mutex, rc = dss_abterr2der(rc));

rc = ABT_rwlock_create(&pool->sp_recov_lock);
if (rc != ABT_SUCCESS) {
rc = dss_abterr2der(rc);
goto err_cond;
}

D_INIT_LIST_HEAD(&pool->sp_ec_ephs_list);
uuid_copy(pool->sp_uuid, key);
D_INIT_LIST_HEAD(&pool->sp_hdls);
Expand All @@ -922,7 +928,7 @@ pool_alloc_ref(void *key, unsigned int ksize, void *varg,
if (rc != 0) {
D_ERROR(DF_UUID": failed to set up ds_pool metrics: %d\n",
DP_UUID(key), rc);
goto err_cond;
goto err_recov_lock;
}

uuid_unparse_lower(key, group_id);
Expand Down Expand Up @@ -952,6 +958,8 @@ pool_alloc_ref(void *key, unsigned int ksize, void *varg,
DP_UUID(pool->sp_uuid), DP_RC(rc_tmp));
err_metrics:
ds_pool_metrics_stop(pool);
err_recov_lock:
ABT_rwlock_free(&pool->sp_recov_lock);
err_cond:
ABT_cond_free(&pool->sp_fetch_hdls_cond);
err_mutex:
Expand Down Expand Up @@ -994,6 +1002,7 @@ pool_free_ref(struct daos_llink *llink)

if (pool->sp_map_bc != NULL)
ds_pool_put_map_bc(pool->sp_map_bc);
ABT_rwlock_free(&pool->sp_recov_lock);
ABT_cond_free(&pool->sp_fetch_hdls_cond);
ABT_mutex_free(&pool->sp_mutex);
ABT_rwlock_free(&pool->sp_lock);
Expand Down
Loading