11/**
22 * (C) Copyright 2016-2024 Intel Corporation.
3- * (C) Copyright 2025 Hewlett Packard Enterprise Development LP
3+ * (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
44 * (C) Copyright 2025 Google LLC
55 *
66 * SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -2423,7 +2423,7 @@ obj_inflight_io_check(struct ds_cont_child *child, uint32_t opc,
24232423 uint32_t rpc_map_ver , uint32_t flags )
24242424{
24252425 if (opc == DAOS_OBJ_RPC_ENUMERATE && flags & ORF_FOR_MIGRATION ) {
2426- /* EC aggregation is still inflight , rebuild should wait until it's paused */
2426+ /* EC aggregation is still in-flight , rebuild should wait until it's paused */
24272427 if (ds_cont_child_ec_aggregating (child )) {
24282428 D_ERROR (DF_CONT " ec aggregate still active, rebuilding %d\n" ,
24292429 DP_CONT (child -> sc_pool -> spc_uuid , child -> sc_uuid ),
@@ -3258,6 +3258,27 @@ obj_enum_complete(crt_rpc_t *rpc, int status, int map_version,
32583258 D_FREE (oeo -> oeo_csum_iov .iov_buf );
32593259}
32603260
3261+ static void
3262+ dump_enum_anchor (daos_unit_oid_t uoid , daos_anchor_t * anchor , char * str )
3263+ {
3264+ int nr = DAOS_ANCHOR_BUF_MAX / 8 ;
3265+ int i ;
3266+ uint64_t data [nr ];
3267+
3268+ D_DEBUG (DB_REBUILD , DF_UOID "%s anchor -" , DP_UOID (uoid ), str );
3269+ D_DEBUG (DB_REBUILD , "type %d, shard %d, flags 0x%x\n" , anchor -> da_type , anchor -> da_shard ,
3270+ anchor -> da_flags );
3271+ for (i = 0 ; i < nr ; i ++ )
3272+ data [i ] = * (uint64_t * )((char * )anchor -> da_buf + i * 8 );
3273+ if (nr >= 13 )
3274+ D_DEBUG (DB_REBUILD ,
3275+ "da_buf " DF_X64 "," DF_X64 "," DF_X64 "," DF_X64 "," DF_X64 "," DF_X64
3276+ "," DF_X64 "," DF_X64 "," DF_X64 "," DF_X64 "," DF_X64 "," DF_X64
3277+ "," DF_X64 ,
3278+ data [0 ], data [1 ], data [2 ], data [3 ], data [4 ], data [5 ], data [6 ], data [7 ],
3279+ data [8 ], data [9 ], data [10 ], data [11 ], data [12 ]);
3280+ }
3281+
32613282static int
32623283obj_local_enum (struct obj_io_context * ioc , crt_rpc_t * rpc ,
32633284 struct vos_iter_anchors * anchors , struct ds_obj_enum_arg * enum_arg ,
@@ -3326,6 +3347,10 @@ obj_local_enum(struct obj_io_context *ioc, crt_rpc_t *rpc,
33263347 D_ASSERT (opc == DAOS_OBJ_RPC_ENUMERATE );
33273348 type = VOS_ITER_DKEY ;
33283349 param .ip_flags |= VOS_IT_RECX_VISIBLE ;
3350+ if (D_LOG_ENABLED (DB_REBUILD )) {
3351+ dump_enum_anchor (oei -> oei_oid , & anchors -> ia_dkey , "dkey" );
3352+ dump_enum_anchor (oei -> oei_oid , & anchors -> ia_akey , "akey" );
3353+ }
33293354 if (daos_anchor_get_flags (& anchors -> ia_dkey ) &
33303355 DIOF_WITH_SPEC_EPOCH ) {
33313356 /* For obj verification case. */
@@ -3343,7 +3368,12 @@ obj_local_enum(struct obj_io_context *ioc, crt_rpc_t *rpc,
33433368 enum_arg -> chk_key2big = 1 ;
33443369 enum_arg -> need_punch = 1 ;
33453370 enum_arg -> copy_data_cb = vos_iter_copy ;
3346- fill_oid (oei -> oei_oid , enum_arg );
3371+ rc = fill_oid (oei -> oei_oid , enum_arg );
3372+ if (rc != 0 ) {
3373+ rc = - DER_KEY2BIG ;
3374+ DL_ERROR (rc , DF_UOID "fill oid failed" , DP_UOID (oei -> oei_oid ));
3375+ goto failed ;
3376+ }
33473377 }
33483378
33493379 /*
0 commit comments