From 77d62be955faff2f24568d2c9e4304d93d8acfda Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Fri, 20 Jun 2014 10:02:06 -0500 Subject: [svn-r25338] add link count and obj type metadata to the root group. --- examples/h5ff_client_obj.c | 14 ++++++++++++++ src/H5VLiod_file.c | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/examples/h5ff_client_obj.c b/examples/h5ff_client_obj.c index c5e75d3..f10c5cd 100644 --- a/examples/h5ff_client_obj.c +++ b/examples/h5ff_client_obj.c @@ -219,6 +219,20 @@ int main(int argc, char **argv) { fprintf(stderr, "size of comment is %d Comment is %s\n", ret_size, comment); free(comment); + ret = H5Oget_info_ff(file_id, &oinfo, rid2, H5_EVENT_STACK_NULL); + assert(ret == 0); + assert(H5O_TYPE_GROUP == oinfo.type); + fprintf(stderr, + "get_info: Group with OID: %"PRIx64", num attrs = %zu, ref count = %u\n", + oinfo.addr, oinfo.num_attrs, oinfo.rc); + + ret = H5Oget_info_by_name_ff(file_id, ".", &oinfo, H5P_DEFAULT, rid2, H5_EVENT_STACK_NULL); + assert(ret == 0); + assert(H5O_TYPE_GROUP == oinfo.type); + fprintf(stderr, + "get_info: Group with OID: %"PRIx64", num attrs = %zu, ref count = %u\n", + oinfo.addr, oinfo.num_attrs, oinfo.rc); + ret = H5Oget_info_ff(gid, &oinfo, rid2, H5_EVENT_STACK_NULL); assert(ret == 0); assert(H5O_TYPE_GROUP == oinfo.type); diff --git a/src/H5VLiod_file.c b/src/H5VLiod_file.c index 57a561a..d3263ce 100644 --- a/src/H5VLiod_file.c +++ b/src/H5VLiod_file.c @@ -204,6 +204,16 @@ H5VL_iod_server_file_create_cb(AXE_engine_t UNUSED axe_engine, if(SUCCEED != ret) HGOTO_ERROR_FF(ret, "can't insert link count KV value"); + /* insert link count metadata */ + ret = H5VL_iod_insert_link_count(mdkv_oh, first_tid, (uint64_t)1,cs_scope, NULL, NULL); + if(ret != SUCCEED) + HGOTO_ERROR_FF(ret, "can't insert KV value"); + + /* insert object type metadata */ + ret = H5VL_iod_insert_object_type(mdkv_oh, first_tid, H5I_GROUP, cs_scope, NULL, NULL); + if(ret != SUCCEED) + HGOTO_ERROR_FF(ret, "can't insert KV value"); + kv.value = &value; kv.value_len = sizeof(uint64_t); @@ -1029,6 +1039,16 @@ setup_eff_container(iod_handle_t coh, uint32_t cs_scope, unsigned num_peers, hbo if(SUCCEED != ret) HGOTO_ERROR_FF(ret, "can't insert link count KV value"); + /* insert link count metadata */ + ret = H5VL_iod_insert_link_count(mdkv_oh, first_tid, (uint64_t)1,cs_scope, NULL, NULL); + if(ret != SUCCEED) + HGOTO_ERROR_FF(ret, "can't insert KV value"); + + /* insert object type metadata */ + ret = H5VL_iod_insert_object_type(mdkv_oh, first_tid, H5I_GROUP, cs_scope, NULL, NULL); + if(ret != SUCCEED) + HGOTO_ERROR_FF(ret, "can't insert KV value"); + kv.value = &value; kv.value_len = sizeof(uint64_t); -- cgit v0.12