Skip to content

Commit

Permalink
DAOS-16799 vos: handle concurrent pool_open in VOS (#15524)
Browse files Browse the repository at this point in the history
The pool_open() logic maybe yield in VOS, then it is possible that
multiple pool_open() sponsors open the same vos pool concurrently.
This patch serializes such concurrent pool_open() and handle kinds
of race conditions.

Signed-off-by: Fan Yong <[email protected]>
  • Loading branch information
Nasf-Fan authored Jan 15, 2025
1 parent a94ac88 commit 1607bf8
Show file tree
Hide file tree
Showing 2 changed files with 226 additions and 131 deletions.
10 changes: 7 additions & 3 deletions src/vos/vos_internal.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -279,10 +280,13 @@ struct vos_pool {
/** VOS uuid hash-link with refcnt */
struct d_ulink vp_hlink;
/** number of openers */
uint32_t vp_opened : 30;
uint32_t vp_dying : 1;
uint32_t vp_opened;
uint32_t vp_dying:1,
vp_opening:1,
/** exclusive handle (see VOS_POF_EXCL) */
int vp_excl:1;
vp_excl:1;
ABT_mutex vp_mutex;
ABT_cond vp_cond;
/* this pool is for sysdb */
bool vp_sysdb;
/** this pool is for rdb */
Expand Down
Loading

0 comments on commit 1607bf8

Please sign in to comment.