From f186a508f5a2aa9fb3ed6103328d033ee97c3ff6 Mon Sep 17 00:00:00 2001 From: Xuezhao Liu Date: Wed, 12 Jun 2024 10:07:28 +0000 Subject: [PATCH] DAOS-16001 placement: fix cases for delay_rebuild Features: rebuild Allow-unstable-test: true Required-githooks: true Signed-off-by: Xuezhao Liu --- src/placement/pl_map_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/placement/pl_map_common.c b/src/placement/pl_map_common.c index 53039baccf7..d3bded29027 100644 --- a/src/placement/pl_map_common.c +++ b/src/placement/pl_map_common.c @@ -251,7 +251,8 @@ is_comp_avaible(struct pool_component *comp, uint32_t allow_version, status = PO_COMP_ST_UPIN; } else if (status == PO_COMP_ST_UP) { if (comp->co_flags & PO_COMPF_DOWN2UP) { - status = PO_COMP_ST_UPIN; + /* does not work for delay_rebuild mode */ + /* status = PO_COMP_ST_UPIN; */ } else { if (comp->co_fseq <= 1) status = PO_COMP_ST_NEW; @@ -392,6 +393,7 @@ determine_valid_spares(struct pool_target *spare_tgt, struct daos_obj_md *md, */ if (f_shard->fs_status == PO_COMP_ST_DOWN || f_shard->fs_status == PO_COMP_ST_DRAIN || + f_shard->fs_status == PO_COMP_ST_UP || pool_target_down(spare_tgt)) l_shard->po_rebuilding = 1; } else {