Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16914 vos: don't print error message on ITER_EXIT #15675

Merged
merged 3 commits into from
Jan 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/vos/vos_iterator.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -785,6 +786,10 @@ vos_iter_cb(vos_iter_cb_t iter_cb, daos_handle_t ih, vos_iter_entry_t *iter_ent,
return rc;
}

/*
* ITER_EXIT indicates that the iteration is interrupted (for instance, the iterating ULT is
* terminated by shed_req_wait()), we'd return non-zero value to inform caller in such case.
*/
#define JUMP_TO_STAGE(rc, next_label, probe_label, abort_label) \
do { \
switch (rc) { \
Expand Down Expand Up @@ -1089,8 +1094,8 @@ vos_iterate_obj(vos_iter_param_t *param, bool recursive, struct vos_iter_anchors

cont = vos_hdl2cont(param->ip_hdl);
if (!vos_pool_is_evictable(cont->vc_pool))
return vos_iterate_internal(param, VOS_ITER_OBJ, recursive, false, anchors,
pre_cb, post_cb, arg, dth);
return vos_iterate_internal(param, VOS_ITER_OBJ, recursive, false, anchors, pre_cb,
post_cb, arg, dth);

/* The caller must provide a filter callback and call the oi_bkt_iter_skip() properly */
D_ASSERT(param->ip_filter_cb != NULL && param->ip_bkt_iter == NULL);
Expand All @@ -1112,7 +1117,8 @@ vos_iterate_obj(vos_iter_param_t *param, bool recursive, struct vos_iter_anchors
rc = vos_iterate_internal(param, VOS_ITER_OBJ, recursive, false, anchors,
pre_cb, post_cb, arg, dth);
if (rc) {
DL_ERROR(rc, "Iterate bucket:%u failed.", i);
DL_CDEBUG(rc == ITER_EXIT, DB_TRACE, DLOG_ERR, rc,
"Iterate bucket:%u failed.", i);
break;
}
reset_anchors(VOS_ITER_OBJ, anchors);
Expand All @@ -1136,6 +1142,6 @@ vos_iterate(vos_iter_param_t *param, vos_iter_type_t type, bool recursive,
{
D_ASSERT((param->ip_flags & VOS_IT_KEY_TREE) == 0);

return vos_iterate_internal(param, type, recursive, false, anchors,
pre_cb, post_cb, arg, dth);
return vos_iterate_internal(param, type, recursive, false, anchors, pre_cb, post_cb, arg,
dth);
}
Loading