summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-27 22:12:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-27 22:12:29 (GMT)
commit0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408 (patch)
tree4c26e29b7ce8bdf8ad82c6c83e6f60a61f37412f
parent648aa268c83f85003ff031dd396508c9547a561e (diff)
downloadhdf5-0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408.zip
hdf5-0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408.tar.gz
hdf5-0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408.tar.bz2
[svn-r13427] Description:
Eliminate some unnecessary properties for unused aspects of superblock. Tested on: Mac OS X/32 10.4.8 (amazon)
-rw-r--r--src/H5Fdbg.c74
-rw-r--r--src/H5Fprivate.h25
-rw-r--r--src/H5Fsuper.c99
-rw-r--r--src/H5Pfcpl.c34
4 files changed, 95 insertions, 137 deletions
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index b504bc1..9db8b2f 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -38,79 +38,65 @@
* is indented and the field name occupies the specified width
* number of characters.
*
- * Errors:
- *
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Aug 1 1997
*
- * Modifications:
- * Robb Matzke, 1999-07-28
- * The ADDR argument is passed by value.
- *
- * Raymond Lu, 2001-10-14
- * Changed to the new generic property list.
- *
*-------------------------------------------------------------------------
*/
herr_t
H5F_debug(H5F_t *f, hid_t dxpl_id, FILE * stream, int indent, int fwidth)
{
- hsize_t userblock_size;
- int super_vers, freespace_vers, obj_dir_vers, share_head_vers;
- H5P_genplist_t *plist; /* Property list */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5P_genplist_t *plist; /* File creation property list */
+ hsize_t userblock_size; /* Userblock size */
+ unsigned super_vers; /* Superblock version # */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_debug, FAIL)
/* check args */
- assert(f);
- assert(stream);
- assert(indent >= 0);
- assert(fwidth >= 0);
+ HDassert(f);
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
/* Get property list */
if(NULL == (plist = H5I_object(f->shared->fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
- if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get user block size")
- if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, &super_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get super block version")
- if(H5P_get(plist, H5F_CRT_FREESPACE_VERS_NAME, &freespace_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get super block version")
- if(H5P_get(plist, H5F_CRT_OBJ_DIR_VERS_NAME, &obj_dir_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object directory version")
- if(H5P_get(plist, H5F_CRT_SHARE_HEAD_VERS_NAME, &share_head_vers)<0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get shared-header format version")
+ /* Retrieve file creation properties */
+ if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size")
+ if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get superblock version")
/* debug */
HDfprintf(stream, "%*sFile Super Block...\n", indent, "");
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "File name:",
- f->name);
+ "File name:", f->name);
HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth,
- "File access flags",
- (unsigned) (f->shared->flags));
+ "File access flags", f->shared->flags);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "File open reference count:",
- (unsigned) (f->shared->nrefs));
+ "File open reference count:", f->shared->nrefs);
HDfprintf(stream, "%*s%-*s %a (abs)\n", indent, "", fwidth,
"Address of super block:", f->shared->super_addr);
- HDfprintf(stream, "%*s%-*s %lu bytes\n", indent, "", fwidth,
- "Size of user block:", (unsigned long) userblock_size);
+ HDfprintf(stream, "%*s%-*s %Hu bytes\n", indent, "", fwidth,
+ "Size of userblock:", userblock_size);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Super block version number:", (unsigned) super_vers);
+ "Superblock version number:", super_vers);
+
+ /* Hard-wired versions */
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Free list version number:", (unsigned) freespace_vers);
+ "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Root group symbol table entry version number:", (unsigned) obj_dir_vers);
+ "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
- "Shared header version number:", (unsigned) share_head_vers);
+ "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION);
+
HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
"Size of file offsets (haddr_t type):", (unsigned) f->shared->sizeof_addr);
HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth,
@@ -140,7 +126,7 @@ H5F_debug(H5F_t *f, hid_t dxpl_id, FILE * stream, int indent, int fwidth)
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Root group symbol table entry:",
f->shared->root_grp ? "" : "(none)");
- if (f->shared->root_grp) {
+ if(f->shared->root_grp) {
H5O_loc_t *root_oloc; /* Root object location */
H5G_entry_t root_ent; /* Constructed root symbol table entry */
@@ -154,11 +140,11 @@ H5F_debug(H5F_t *f, hid_t dxpl_id, FILE * stream, int indent, int fwidth)
root_ent.header = root_oloc->addr;
root_ent.file = f;
- H5G_ent_debug(f, dxpl_id, &root_ent, stream,
- indent+3, MAX(0, fwidth-3), HADDR_UNDEF);
- }
+ /* Display root group symbol table entry info */
+ H5G_ent_debug(f, dxpl_id, &root_ent, stream, indent + 3, MAX(0, fwidth - 3), HADDR_UNDEF);
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
-}
+} /* end H5F_debug() */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index ee81c6d..1084ab5 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -337,18 +337,16 @@ typedef struct H5F_t H5F_t;
/* ========= File Creation properties ============ */
#define H5F_CRT_USER_BLOCK_NAME "block_size" /* Size of the file user block in bytes */
#define H5F_CRT_SYM_LEAF_NAME "symbol_leaf" /* 1/2 rank for symbol table leaf nodes */
+#define H5F_CRT_SYM_LEAF_DEF 4
#define H5F_CRT_BTREE_RANK_NAME "btree_rank" /* 1/2 rank for btree internal nodes */
#define H5F_CRT_ADDR_BYTE_NUM_NAME "addr_byte_num" /* Byte number in an address */
-#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */
-#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */
-#define H5F_CRT_FREESPACE_VERS_NAME "free_space_version" /* Free-space version number */
-#define H5F_CRT_OBJ_DIR_VERS_NAME "obj_dir_version" /* Object directory version number */
-#define H5F_CRT_SHARE_HEAD_VERS_NAME "share_head_version" /* Shared-header format version */
-#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */
+#define H5F_CRT_OBJ_BYTE_NUM_NAME "obj_byte_num" /* Byte number for object size */
+#define H5F_CRT_SUPER_VERS_NAME "super_version" /* Version number of the superblock */
+#define H5F_CRT_SHMSG_NINDEXES_NAME "num_shmsg_indexes" /* Number of shared object header message indexes */
#define H5F_CRT_SHMSG_INDEX_TYPES_NAME "shmsg_message_types" /* Types of message in each index */
#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" /* Minimum size of messages in each index */
-#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */
-#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */
+#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */
+#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */
@@ -384,13 +382,12 @@ typedef struct H5F_t H5F_t;
/* Version #'s of the major components of the file format */
#define HDF5_SUPERBLOCK_VERSION_DEF 0 /* The default super block format */
#define HDF5_SUPERBLOCK_VERSION_1 1 /* Version with non-default B-tree 'K' value */
-#define HDF5_SUPERBLOCK_VERSION_2 2 /* Version with superblock extension and checksum */
+#define HDF5_SUPERBLOCK_VERSION_2 2 /* Revised version with superblock extension and checksum */
#define HDF5_SUPERBLOCK_VERSION_LATEST HDF5_SUPERBLOCK_VERSION_2 /* The maximum super block format */
-#define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */
-#define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */
-#define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */
-#define HDF5_DRIVERINFO_VERSION_0 0 /* of the Driver Information Block*/
-#define HDF5_DRIVERINFO_VERSION_LATEST HDF5_DRIVERINFO_VERSION_0 /* Maximum driver info block format */
+#define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */
+#define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */
+#define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */
+#define HDF5_DRIVERINFO_VERSION_0 0 /* of the Driver Information Block*/
/* B-tree internal 'K' values */
#define HDF5_BTREE_SNODE_IK_DEF 16
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 469ee9d..5a3692a 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -244,9 +244,6 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc)
H5FD_t *lf = NULL; /* file driver part of `shared' */
uint8_t *p; /* Temporary pointer into encoding buffer */
unsigned super_vers; /* Superblock version */
- unsigned freespace_vers; /* Freespace info version */
- unsigned obj_dir_vers; /* Object header info version */
- unsigned share_head_vers; /* Shared header info version */
uint8_t buf[H5F_MAX_SUPERBLOCK_SIZE + H5F_MAX_DRVINFOBLOCK_SIZE]; /* Buffer for superblock & driver info block */
H5P_genplist_t *c_plist; /* File creation property list */
herr_t ret_value = SUCCEED;
@@ -297,28 +294,19 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to read superblock")
/* Freespace version */
- freespace_vers = *p++;
- if(HDF5_FREESPACE_VERSION != freespace_vers)
+ if(HDF5_FREESPACE_VERSION != *p++)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad free space version number")
- if(H5P_set(c_plist, H5F_CRT_FREESPACE_VERS_NAME, &freespace_vers) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set free space version")
/* Root group version number */
- obj_dir_vers = *p++;
- if(HDF5_OBJECTDIR_VERSION != obj_dir_vers)
+ if(HDF5_OBJECTDIR_VERSION != *p++)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad object directory version number")
- if(H5P_set(c_plist, H5F_CRT_OBJ_DIR_VERS_NAME, &obj_dir_vers) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set object directory version")
/* Skip over reserved byte */
p++;
/* Shared header version number */
- share_head_vers = *p++;
- if(HDF5_SHAREDHEADER_VERSION != share_head_vers)
+ if(HDF5_SHAREDHEADER_VERSION != *p++)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "bad shared-header format version number")
- if(H5P_set(c_plist, H5F_CRT_SHARE_HEAD_VERS_NAME, &share_head_vers) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set shared-header format version")
/* Size of file addresses */
sizeof_addr = *p++;
@@ -435,7 +423,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc)
/* Version number */
drv_vers = *p++;
- if(drv_vers > HDF5_DRIVERINFO_VERSION_LATEST)
+ if(drv_vers != HDF5_DRIVERINFO_VERSION_0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "bad driver information block version number")
p += 3; /* reserved bytes */
@@ -499,7 +487,7 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc)
* address.
*/
if(H5P_set(c_plist, H5F_CRT_USER_BLOCK_NAME, &shared->base_addr) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set user block size")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set userblock size")
/*
* Make sure that the data is not truncated. One case where this is
@@ -573,12 +561,13 @@ done:
herr_t
H5F_init_superblock(H5F_t *f, H5O_loc_t *ext_loc, hid_t dxpl_id)
{
- hsize_t userblock_size = 0; /* Size of userblock, in bytes */
- size_t superblock_size; /* Size of superblock, in bytes */
- size_t driver_size; /* Size of driver info block (bytes)*/
- unsigned super_vers; /* Superblock version */
- haddr_t addr; /* Address of superblock */
- H5P_genplist_t *plist; /* Property list */
+ hsize_t userblock_size; /* Size of userblock, in bytes */
+ size_t superblock_size; /* Size of superblock, in bytes */
+ size_t driver_size; /* Size of driver info block (bytes) */
+ unsigned super_vers; /* Superblock version */
+ haddr_t super_addr; /* Address of superblock */
+ H5P_genplist_t *plist; /* File creation property list */
+ hbool_t need_ext; /* Whether the superblock extension is needed */
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI(H5F_init_superblock, FAIL)
@@ -594,7 +583,7 @@ H5F_init_superblock(H5F_t *f, H5O_loc_t *ext_loc, hid_t dxpl_id)
* now.
*/
if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get user block size")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get userblock size")
f->shared->super_addr = userblock_size;
f->shared->base_addr = f->shared->super_addr;
f->shared->consist_flags = 0x03;
@@ -619,26 +608,49 @@ H5F_init_superblock(H5F_t *f, H5O_loc_t *ext_loc, hid_t dxpl_id)
} /* end if */
/*
- * Allocate space for the userblock, superblock, driver info
- * block, and shared object header message table. We do it with
- * one allocation request because the userblock and superblock
- * need to be at the beginning of the file and only the first
- * allocation request is required to return memory at format
- * address zero.
+ * Allocate space for the userblock, superblock & driver info blocks.
+ * We do it with one allocation request because the userblock and
+ * superblock need to be at the beginning of the file and only the first
+ * allocation request is required to return memory at format address zero.
*/
H5_CHECK_OVERFLOW(f->shared->base_addr, haddr_t, hsize_t);
- addr = H5FD_alloc(f->shared->lf, H5FD_MEM_SUPER, dxpl_id,
+ super_addr = H5FD_alloc(f->shared->lf, H5FD_MEM_SUPER, dxpl_id,
((hsize_t)f->shared->base_addr + superblock_size + driver_size));
- if(HADDR_UNDEF == addr)
+ if(HADDR_UNDEF == super_addr)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to allocate file space for userblock and/or superblock")
- if(0 != addr)
+ if(0 != super_addr)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "file driver failed to allocate userblock and/or superblock at address zero")
- /* Create the superblock extension for "extra" superblock data, if necessary.
- * (Currently, the extension is only needed if Shared Object Header
- * Messages are enabled)
+ /*
+ * Determine if we will need a superblock extension
*/
+
+ /* Files with SOHM indices always need the superblock extension */
if(f->shared->sohm_nindexes > 0) {
+ HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ need_ext = TRUE;
+ } /* end if */
+ /* If we're going to use a version of the superblock format which allows
+ * for the superblock extension, check for non-default values to store
+ * in it.
+ */
+ else if(super_vers >= HDF5_SUPERBLOCK_VERSION_2) {
+ /* Check for non-default v1 B-tree 'K' values to store */
+ if(f->shared->btree_k[H5B_SNODE_ID] != HDF5_BTREE_SNODE_IK_DEF ||
+ f->shared->btree_k[H5B_ISTORE_ID] != HDF5_BTREE_ISTORE_IK_DEF ||
+ f->shared->sym_leaf_k != H5F_CRT_SYM_LEAF_DEF)
+ need_ext = TRUE;
+ /* Check for driver info to store */
+ else if(driver_size > 0)
+ need_ext = TRUE;
+ else
+ need_ext = FALSE;
+ } /* end if */
+ else
+ need_ext = FALSE;
+
+ /* Create the superblock extension for "extra" superblock data, if necessary. */
+ if(need_ext) {
/* The superblock extension isn't actually a group, but the
* default group creation list should work fine.
* If we don't supply a size for the object header, HDF5 will
@@ -687,9 +699,6 @@ H5F_write_superblock(H5F_t *f, hid_t dxpl_id)
size_t superblock_size; /* Size of superblock, in bytes */
size_t driver_size; /* Size of driver info block (bytes)*/
unsigned super_vers; /* Superblock version */
- unsigned freespace_vers; /* Freespace info version */
- unsigned obj_dir_vers; /* Object header info version */
- unsigned share_head_vers; /* Shared header info version */
H5P_genplist_t *plist; /* Property list */
herr_t ret_value = SUCCEED;
@@ -702,23 +711,17 @@ H5F_write_superblock(H5F_t *f, hid_t dxpl_id)
/* Grab values from property list */
if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get superblock version")
- if(H5P_get(plist, H5F_CRT_FREESPACE_VERS_NAME, &freespace_vers) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get free space version")
- if(H5P_get(plist, H5F_CRT_OBJ_DIR_VERS_NAME, &obj_dir_vers) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get object directory version")
- if(H5P_get(plist, H5F_CRT_SHARE_HEAD_VERS_NAME, &share_head_vers) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get shared-header format version")
/* Encode the file superblock */
p = buf;
HDmemcpy(p, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN);
p += H5F_SIGNATURE_LEN;
*p++ = (uint8_t)super_vers;
- *p++ = (uint8_t)freespace_vers;
- *p++ = (uint8_t)obj_dir_vers;
+ *p++ = (uint8_t)HDF5_FREESPACE_VERSION;
+ *p++ = (uint8_t)HDF5_OBJECTDIR_VERSION;
*p++ = 0; /* reserved*/
- *p++ = (uint8_t)share_head_vers;
+ *p++ = (uint8_t)HDF5_SHAREDHEADER_VERSION;
HDassert(H5F_SIZEOF_ADDR(f) <= 255);
*p++ = (uint8_t)H5F_SIZEOF_ADDR(f);
HDassert(H5F_SIZEOF_SIZE(f) <= 255);
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index e093f19..6345961 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -51,7 +51,6 @@
#define H5F_CRT_USER_BLOCK_DEF 0
/* Definitions for the 1/2 rank for symbol table leaf nodes */
#define H5F_CRT_SYM_LEAF_SIZE sizeof(unsigned)
-#define H5F_CRT_SYM_LEAF_DEF 4
/* Definitions for the 1/2 rank for btree internal nodes */
#define H5F_CRT_BTREE_RANK_SIZE sizeof(unsigned[H5B_NUM_BTREE_ID])
#define H5F_CRT_BTREE_RANK_DEF {HDF5_BTREE_SNODE_IK_DEF,HDF5_BTREE_ISTORE_IK_DEF}
@@ -64,15 +63,6 @@
/* Definitions for version number of the superblock */
#define H5F_CRT_SUPER_VERS_SIZE sizeof(unsigned)
#define H5F_CRT_SUPER_VERS_DEF HDF5_SUPERBLOCK_VERSION_DEF
-/* Definitions for free-space version number */
-#define H5F_CRT_FREESPACE_VERS_SIZE sizeof(unsigned)
-#define H5F_CRT_FREESPACE_VERS_DEF HDF5_FREESPACE_VERSION
-/* Definitions for object directory version number */
-#define H5F_CRT_OBJ_DIR_VERS_SIZE sizeof(unsigned)
-#define H5F_CRT_OBJ_DIR_VERS_DEF HDF5_OBJECTDIR_VERSION
-/* Definitions for shared-header format version */
-#define H5F_CRT_SHARE_HEAD_VERS_SIZE sizeof(unsigned)
-#define H5F_CRT_SHARE_HEAD_VERS_DEF HDF5_SHAREDHEADER_VERSION
/* Definitions for shared object header messages */
#define H5F_CRT_SHMSG_NINDEXES_SIZE sizeof(unsigned)
#define H5F_CRT_SHMSG_NINDEXES_DEF (0)
@@ -155,9 +145,6 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
size_t sizeof_addr = H5F_CRT_ADDR_BYTE_NUM_DEF; /* Default size of addresses in the file */
size_t sizeof_size = H5F_CRT_OBJ_BYTE_NUM_DEF; /* Default size of sizes in the file */
unsigned superblock_ver = H5F_CRT_SUPER_VERS_DEF; /* Default superblock version # */
- unsigned freespace_ver = H5F_CRT_FREESPACE_VERS_DEF;/* Default free space version # */
- unsigned objectdir_ver = H5F_CRT_OBJ_DIR_VERS_DEF; /* Default object directory version # */
- unsigned sharedheader_ver = H5F_CRT_SHARE_HEAD_VERS_DEF; /* Default shared header message version # */
unsigned num_sohm_indexes = H5F_CRT_SHMSG_NINDEXES_DEF;
unsigned sohm_index_flags[H5O_SHMESG_MAX_NINDEXES] = H5F_CRT_SHMSG_INDEX_TYPES_DEF;
unsigned sohm_index_minsizes[H5O_SHMESG_MAX_NINDEXES] = H5F_CRT_SHMSG_INDEX_MINSIZE_DEF;
@@ -191,18 +178,6 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
if(H5P_register(pclass, H5F_CRT_SUPER_VERS_NAME, H5F_CRT_SUPER_VERS_SIZE, &superblock_ver, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
- /* Register the free-space version number */
- if(H5P_register(pclass, H5F_CRT_FREESPACE_VERS_NAME, H5F_CRT_FREESPACE_VERS_SIZE, &freespace_ver, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
-
- /* Register the object directory version number */
- if(H5P_register(pclass, H5F_CRT_OBJ_DIR_VERS_NAME, H5F_CRT_OBJ_DIR_VERS_SIZE, &objectdir_ver, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
-
- /* Register the shared-header version number */
- if(H5P_register(pclass, H5F_CRT_SHARE_HEAD_VERS_NAME, H5F_CRT_SHARE_HEAD_VERS_SIZE, &sharedheader_ver, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
-
/* Register the shared OH message information */
if(H5P_register(pclass,H5F_CRT_SHMSG_NINDEXES_NAME, H5F_CRT_SHMSG_NINDEXES_SIZE, &num_sohm_indexes,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
@@ -264,14 +239,11 @@ H5Pget_version(hid_t plist_id, unsigned *super/*out*/, unsigned *freelist/*out*/
if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, super) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get superblock version")
if(freelist)
- if(H5P_get(plist, H5F_CRT_FREESPACE_VERS_NAME, freelist) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get free-space version")
+ *freelist = HDF5_FREESPACE_VERSION; /* (hard-wired) */
if(stab)
- if(H5P_get(plist, H5F_CRT_OBJ_DIR_VERS_NAME, stab) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object directory version")
+ *stab = HDF5_OBJECTDIR_VERSION; /* (hard-wired) */
if(shhdr)
- if(H5P_get(plist, H5F_CRT_SHARE_HEAD_VERS_NAME, shhdr) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get shared-header version")
+ *shhdr = HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */
done:
FUNC_LEAVE_API(ret_value)