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-16927 pool: refine IV_POOL_HDL IV process #15978

Open
wants to merge 1 commit into
base: liw/special-hdls
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 8 additions & 1 deletion src/engine/server_iv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,14 @@ iv_op(struct ds_iv_ns *ns, struct ds_iv_key *key, d_sg_list_t *value,
if (ns->iv_stop)
return -DER_SHUTDOWN;

if (sync && sync->ivs_mode == CRT_IV_SYNC_LAZY)
/* Cart IV's CRT_IV_SYNC_LAZY update/invalidate, its completion means update/invalidate
* complete and need not wait the SYNC (bcst)'s completion. Here changes it to create ULT
* so won't wait anything.
* For CRT_IV_SHORTCUT_TO_ROOT + CRT_IV_SYNC_LAZY mode, we keep the same semantic as cart
* IV. One use case is ds_pool_iv_srv_hdl_update() to make the pool_iv_ent_update()->
* ds_pool_iv_refresh_hdl() be executed synchronously.
*/
if (sync && sync->ivs_mode == CRT_IV_SYNC_LAZY && shortcut != CRT_IV_SHORTCUT_TO_ROOT)
return iv_op_async(ns, key, value, sync, shortcut, retry, opc);
Copy link
Contributor Author

@liuxuezhao liuxuezhao Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to totally remove L1178 ~ L1179, now just for safe only bypass it for SHORTCUT TO ROOT case.


return _iv_op(ns, key, value, sync, shortcut, retry, opc);
Expand Down
8 changes: 4 additions & 4 deletions src/pool/srv_iv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* (C) Copyright 2017-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -1469,10 +1470,9 @@ ds_pool_iv_srv_hdl_update(struct ds_pool *pool, uuid_t pool_hdl_uuid,
uuid_copy(iv_entry.piv_hdl.pih_pool_hdl, pool_hdl_uuid);
uuid_copy(iv_entry.piv_hdl.pih_cont_hdl, cont_hdl_uuid);

rc = pool_iv_update(pool->sp_iv_ns, IV_POOL_HDL, pool_hdl_uuid,
&iv_entry, sizeof(struct pool_iv_entry),
CRT_IV_SHORTCUT_NONE, CRT_IV_SYNC_LAZY, true);

rc = pool_iv_update(pool->sp_iv_ns, IV_POOL_HDL, pool_hdl_uuid, &iv_entry,
sizeof(struct pool_iv_entry), CRT_IV_SHORTCUT_TO_ROOT, CRT_IV_SYNC_LAZY,
true);
if (rc != 0)
D_ERROR("pool_iv_update failed "DF_RC"\n", DP_RC(rc));

Expand Down