|
1 | 1 | /** |
2 | 2 | * (C) Copyright 2016-2024 Intel Corporation. |
| 3 | + * (C) Copyright 2026 Hewlett Packard Enterprise Development LP |
3 | 4 | * |
4 | 5 | * SPDX-License-Identifier: BSD-2-Clause-Patent |
5 | 6 | */ |
@@ -255,13 +256,7 @@ is_comp_avaible(struct pool_component *comp, uint32_t allow_version, |
255 | 256 | status = PO_COMP_ST_UPIN; |
256 | 257 | } else if (status == PO_COMP_ST_UP) { |
257 | 258 | if (comp->co_flags & PO_COMPF_DOWN2UP) { |
258 | | - /* PO_COMP_ST_UP status with PO_COMPF_DOWN2UP flag |
259 | | - * is the case of delay_rebuild exclude+reint. |
260 | | - * Cannot mark it as UPIN to avoid it be used for |
261 | | - * rebuild enumerate/fetch, as the data will be |
262 | | - * discarded in reintegrate. |
263 | | - */ |
264 | | - /* status = PO_COMP_ST_UPIN; */ |
| 259 | + status = PO_COMP_ST_UPIN; |
265 | 260 | } else { |
266 | 261 | if (comp->co_fseq <= 1) |
267 | 262 | status = PO_COMP_ST_NEW; |
@@ -394,18 +389,23 @@ determine_valid_spares(struct pool_target *spare_tgt, struct daos_obj_md *md, |
394 | 389 | if (spare_avail) { |
395 | 390 | /* The selected spare target is up and ready */ |
396 | 391 | l_shard->po_target = spare_tgt->ta_comp.co_id; |
397 | | - l_shard->po_fseq = f_shard->fs_fseq; |
398 | | - l_shard->po_rank = spare_tgt->ta_comp.co_rank; |
399 | | - l_shard->po_index = spare_tgt->ta_comp.co_index; |
| 392 | + l_shard->po_fseq = f_shard->fs_fseq; |
| 393 | + l_shard->po_rank = spare_tgt->ta_comp.co_rank; |
| 394 | + l_shard->po_index = spare_tgt->ta_comp.co_index; |
| 395 | + f_shard->fs_down2up = pool_target_is_down2up(spare_tgt); |
400 | 396 |
|
401 | 397 | /* |
402 | 398 | * Mark the shard as 'rebuilding' so that read will skip this shard. |
403 | 399 | * f_shard->fs_down2up is the case of delay_rebuild exclude+reint. |
404 | 400 | */ |
405 | 401 | if (f_shard->fs_status == PO_COMP_ST_DOWN || |
406 | | - f_shard->fs_status == PO_COMP_ST_DRAIN || |
407 | | - f_shard->fs_down2up || pool_target_down(spare_tgt)) |
| 402 | + f_shard->fs_status == PO_COMP_ST_DRAIN || f_shard->fs_down2up || |
| 403 | + pool_target_is_down(spare_tgt)) |
408 | 404 | l_shard->po_rebuilding = 1; |
| 405 | + |
| 406 | + if (f_shard->fs_down2up && gen_mode != PRE_REBUILD) |
| 407 | + l_shard->po_reintegrating = 1; |
| 408 | + |
409 | 409 | } else { |
410 | 410 | l_shard->po_shard = -1; |
411 | 411 | l_shard->po_target = -1; |
|
0 commit comments