Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/bio/smd/smd_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ smd_dev_get_by_tgt(uint32_t tgt_id, enum smd_dev_type st, struct smd_dev_info **
}

static int
smd_dev_list_cb(struct sys_db *db, char *table, d_iov_t *key, void *args)
smd_dev_list_cb(struct sys_db *db, char *table, d_iov_t *key, void *args, unsigned *acts)
{
struct smd_trav_data *td = args;
struct smd_dev_info *info;
Expand Down
3 changes: 2 additions & 1 deletion src/bio/smd/smd_pool.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2018-2025 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -423,7 +424,7 @@ smd_rdb_get_blob_sz(uuid_t pool_id, uint64_t *blob_sz)
}

static int
smd_pool_list_cb(struct sys_db *db, char *table, d_iov_t *key, void *args)
smd_pool_list_cb(struct sys_db *db, char *table, d_iov_t *key, void *args, unsigned *acts)
{
struct smd_trav_data *td = args;
struct smd_pool_info *info;
Expand Down
3 changes: 2 additions & 1 deletion src/bio/smd/tests/smd_ut.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2018-2025 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -162,7 +163,7 @@ db_traverse(struct sys_db *db, char *table, sys_db_trav_cb_t cb, void *args)
d_iov_t key;

d_iov_set(&key, chain->uc_key, chain->uc_key_size);
cb(db, table, &key, args);
cb(db, table, &key, args, NULL);
}
return 0;
}
Expand Down
11 changes: 7 additions & 4 deletions src/chk/chk_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ chk_pool_stop_all(struct chk_instance *ins, uint32_t status, int *ret)
}

int
chk_pools_pause_cb(struct sys_db *db, char *table, d_iov_t *key, void *args)
chk_pools_pause_cb(struct sys_db *db, char *table, d_iov_t *key, void *args, unsigned *acts)
{
struct chk_traverse_pools_args *ctpa = args;
char *uuid_str = key->iov_buf;
Expand Down Expand Up @@ -569,7 +569,7 @@ chk_pools_pause_cb(struct sys_db *db, char *table, d_iov_t *key, void *args)
}

int
chk_pools_cleanup_cb(struct sys_db *db, char *table, d_iov_t *key, void *args)
chk_pools_cleanup_cb(struct sys_db *db, char *table, d_iov_t *key, void *args, unsigned *acts)
{
struct chk_traverse_pools_args *ctpa = args;
char *uuid_str = key->iov_buf;
Expand All @@ -581,8 +581,11 @@ chk_pools_cleanup_cb(struct sys_db *db, char *table, d_iov_t *key, void *args)
D_GOTO(out, rc = 0);

rc = chk_bk_fetch_pool(&cbk, uuid_str);
if (rc == 0)
if (rc == 0) {
rc = chk_bk_delete_pool(uuid_str);
if (rc == 0)
*acts |= VOS_ITER_CB_DELETE;
}

out:
return rc == -DER_NONEXIST ? 0 : rc;
Expand Down Expand Up @@ -711,7 +714,7 @@ chk_pools_load_list(struct chk_instance *ins, uint64_t gen, uint32_t flags,
}

int
chk_pools_load_from_db(struct sys_db *db, char *table, d_iov_t *key, void *args)
chk_pools_load_from_db(struct sys_db *db, char *table, d_iov_t *key, void *args, unsigned *acts)
{
struct chk_traverse_pools_args *ctpa = args;
struct chk_instance *ins = ctpa->ctpa_ins;
Expand Down
7 changes: 4 additions & 3 deletions src/chk/chk_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,16 +727,17 @@ void chk_pool_stop_one(struct chk_instance *ins, uuid_t uuid, uint32_t status, u

void chk_pool_stop_all(struct chk_instance *ins, uint32_t status, int *ret);

int chk_pools_pause_cb(struct sys_db *db, char *table, d_iov_t *key, void *args);
int chk_pools_pause_cb(struct sys_db *db, char *table, d_iov_t *key, void *args, unsigned *acts);

int chk_pools_cleanup_cb(struct sys_db *db, char *table, d_iov_t *key, void *args);
int chk_pools_cleanup_cb(struct sys_db *db, char *table, d_iov_t *key, void *args, unsigned *acts);

int chk_pool_start_one(struct chk_instance *ins, uuid_t uuid, uint64_t gen);

int chk_pools_load_list(struct chk_instance *ins, uint64_t gen, uint32_t flags,
int pool_nr, uuid_t pools[], uint32_t *phase);

int chk_pools_load_from_db(struct sys_db *db, char *table, d_iov_t *key, void *args);
int chk_pools_load_from_db(struct sys_db *db, char *table, d_iov_t *key, void *args,
unsigned *acts);

int chk_pools_update_bk(struct chk_instance *ins, uint32_t phase);

Expand Down
5 changes: 3 additions & 2 deletions src/include/daos/sys_db.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2022 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand All @@ -12,8 +13,8 @@
#include <daos_types.h>

struct sys_db;
typedef int (*sys_db_trav_cb_t)(struct sys_db *db, char *table, d_iov_t *key,
void *args);
typedef int (*sys_db_trav_cb_t)(struct sys_db *db, char *table, d_iov_t *key, void *args,
unsigned *acts);

#define SYS_DB_NAME_SZ 32

Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/recovery/cat_recov_core.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
hosts:
test_servers: 4
timeout: 5400
timeout: 5700
server_config:
name: daos_server
engines_per_host: 2
Expand Down
4 changes: 2 additions & 2 deletions src/vos/sys_db.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2020-2023 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -278,8 +279,7 @@ db_trav_cb(daos_handle_t ih, vos_iter_entry_t *entry, vos_iter_type_t type,
{
struct db_trav_args *ta = data;

return ta->ta_cb(ta->ta_db, ta->ta_table, &entry->ie_key,
ta->ta_cb_args);
return ta->ta_cb(ta->ta_db, ta->ta_table, &entry->ie_key, ta->ta_cb_args, acts);
}

static int
Expand Down
Loading