diff --git a/src/container/container_iv.c b/src/container/container_iv.c index 21bc95ea6af..2ccb5b75d4b 100644 --- a/src/container/container_iv.c +++ b/src/container/container_iv.c @@ -497,8 +497,15 @@ cont_iv_ent_fetch(struct ds_iv_entry *entry, struct ds_iv_key *key, } prop_entry = daos_prop_entry_get(prop, DAOS_PROP_CO_STATUS); D_ASSERT(prop_entry != NULL); - daos_prop_val_2_co_status(prop_entry->dpe_val, &stat); + + rc = ds_cont_tgt_open(entry->ns->iv_pool_uuid, + civ_key->cont_uuid, chdl.ch_cont, + chdl.ch_flags, chdl.ch_sec_capas, + stat.dcs_pm_ver); + if (rc != 0) + D_GOTO(out, rc); + iv_entry.iv_capa.status_pm_ver = stat.dcs_pm_ver; daos_prop_free(prop); /* Only happens on xstream 0 */ @@ -510,6 +517,11 @@ cont_iv_ent_fetch(struct ds_iv_entry *entry, struct ds_iv_key *key, rc = dbtree_update(root_hdl, &key_iov, &val_iov); if (rc == 0) goto again; + /* + * It seems that not rolling back the ds_cont_tgt_open call + * above is harmless. Also, an error from the dbtree_update + * call should be rare. + */ } else { rc = -DER_NONEXIST; }