From 753a42edf644632e4a8049ec41fdb5c368b18a21 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 10 Mar 2007 14:08:42 -0500 Subject: [svn-r13490] Description: Move "creation order tracked" flag from "group info" to "link info" object header message and make the "max. creation order value" optional in the "link info", if the creation order for links is not tracked. Also, get rid of unused "index names" flag - names are always indexed currently. Tested on: FreeBSD/32 6.2 (duty) --- src/H5Gobj.c | 56 ++++++++------------------- src/H5Gprivate.h | 6 +-- src/H5Gtraverse.c | 3 +- src/H5Oainfo.c | 11 ++---- src/H5Oginfo.c | 12 +----- src/H5Olinfo.c | 24 +++++++----- src/H5Oprivate.h | 3 +- src/H5Pgcpl.c | 23 ++--------- test/stab.c | 8 ++-- tools/testfiles/h5mkgrp_nested_latest.ls | 4 +- tools/testfiles/h5mkgrp_nested_mult_latest.ls | 8 ++-- tools/testfiles/h5mkgrp_several_latest.ls | 4 +- tools/testfiles/h5mkgrp_single_latest.ls | 2 +- 13 files changed, 58 insertions(+), 106 deletions(-) diff --git a/src/H5Gobj.c b/src/H5Gobj.c index 07942c9..3ba294d 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -143,7 +143,7 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo, /* Check for using the latest version of the group format */ /* (add more checks for creating "new format" groups when needed) */ - if(H5F_USE_LATEST_FORMAT(f) || ginfo->track_corder) + if(H5F_USE_LATEST_FORMAT(f) || linfo->track_corder) use_latest_format = TRUE; else use_latest_format = FALSE; @@ -151,7 +151,7 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo, /* Make certain that the creation order is being tracked if an index is * going to be built on it. */ - if(linfo->index_corder && !ginfo->track_corder) + if(linfo->index_corder && !linfo->track_corder) HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it") /* Check if we should be using the latest version of the group format */ @@ -171,7 +171,7 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, const H5O_ginfo_t *ginfo, lnk.type = H5L_TYPE_HARD; lnk.corder = 0; - lnk.corder_valid = ginfo->track_corder; + lnk.corder_valid = linfo->track_corder; lnk.name = &null_char; link_size = H5O_msg_size_f(f, gcpl_id, H5O_LINK_ID, &lnk, (size_t)ginfo->est_name_len); HDassert(link_size); @@ -400,10 +400,9 @@ H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, hbool_t adj_link, hid_t dxpl_id) { H5O_linfo_t linfo; /* Link info message */ - H5O_ginfo_t ginfo; /* Group info message */ - hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for insertions or not */ - hbool_t use_new_dense = FALSE; /* Whether to use "dense" form of 'new format' group */ - herr_t ret_value = SUCCEED; /* Return value */ + hbool_t use_old_format; /* Whether to use 'old format' (symbol table) for insertions or not */ + hbool_t use_new_dense = FALSE; /* Whether to use "dense" form of 'new format' group */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5G_obj_insert, FAIL) @@ -415,17 +414,14 @@ H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Check if we have information about the number of objects in this group */ /* (by attempting to get the link info message for this group) */ if(H5O_msg_read(grp_oloc, H5O_LINFO_ID, &linfo, dxpl_id)) { + H5O_ginfo_t ginfo; /* Group info message */ size_t link_msg_size; /* Size of new link message in the file */ /* Using the new format for groups */ use_old_format = FALSE; - /* Get the group info */ - if(NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo, dxpl_id)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info") - /* Check for tracking creation order on this group's links */ - if(ginfo.track_corder) { + if(linfo.track_corder) { /* Set the creation order for the new link & indicate that it's valid */ obj_lnk->corder = linfo.max_corder; obj_lnk->corder_valid = TRUE; @@ -438,6 +434,10 @@ H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, if((link_msg_size = H5O_msg_raw_size(grp_oloc->file, H5O_LINK_ID, FALSE, obj_lnk)) == 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size") + /* Get the group info */ + if(NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo, dxpl_id)) + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info") + /* If there's still a small enough number of links, use the 'link' message */ /* (If the encoded form of the link is too large to fit into an object * header message, convert to using dense link storage instead of link messages) @@ -614,14 +614,8 @@ H5G_obj_iterate(hid_t loc_id, const char *group_name, /* Check for creation order tracking, if creation order index lookup requested */ if(idx_type == H5_INDEX_CRT_ORDER) { - H5O_ginfo_t ginfo; /* Group info message */ - - /* Get group info message, to see if creation order is tracked for links in this group */ - if(NULL == H5O_msg_read(&(grp->oloc), H5O_GINFO_ID, &ginfo, dxpl_id)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info message for group") - /* Check if creation order is tracked */ - if(!ginfo.track_corder) + if(!linfo.track_corder) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") } /* end if */ @@ -742,14 +736,8 @@ H5G_obj_get_name_by_idx(H5O_loc_t *oloc, H5_index_t idx_type, if(H5O_msg_read(oloc, H5O_LINFO_ID, &linfo, dxpl_id)) { /* Check for creation order tracking, if creation order index lookup requested */ if(idx_type == H5_INDEX_CRT_ORDER) { - H5O_ginfo_t ginfo; /* Group info message */ - - /* Get group info message, to see if creation order is tracked for links in this group */ - if(NULL == H5O_msg_read(oloc, H5O_GINFO_ID, &ginfo, dxpl_id)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info message for group") - /* Check if creation order is tracked */ - if(!ginfo.track_corder) + if(!linfo.track_corder) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") } /* end if */ @@ -1040,14 +1028,8 @@ H5G_obj_remove_by_idx(H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, if(H5O_msg_read(grp_oloc, H5O_LINFO_ID, &linfo, dxpl_id)) { /* Check for creation order tracking, if creation order index lookup requested */ if(idx_type == H5_INDEX_CRT_ORDER) { - H5O_ginfo_t ginfo; /* Group info message */ - - /* Get group info message, to see if creation order is tracked for links in this group */ - if(NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo, dxpl_id)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info message for group") - /* Check if creation order is tracked */ - if(!ginfo.track_corder) + if(!linfo.track_corder) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") } /* end if */ @@ -1177,14 +1159,8 @@ H5G_obj_lookup_by_idx(H5O_loc_t *grp_oloc, H5_index_t idx_type, if(H5O_msg_read(grp_oloc, H5O_LINFO_ID, &linfo, dxpl_id)) { /* Check for creation order tracking, if creation order index lookup requested */ if(idx_type == H5_INDEX_CRT_ORDER) { - H5O_ginfo_t ginfo; /* Group info message */ - - /* Get group info message, to see if creation order is tracked for links in this group */ - if(NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo, dxpl_id)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info message for group") - /* Check if creation order is tracked */ - if(!ginfo.track_corder) + if(!linfo.track_corder) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") } /* end if */ diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 2a9ed2e..d6707f7 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -60,6 +60,7 @@ /* ========= Group Creation properties ============ */ /* Defaults for link info values */ +#define H5G_CRT_LINFO_TRACK_CORDER FALSE #define H5G_CRT_LINFO_INDEX_CORDER FALSE #define H5G_CRT_LINFO_NLINKS 0 #define H5G_CRT_LINFO_MAX_CORDER 0 @@ -70,7 +71,8 @@ /* Definitions for link info settings */ #define H5G_CRT_LINK_INFO_NAME "link info" #define H5G_CRT_LINK_INFO_SIZE sizeof(H5O_linfo_t) -#define H5G_CRT_LINK_INFO_DEF {H5G_CRT_LINFO_INDEX_CORDER, \ +#define H5G_CRT_LINK_INFO_DEF {H5G_CRT_LINFO_TRACK_CORDER, \ + H5G_CRT_LINFO_INDEX_CORDER, \ H5G_CRT_LINFO_MAX_CORDER, \ H5G_CRT_LINFO_CORDER_BT2_ADDR, \ H5G_CRT_LINFO_NLINKS, \ @@ -80,7 +82,6 @@ /* Defaults for group info values */ #define H5G_CRT_GINFO_LHEAP_SIZE_HINT 0 -#define H5G_CRT_GINFO_TRACK_CORDER FALSE #define H5G_CRT_GINFO_MAX_COMPACT 8 #define H5G_CRT_GINFO_MIN_DENSE 6 #define H5G_CRT_GINFO_EST_NUM_ENTRIES 4 @@ -90,7 +91,6 @@ #define H5G_CRT_GROUP_INFO_NAME "group info" #define H5G_CRT_GROUP_INFO_SIZE sizeof(H5O_ginfo_t) #define H5G_CRT_GROUP_INFO_DEF {H5G_CRT_GINFO_LHEAP_SIZE_HINT, \ - H5G_CRT_GINFO_TRACK_CORDER, \ H5G_CRT_GINFO_MAX_COMPACT, \ H5G_CRT_GINFO_MIN_DENSE, \ H5G_CRT_GINFO_EST_NUM_ENTRIES, \ diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c index a7978c6..255059c 100644 --- a/src/H5Gtraverse.c +++ b/src/H5Gtraverse.c @@ -722,10 +722,11 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target, linfo = &def_linfo; } /* end if */ else { - /* Only keep the index_corder information from the parent + /* Only keep the creation order information from the parent * group's link info */ HDmemcpy(&tmp_linfo, &def_linfo, sizeof(H5O_linfo_t)); + tmp_linfo.track_corder = par_linfo.track_corder; tmp_linfo.index_corder = par_linfo.index_corder; linfo = &tmp_linfo; } /* end else */ diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index 7c3183a..655cb5e 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -76,10 +76,9 @@ const H5O_msg_class_t H5O_MSG_AINFO[1] = {{ #define H5O_AINFO_VERSION 0 /* Flags for attribute info flag encoding */ -#define H5O_AINFO_INDEX_NAME 0x01 -#define H5O_AINFO_TRACK_CORDER 0x02 -#define H5O_AINFO_INDEX_CORDER 0x04 -#define H5O_AINFO_ALL_FLAGS (H5O_AINFO_INDEX_NAME | H5O_AINFO_TRACK_CORDER | H5O_AINFO_INDEX_CORDER) +#define H5O_AINFO_TRACK_CORDER 0x01 +#define H5O_AINFO_INDEX_CORDER 0x02 +#define H5O_AINFO_ALL_FLAGS (H5O_AINFO_TRACK_CORDER | H5O_AINFO_INDEX_CORDER) /* Declare a free list to manage the H5O_ainfo_t struct */ H5FL_DEFINE_STATIC(H5O_ainfo_t); @@ -123,7 +122,6 @@ H5O_ainfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, /* Get the flags for the message */ flags = *p++; - HDassert(flags & H5O_AINFO_INDEX_NAME); if(flags & ~H5O_AINFO_ALL_FLAGS) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message") ainfo->track_corder = (flags & H5O_AINFO_TRACK_CORDER) ? TRUE : FALSE; @@ -191,8 +189,7 @@ H5O_ainfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *p++ = H5O_AINFO_VERSION; /* The flags for the attribute indices */ - flags = H5O_AINFO_INDEX_NAME; /* Names are always indexed */ - flags |= ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0; + flags = ainfo->track_corder ? H5O_AINFO_TRACK_CORDER : 0; flags |= ainfo->index_corder ? H5O_AINFO_INDEX_CORDER : 0; *p++ = flags; diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c index d5b2ed4..df99882 100644 --- a/src/H5Oginfo.c +++ b/src/H5Oginfo.c @@ -68,10 +68,6 @@ const H5O_msg_class_t H5O_MSG_GINFO[1] = {{ /* Current version of group info information */ #define H5O_GINFO_VERSION 0 -/* Flags for group info flag encoding */ -#define H5O_GINFO_FLAG_TRACK_NAME 0x01 -#define H5O_GINFO_FLAG_TRACK_CORDER 0x02 - /* Declare a free list to manage the H5O_ginfo_t struct */ H5FL_DEFINE_STATIC(H5O_ginfo_t); @@ -115,8 +111,6 @@ H5O_ginfo_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_fla /* Get the flags for the group */ flags = *p++; - HDassert(flags & H5O_GINFO_FLAG_TRACK_NAME); - ginfo->track_corder = (flags & H5O_GINFO_FLAG_TRACK_CORDER) ? TRUE : FALSE; /* Get the max. # of links to store compactly & the min. # of links to store densely */ UINT16DECODE(p, ginfo->max_compact) @@ -155,7 +149,7 @@ static herr_t H5O_ginfo_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_ginfo_t *ginfo = (const H5O_ginfo_t *) _mesg; - unsigned char flags; /* Flags for encoding group info */ + unsigned char flags = 0; /* Flags for encoding group info */ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_ginfo_encode) @@ -167,8 +161,6 @@ H5O_ginfo_encode(H5F_t UNUSED *f, hbool_t UNUSED disable_shared, uint8_t *p, con *p++ = H5O_GINFO_VERSION; /* The flags for the group info */ - flags = H5O_GINFO_FLAG_TRACK_NAME; /* Names are always tracked */ - flags |= ginfo->track_corder ? H5O_GINFO_FLAG_TRACK_CORDER : 0; *p++ = flags; /* Store the max. # of links to store compactly & the min. # of links to store densely */ @@ -319,8 +311,6 @@ H5O_ginfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * HDassert(indent >= 0); HDassert(fwidth >= 0); - HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, - "Track creation order of links:", ginfo->track_corder); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Max. compact links:", ginfo->max_compact); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c index d7cf9f8..0a2e145 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -77,9 +77,9 @@ const H5O_msg_class_t H5O_MSG_LINFO[1] = {{ #define H5O_LINFO_VERSION 0 /* Flags for link info index flag encoding */ -#define H5O_LINFO_INDEX_NAME 0x01 +#define H5O_LINFO_TRACK_CORDER 0x01 #define H5O_LINFO_INDEX_CORDER 0x02 -#define H5O_LINFO_ALL_FLAGS (H5O_LINFO_INDEX_NAME | H5O_LINFO_INDEX_CORDER) +#define H5O_LINFO_ALL_FLAGS (H5O_LINFO_TRACK_CORDER | H5O_LINFO_INDEX_CORDER) /* Data exchange structure to use when copying links from src to dst */ typedef struct { @@ -132,16 +132,19 @@ H5O_linfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, /* Get the index flags for the group */ index_flags = *p++; - HDassert(index_flags & H5O_LINFO_INDEX_NAME); if(index_flags & ~H5O_LINFO_ALL_FLAGS) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad flag value for message") + linfo->track_corder = (index_flags & H5O_LINFO_TRACK_CORDER) ? TRUE : FALSE; linfo->index_corder = (index_flags & H5O_LINFO_INDEX_CORDER) ? TRUE : FALSE; /* Number of links in the group */ H5F_DECODE_LENGTH(f, p, linfo->nlinks) - /* Min. & max creation order value for the group */ - INT64DECODE(p, linfo->max_corder) + /* Max. link creation order value for the group, if tracked */ + if(linfo->track_corder) + INT64DECODE(p, linfo->max_corder) + else + linfo->max_corder = 0; /* Address of fractal heap to store "dense" links */ H5F_addr_decode(f, &p, &(linfo->link_fheap_addr)); @@ -197,15 +200,16 @@ H5O_linfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *p++ = H5O_LINFO_VERSION; /* The flags for the link indices */ - index_flags = H5O_LINFO_INDEX_NAME; /* Names are always indexed */ + index_flags = linfo->track_corder ? H5O_LINFO_TRACK_CORDER : 0; index_flags |= linfo->index_corder ? H5O_LINFO_INDEX_CORDER : 0; *p++ = index_flags; /* Number of links in the group */ H5F_ENCODE_LENGTH(f, p, linfo->nlinks) - /* Min. & max creation order value for the group */ - INT64ENCODE(p, linfo->max_corder) + /* Max. link creation order value for the group, if tracked */ + if(linfo->track_corder) + INT64ENCODE(p, linfo->max_corder) /* Address of fractal heap to store "dense" links */ H5F_addr_encode(f, &p, linfo->link_fheap_addr); @@ -291,7 +295,7 @@ H5O_linfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg) ret_value = 1 /* Version */ + 1 /* Index flags */ + H5F_SIZEOF_SIZE(f) /* Number of links */ - + 8 /* Curr. max. creation order value */ + + (linfo->track_corder ? 8 : 0) /* Curr. max. creation order value */ + H5F_SIZEOF_ADDR(f) /* Address of fractal heap to store "dense" links */ + H5F_SIZEOF_ADDR(f) /* Address of v2 B-tree for indexing names of links */ + (linfo->index_corder ? H5F_SIZEOF_ADDR(f) : 0); /* Address of v2 B-tree for indexing creation order values of links */ @@ -563,6 +567,8 @@ H5O_linfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * HDassert(fwidth >= 0); HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, + "Track creation order of links:", linfo->track_corder); + HDfprintf(stream, "%*s%-*s %t\n", indent, "", fwidth, "Index creation order of links:", linfo->index_corder); HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of links:", linfo->nlinks); diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 69635a5..132dbe7 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -179,6 +179,7 @@ typedef struct H5O_shared_t { */ typedef struct H5O_linfo_t { /* (creation order info) */ + hbool_t track_corder; /* Are creation order values tracked on links? */ hbool_t index_corder; /* Are creation order values indexed on links? */ int64_t max_corder; /* Current max. creation order value for group */ haddr_t corder_bt2_addr; /* Address of v2 B-tree for indexing creation order values of links */ @@ -321,8 +322,6 @@ typedef struct H5O_ginfo_t { uint32_t lheap_size_hint; /* Local heap size hint */ /* "New" format group info (stored) */ - /* (creation order info) */ - hbool_t track_corder; /* Are creation order values tracked on links? */ /* (storage management info) */ uint16_t max_compact; /* Maximum # of compact links */ diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c index 74b6bc6..b1ed560 100644 --- a/src/H5Pgcpl.c +++ b/src/H5Pgcpl.c @@ -424,7 +424,6 @@ herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags) { H5P_genplist_t *plist; /* Property list pointer */ - H5O_ginfo_t ginfo; /* Group information structure */ H5O_linfo_t linfo; /* Link information structure */ herr_t ret_value = SUCCEED; /* Return value */ @@ -439,22 +438,12 @@ H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags) if(NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - /* Get group info */ - if(H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") - - /* Update field */ - ginfo.track_corder = (crt_order_flags & H5P_CRT_ORDER_TRACKED) ? TRUE : FALSE; - - /* Set group info */ - if(H5P_set(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info") - /* Get link info */ if(H5P_get(plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get link info") - /* Update field */ + /* Update fields */ + linfo.track_corder = (crt_order_flags & H5P_CRT_ORDER_TRACKED) ? TRUE : FALSE; linfo.index_corder = (crt_order_flags & H5P_CRT_ORDER_INDEXED) ? TRUE : FALSE; /* Set link info */ @@ -489,7 +478,6 @@ H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/) /* Get values */ if(crt_order_flags) { H5P_genplist_t *plist; /* Property list pointer */ - H5O_ginfo_t ginfo; /* Group information structure */ H5O_linfo_t linfo; /* Link information structure */ /* Reset the value to return */ @@ -499,16 +487,11 @@ H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/) if(NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") - /* Get group info */ - if(H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info") - - *crt_order_flags |= ginfo.track_corder ? H5P_CRT_ORDER_TRACKED : 0; - /* Get link info */ if(H5P_get(plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get link info") + *crt_order_flags |= linfo.track_corder ? H5P_CRT_ORDER_TRACKED : 0; *crt_order_flags |= linfo.index_corder ? H5P_CRT_ORDER_INDEXED : 0; } /* end if */ diff --git a/test/stab.c b/test/stab.c index d2fb493..5275454 100644 --- a/test/stab.c +++ b/test/stab.c @@ -427,9 +427,9 @@ lifecycle(hid_t fapl) /* Check that the object header is only one chunk and the space has been allocated correctly */ if(H5Gget_objinfo(gid, ".", FALSE, &obj_stat) < 0) TEST_ERROR #ifdef H5_HAVE_LARGE_HSIZET - if(obj_stat.ohdr.size != 198) TEST_ERROR + if(obj_stat.ohdr.size != 190) TEST_ERROR #else /* H5_HAVE_LARGE_HSIZET */ - if(obj_stat.ohdr.size != 178) TEST_ERROR + if(obj_stat.ohdr.size != 170) TEST_ERROR #endif /* H5_HAVE_LARGE_HSIZET */ if(obj_stat.ohdr.free != 0) TEST_ERROR if(obj_stat.ohdr.nmesgs != 6) TEST_ERROR @@ -453,9 +453,9 @@ lifecycle(hid_t fapl) /* Check that the object header is still one chunk and the space has been allocated correctly */ if(H5Gget_objinfo(gid, ".", FALSE, &obj_stat) < 0) TEST_ERROR #ifdef H5_HAVE_LARGE_HSIZET - if(obj_stat.ohdr.size != 198) TEST_ERROR + if(obj_stat.ohdr.size != 190) TEST_ERROR #else /* H5_HAVE_LARGE_HSIZET */ - if(obj_stat.ohdr.size != 178) TEST_ERROR + if(obj_stat.ohdr.size != 170) TEST_ERROR #endif /* H5_HAVE_LARGE_HSIZET */ if(obj_stat.ohdr.free != 112) TEST_ERROR if(obj_stat.ohdr.nmesgs != 3) TEST_ERROR diff --git a/tools/testfiles/h5mkgrp_nested_latest.ls b/tools/testfiles/h5mkgrp_nested_latest.ls index c77238d..4ac4374 100644 --- a/tools/testfiles/h5mkgrp_nested_latest.ls +++ b/tools/testfiles/h5mkgrp_nested_latest.ls @@ -3,10 +3,10 @@ Expected output for 'h5ls ../testfiles/h5mkgrp_nested_latest.h5' ############################# Opened "../testfiles/h5mkgrp_nested_latest.h5" with sec2 driver. /one Group - Location: 1:444 + Location: 1:428 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /one/two Group - Location: 1:246 + Location: 1:238 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX diff --git a/tools/testfiles/h5mkgrp_nested_mult_latest.ls b/tools/testfiles/h5mkgrp_nested_mult_latest.ls index b155434..54ca444 100644 --- a/tools/testfiles/h5mkgrp_nested_mult_latest.ls +++ b/tools/testfiles/h5mkgrp_nested_mult_latest.ls @@ -3,18 +3,18 @@ Expected output for 'h5ls ../testfiles/h5mkgrp_nested_mult_latest.h5' ############################# Opened "../testfiles/h5mkgrp_nested_mult_latest.h5" with sec2 driver. /one Group - Location: 1:444 + Location: 1:428 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /one/two Group - Location: 1:246 + Location: 1:238 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /three Group - Location: 1:840 + Location: 1:808 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /three/four Group - Location: 1:642 + Location: 1:618 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX diff --git a/tools/testfiles/h5mkgrp_several_latest.ls b/tools/testfiles/h5mkgrp_several_latest.ls index 1a266cb..9e238ba 100644 --- a/tools/testfiles/h5mkgrp_several_latest.ls +++ b/tools/testfiles/h5mkgrp_several_latest.ls @@ -3,10 +3,10 @@ Expected output for 'h5ls ../testfiles/h5mkgrp_several_latest.h5' ############################# Opened "../testfiles/h5mkgrp_several_latest.h5" with sec2 driver. /one Group - Location: 1:246 + Location: 1:238 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /two Group - Location: 1:444 + Location: 1:428 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX diff --git a/tools/testfiles/h5mkgrp_single_latest.ls b/tools/testfiles/h5mkgrp_single_latest.ls index ff62b91..085d182 100644 --- a/tools/testfiles/h5mkgrp_single_latest.ls +++ b/tools/testfiles/h5mkgrp_single_latest.ls @@ -3,6 +3,6 @@ Expected output for 'h5ls ../testfiles/h5mkgrp_single_latest.h5' ############################# Opened "../testfiles/h5mkgrp_single_latest.h5" with sec2 driver. /latest Group - Location: 1:246 + Location: 1:238 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX -- cgit v0.12