From a42a1b15ef2cfd47cc696acf0487c35e07ecdcd3 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 10 Mar 2007 11:37:53 -0500 Subject: [svn-r13488] Description: Remove unused "min. creation order" field from link info object header message. Tested on: FreeBSD/32 6.2 (duty) Mac OS X/32 10.4.8 (amazon) --- src/H5Gobj.c | 4 +--- src/H5Gprivate.h | 2 -- src/H5Gpublic.h | 1 - src/H5Olinfo.c | 7 +------ src/H5Oprivate.h | 4 +++- test/be_extlink1.h5 | Bin 936 -> 928 bytes test/le_extlink1.h5 | Bin 936 -> 928 bytes test/links.c | 15 --------------- test/stab.c | 8 ++++---- tools/testfiles/h5diff_types.h5 | Bin 4874 -> 4874 bytes 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 +- tools/testfiles/h5repack_objs.h5 | Bin 19568 -> 19568 bytes tools/testfiles/tall-2A.h5.xml | 4 ++-- tools/testfiles/tall.h5 | Bin 10072 -> 10056 bytes tools/testfiles/tall.h5.xml | 4 ++-- tools/testfiles/tboot1.ddl | 2 +- tools/testfiles/textlink.h5 | Bin 992 -> 984 bytes tools/testfiles/tfcontents1.h5 | Bin 7610 -> 7610 bytes tools/testfiles/tmany.h5 | Bin 18728 -> 18720 bytes tools/testfiles/tudlink.h5 | Bin 952 -> 944 bytes tools/testfiles/twithub.h5 | Bin 10760 -> 10752 bytes tools/testfiles/twithub513.h5 | Bin 11304 -> 11280 bytes 25 files changed, 23 insertions(+), 46 deletions(-) diff --git a/src/H5Gobj.c b/src/H5Gobj.c index 81dbf2d..07942c9 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -686,7 +686,6 @@ H5G_obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id) if(H5O_msg_read(oloc, H5O_LINFO_ID, &linfo, dxpl_id)) { /* Retrieve the information about the links */ grp_info->nlinks = linfo.nlinks; - grp_info->min_corder = linfo.min_corder; grp_info->max_corder = linfo.max_corder; /* Check if the group is using compact or dense storage for its links */ @@ -705,7 +704,6 @@ H5G_obj_info(H5O_loc_t *oloc, H5G_info_t *grp_info, hid_t dxpl_id) /* Set the other information about the group */ grp_info->storage_type = H5G_STORAGE_TYPE_SYMBOL_TABLE; - grp_info->min_corder = 0; grp_info->max_corder = 0; } /* end else */ @@ -867,7 +865,7 @@ H5G_obj_remove_update_linfo(H5O_loc_t *oloc, H5O_linfo_t *linfo, hid_t dxpl_id) /* Reset the creation order min/max if there's no more links in group */ if(linfo->nlinks == 0) - linfo->min_corder = linfo->max_corder = 0; + linfo->max_corder = 0; /* Check for transitioning out of dense storage, if we are using it */ if(H5F_addr_defined(linfo->link_fheap_addr)) { diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 934933e..2a9ed2e 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -62,7 +62,6 @@ /* Defaults for link info values */ #define H5G_CRT_LINFO_INDEX_CORDER FALSE #define H5G_CRT_LINFO_NLINKS 0 -#define H5G_CRT_LINFO_MIN_CORDER 0 #define H5G_CRT_LINFO_MAX_CORDER 0 #define H5G_CRT_LINFO_LINK_FHEAP_ADDR HADDR_UNDEF #define H5G_CRT_LINFO_NAME_BT2_ADDR HADDR_UNDEF @@ -72,7 +71,6 @@ #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, \ - H5G_CRT_LINFO_MIN_CORDER, \ H5G_CRT_LINFO_MAX_CORDER, \ H5G_CRT_LINFO_CORDER_BT2_ADDR, \ H5G_CRT_LINFO_NLINKS, \ diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index 160a506..598d04e 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -74,7 +74,6 @@ typedef enum H5G_storage_type_t { typedef struct H5G_info_t { H5G_storage_type_t storage_type; /* Type of storage for links in group */ hsize_t nlinks; /* Number of links in group */ - int64_t min_corder; /* Current min. creation order value for group */ int64_t max_corder; /* Current max. creation order value for group */ } H5G_info_t; diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c index e3ea8fd..d7cf9f8 100644 --- a/src/H5Olinfo.c +++ b/src/H5Olinfo.c @@ -141,7 +141,6 @@ H5O_linfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags, H5F_DECODE_LENGTH(f, p, linfo->nlinks) /* Min. & max creation order value for the group */ - INT64DECODE(p, linfo->min_corder) INT64DECODE(p, linfo->max_corder) /* Address of fractal heap to store "dense" links */ @@ -206,7 +205,6 @@ H5O_linfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void H5F_ENCODE_LENGTH(f, p, linfo->nlinks) /* Min. & max creation order value for the group */ - INT64ENCODE(p, linfo->min_corder) INT64ENCODE(p, linfo->max_corder) /* Address of fractal heap to store "dense" links */ @@ -293,7 +291,6 @@ 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. min. creation order value */ + 8 /* 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 */ @@ -400,7 +397,7 @@ H5O_linfo_copy_file(H5F_t UNUSED *file_src, void *native_src, H5F_t *file_dst, */ if(cpy_info->max_depth >= 0 && cpy_info->curr_depth >= cpy_info->max_depth) { linfo_dst->nlinks = 0; - linfo_dst->min_corder = linfo_dst->max_corder = 0; + linfo_dst->max_corder = 0; linfo_dst->link_fheap_addr = HADDR_UNDEF; linfo_dst->name_bt2_addr = HADDR_UNDEF; linfo_dst->corder_bt2_addr = HADDR_UNDEF; @@ -570,8 +567,6 @@ H5O_linfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth, "Number of links:", linfo->nlinks); HDfprintf(stream, "%*s%-*s %Hd\n", indent, "", fwidth, - "Min. creation order value:", linfo->min_corder); - HDfprintf(stream, "%*s%-*s %Hd\n", indent, "", fwidth, "Max. creation order value:", linfo->max_corder); HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth, "'Dense' link storage fractal heap address:", linfo->link_fheap_addr); diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index c916f7e..69635a5 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -173,11 +173,13 @@ typedef struct H5O_shared_t { * link info structure in src/H5Gprivate.h - QAK) * (if the fields in this struct are changed, also look at the code that * creates intermediate groups in src/H5Gtraverse.c - QAK) + * (The "max. creation order" field is signed so that we might have an easy + * way to add links to the front of the creation ordering (with negative + * values) as well as the end of the creation ordering - QAK) */ typedef struct H5O_linfo_t { /* (creation order info) */ hbool_t index_corder; /* Are creation order values indexed on links? */ - int64_t min_corder; /* Current min. creation order value for group */ 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 */ diff --git a/test/be_extlink1.h5 b/test/be_extlink1.h5 index 551d6bd..d8838f9 100644 Binary files a/test/be_extlink1.h5 and b/test/be_extlink1.h5 differ diff --git a/test/le_extlink1.h5 b/test/le_extlink1.h5 index fd45585..07298b0 100644 Binary files a/test/le_extlink1.h5 and b/test/le_extlink1.h5 differ diff --git a/test/links.c b/test/links.c index 813b232..eb7b596 100644 --- a/test/links.c +++ b/test/links.c @@ -9008,7 +9008,6 @@ group_info(hid_t fapl) /* Check (new/empty) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != 0) TEST_ERROR if(grp_info.nlinks != 0) TEST_ERROR @@ -9029,7 +9028,6 @@ group_info(hid_t fapl) /* Check (new) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR @@ -9044,7 +9042,6 @@ group_info(hid_t fapl) /* Check (new) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR } /* end if */ @@ -9058,7 +9055,6 @@ group_info(hid_t fapl) /* Check main group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR @@ -9072,7 +9068,6 @@ group_info(hid_t fapl) /* Check soft link group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR } /* end for */ @@ -9103,7 +9098,6 @@ group_info(hid_t fapl) /* Check (new/empty) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_COMPACT) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != 0) TEST_ERROR if(grp_info.nlinks != 0) TEST_ERROR @@ -9124,7 +9118,6 @@ group_info(hid_t fapl) /* Check (new) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR @@ -9139,7 +9132,6 @@ group_info(hid_t fapl) /* Check (new) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR } /* end if */ @@ -9153,7 +9145,6 @@ group_info(hid_t fapl) /* Check main group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR @@ -9167,7 +9158,6 @@ group_info(hid_t fapl) /* Check soft link group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_DENSE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != (int64_t)(u + 1)) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR } /* end for */ @@ -9288,7 +9278,6 @@ group_info_old(hid_t fapl) /* Check (new/empty) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != 0) TEST_ERROR if(grp_info.nlinks != 0) TEST_ERROR @@ -9309,7 +9298,6 @@ group_info_old(hid_t fapl) /* Check (new) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != 0) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR @@ -9324,7 +9312,6 @@ group_info_old(hid_t fapl) /* Check (new) group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != 0) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR } /* end if */ @@ -9338,7 +9325,6 @@ group_info_old(hid_t fapl) /* Check main group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != 0) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR @@ -9352,7 +9338,6 @@ group_info_old(hid_t fapl) /* Check soft link group's information */ if(grp_info.storage_type != H5G_STORAGE_TYPE_SYMBOL_TABLE) TEST_ERROR - if(grp_info.min_corder != 0) TEST_ERROR if(grp_info.max_corder != 0) TEST_ERROR if(grp_info.nlinks != (hsize_t)(u + 1)) TEST_ERROR } /* end for */ diff --git a/test/stab.c b/test/stab.c index aea93c6..d2fb493 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 != 206) TEST_ERROR + if(obj_stat.ohdr.size != 198) TEST_ERROR #else /* H5_HAVE_LARGE_HSIZET */ - if(obj_stat.ohdr.size != 186) TEST_ERROR + if(obj_stat.ohdr.size != 178) 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 != 206) TEST_ERROR + if(obj_stat.ohdr.size != 198) TEST_ERROR #else /* H5_HAVE_LARGE_HSIZET */ - if(obj_stat.ohdr.size != 186) TEST_ERROR + if(obj_stat.ohdr.size != 178) 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/h5diff_types.h5 b/tools/testfiles/h5diff_types.h5 index 02a3913..fd75f34 100644 Binary files a/tools/testfiles/h5diff_types.h5 and b/tools/testfiles/h5diff_types.h5 differ diff --git a/tools/testfiles/h5mkgrp_nested_latest.ls b/tools/testfiles/h5mkgrp_nested_latest.ls index 229a72d..c77238d 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:460 + Location: 1:444 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /one/two Group - Location: 1:254 + Location: 1:246 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 1ab0757..b155434 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:460 + Location: 1:444 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /one/two Group - Location: 1:254 + Location: 1:246 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /three Group - Location: 1:872 + Location: 1:840 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /three/four Group - Location: 1:666 + Location: 1:642 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 a20424d..1a266cb 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:254 + Location: 1:246 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX /two Group - Location: 1:460 + Location: 1:444 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 d4e8f60..ff62b91 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:254 + Location: 1:246 Links: 1 Modified: XXXX-XX-XX XX:XX:XX XXX diff --git a/tools/testfiles/h5repack_objs.h5 b/tools/testfiles/h5repack_objs.h5 index 6820e8b..509de91 100644 Binary files a/tools/testfiles/h5repack_objs.h5 and b/tools/testfiles/h5repack_objs.h5 differ diff --git a/tools/testfiles/tall-2A.h5.xml b/tools/testfiles/tall-2A.h5.xml index 32ef153..60daa12 100644 --- a/tools/testfiles/tall-2A.h5.xml +++ b/tools/testfiles/tall-2A.h5.xml @@ -134,7 +134,7 @@ Expected output for 'h5dump --xml -A tall.h5' - + @@ -157,7 +157,7 @@ Expected output for 'h5dump --xml -A tall.h5' - + diff --git a/tools/testfiles/tall.h5 b/tools/testfiles/tall.h5 index a08eee2..aff18d8 100644 Binary files a/tools/testfiles/tall.h5 and b/tools/testfiles/tall.h5 differ diff --git a/tools/testfiles/tall.h5.xml b/tools/testfiles/tall.h5.xml index 3752372..aec74d7 100644 --- a/tools/testfiles/tall.h5.xml +++ b/tools/testfiles/tall.h5.xml @@ -147,7 +147,7 @@ Expected output for 'h5dump --xml tall.h5' - + @@ -172,7 +172,7 @@ Expected output for 'h5dump --xml tall.h5' - + diff --git a/tools/testfiles/tboot1.ddl b/tools/testfiles/tboot1.ddl index 9a7cafc..df1a85e 100644 --- a/tools/testfiles/tboot1.ddl +++ b/tools/testfiles/tboot1.ddl @@ -17,7 +17,7 @@ USER_BLOCK { USERBLOCK_SIZE 0 } DATASET "dset" { - DATATYPE H5T_STD_I32BE + DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 4 ) / ( 4 ) } } } diff --git a/tools/testfiles/textlink.h5 b/tools/testfiles/textlink.h5 index 6dd0e8d..d767a41 100644 Binary files a/tools/testfiles/textlink.h5 and b/tools/testfiles/textlink.h5 differ diff --git a/tools/testfiles/tfcontents1.h5 b/tools/testfiles/tfcontents1.h5 index bd0cd88..508b504 100644 Binary files a/tools/testfiles/tfcontents1.h5 and b/tools/testfiles/tfcontents1.h5 differ diff --git a/tools/testfiles/tmany.h5 b/tools/testfiles/tmany.h5 index 6041ca2..7297842 100644 Binary files a/tools/testfiles/tmany.h5 and b/tools/testfiles/tmany.h5 differ diff --git a/tools/testfiles/tudlink.h5 b/tools/testfiles/tudlink.h5 index d93b82a..b182a1f 100644 Binary files a/tools/testfiles/tudlink.h5 and b/tools/testfiles/tudlink.h5 differ diff --git a/tools/testfiles/twithub.h5 b/tools/testfiles/twithub.h5 index 97310ab..40f81c6 100644 Binary files a/tools/testfiles/twithub.h5 and b/tools/testfiles/twithub.h5 differ diff --git a/tools/testfiles/twithub513.h5 b/tools/testfiles/twithub513.h5 index e214cf7..3981219 100644 Binary files a/tools/testfiles/twithub513.h5 and b/tools/testfiles/twithub513.h5 differ -- cgit v0.12