Skip to content

Commit

Permalink
DAOS-16713 vos: initialize checkpoint stats (#15454)
Browse files Browse the repository at this point in the history
Initialize checkpoint stats to zero.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
  • Loading branch information
NiuYawei authored Nov 12, 2024
1 parent fb89454 commit d820b71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/include/daos/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,12 @@ struct umem_cache {
};

struct umem_cache_chkpt_stats {
/** Last committed checkpoint id */
uint64_t *uccs_chkpt_id;
/** Number of pages processed */
int uccs_nr_pages;
unsigned int uccs_nr_pages;
/** Number of dirty chunks copied */
int uccs_nr_dchunks;
unsigned int uccs_nr_dchunks;
/** Number of sgl iovs used to copy dirty chunks */
int uccs_nr_iovs;
unsigned int uccs_nr_iovs;
};

/** Allocate global cache for umem store.
Expand Down
2 changes: 1 addition & 1 deletion src/vos/vos_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ vos_pool_checkpoint(daos_handle_t poh)
struct bio_wal_info wal_info;
int rc;
uint64_t purge_size = 0;
struct umem_cache_chkpt_stats stats;
struct umem_cache_chkpt_stats stats = { 0 };
struct vos_chkpt_metrics *chkpt_metrics = NULL;

pool = vos_hdl2pool(poh);
Expand Down

0 comments on commit d820b71

Please sign in to comment.