From d820b712f04e8805d62e7d94eda6e8966e55e6e2 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Tue, 12 Nov 2024 17:32:03 +0800 Subject: [PATCH] DAOS-16713 vos: initialize checkpoint stats (#15454) Initialize checkpoint stats to zero. Signed-off-by: Niu Yawei --- src/include/daos/mem.h | 8 +++----- src/vos/vos_pool.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/include/daos/mem.h b/src/include/daos/mem.h index 6b016f8fcf9..5a7c685749f 100644 --- a/src/include/daos/mem.h +++ b/src/include/daos/mem.h @@ -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. diff --git a/src/vos/vos_pool.c b/src/vos/vos_pool.c index 245f9105585..dcf11cfdcca 100644 --- a/src/vos/vos_pool.c +++ b/src/vos/vos_pool.c @@ -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);