summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-04-03 08:48:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-04-03 08:48:50 (GMT)
commit3cd705e56e6ef13c3423df68bb12704d483409ae (patch)
treef5010140d9de52c26e5d312532cfc64500988f24
parent9d2178ab886ae957cfe11b6fe09f9e7f0e9ce369 (diff)
downloadhdf5-3cd705e56e6ef13c3423df68bb12704d483409ae.zip
hdf5-3cd705e56e6ef13c3423df68bb12704d483409ae.tar.gz
hdf5-3cd705e56e6ef13c3423df68bb12704d483409ae.tar.bz2
[svn-r29612] Description:
Bring updated layout and EFL property comparisons and new "latest format" flags from revise_chunks branch. Tested on: MacOSX/64 10.11.4 (amazon) w/serial, parallel & production (h5committest forthcoming)
-rw-r--r--src/H5Aint.c13
-rw-r--r--src/H5Dint.c47
-rw-r--r--src/H5Dlayout.c35
-rw-r--r--src/H5Dpkg.h2
-rw-r--r--src/H5Fint.c11
-rw-r--r--src/H5Fpkg.h2
-rw-r--r--src/H5Fprivate.h22
-rw-r--r--src/H5Fquery.c17
-rw-r--r--src/H5Fsuper.c4
-rw-r--r--src/H5Gobj.c2
-rw-r--r--src/H5HFhdr.c2
-rw-r--r--src/H5O.c2
-rw-r--r--src/H5Opkg.h4
-rw-r--r--src/H5Pdcpl.c14
-rw-r--r--src/H5Ppkg.h1
-rw-r--r--src/H5Ptest.c46
-rw-r--r--src/H5Tcommit.c2
-rw-r--r--test/objcopy.c39
18 files changed, 115 insertions, 150 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c
index 1736dc0..ffb8667 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -207,7 +207,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "invalid datatype location")
/* Set the latest format for datatype, if requested */
- if(H5F_USE_LATEST_FORMAT(loc->oloc->file))
+ if(H5F_USE_LATEST_FLAGS(loc->oloc->file, H5F_LATEST_DATATYPE))
if(H5T_set_latest_version(attr->shared->dt) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of datatype")
@@ -215,7 +215,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
attr->shared->ds = H5S_copy(space, FALSE, TRUE);
/* Set the latest format for dataspace, if requested */
- if(H5F_USE_LATEST_FORMAT(loc->oloc->file))
+ if(H5F_USE_LATEST_FLAGS(loc->oloc->file, H5F_LATEST_DATASPACE))
if(H5S_set_latest_version(attr->shared->ds) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of dataspace")
@@ -1853,7 +1853,7 @@ herr_t
H5A_set_version(const H5F_t *f, H5A_t *attr)
{
hbool_t type_shared, space_shared; /* Flags to indicate that shared messages are used for this attribute */
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
+ hbool_t use_latest_format; /* Flag indicating the latest attribute version support is enabled */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -1862,8 +1862,8 @@ H5A_set_version(const H5F_t *f, H5A_t *attr)
HDassert(f);
HDassert(attr);
- /* Get the file's 'use the latest version of the format' flag */
- use_latest_format = H5F_USE_LATEST_FORMAT(f);
+ /* Get the file's 'use the latest attribute version support' flag */
+ use_latest_format = H5F_USE_LATEST_FLAGS(f, H5F_LATEST_ATTRIBUTE);
/* Check whether datatype and dataspace are shared */
if(H5O_msg_is_shared(H5O_DTYPE_ID, attr->shared->dt) > 0)
@@ -2354,8 +2354,7 @@ H5A_dense_post_copy_file_all(const H5O_loc_t *src_oloc, const H5O_ainfo_t *ainfo
attr_op.op_type = H5A_ATTR_OP_LIB;
attr_op.u.lib_op = H5A__dense_post_copy_file_cb;
-
- if(H5A_dense_iterate(src_oloc->file, dxpl_id, (hid_t)0, ainfo_src, H5_INDEX_NAME,
+ if(H5A_dense_iterate(src_oloc->file, dxpl_id, (hid_t)0, ainfo_src, H5_INDEX_NAME,
H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, &udata) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, FAIL, "error building attribute table")
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 570ee99..6c1f24a 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -648,7 +648,7 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
{
htri_t relocatable; /* Flag whether the type is relocatable */
htri_t immutable; /* Flag whether the type is immutable */
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
+ hbool_t use_latest_format; /* Flag indicating the 'latest datatype version support' is enabled */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -666,8 +666,8 @@ H5D__init_type(H5F_t *file, const H5D_t *dset, hid_t type_id, const H5T_t *type)
if((immutable = H5T_is_immutable(type)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't check datatype?")
- /* Get the file's 'use the latest version of the format' flag */
- use_latest_format = H5F_USE_LATEST_FORMAT(file);
+ /* Get the file's 'use the latest datatype version support' flag */
+ use_latest_format = H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DATATYPE);
/* Copy the datatype if it's a custom datatype or if it'll change when it's location is changed */
if(!immutable || relocatable || use_latest_format) {
@@ -759,7 +759,7 @@ done:
static herr_t
H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
{
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
+ hbool_t use_latest_format; /* Flag indicating the 'latest dataspace version support' is enabled */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -769,8 +769,8 @@ H5D__init_space(H5F_t *file, const H5D_t *dset, const H5S_t *space)
HDassert(dset);
HDassert(space);
- /* Get the file's 'use the latest version of the format' flag */
- use_latest_format = H5F_USE_LATEST_FORMAT(file);
+ /* Get the file's 'use the latest dataspace version support' flag */
+ use_latest_format = H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DATASPACE);
/* Copy dataspace for dataset */
if(NULL == (dset->shared->space = H5S_copy(space, FALSE, TRUE)))
@@ -815,7 +815,6 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
H5O_loc_t *oloc = NULL; /* Dataset's object location */
H5O_layout_t *layout; /* Dataset's layout information */
H5T_t *type; /* Dataset's datatype */
- hbool_t use_latest_format; /* Flag indicating the newest file format should be used */
H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
H5D_fill_value_t fill_status; /* Fill value status */
hbool_t fill_changed = FALSE; /* Flag indicating the fill value was changed */
@@ -834,9 +833,6 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
type = dset->shared->type;
fill_prop = &dset->shared->dcpl_cache.fill;
- /* Get the file's 'use the latest version of the format' flag */
- use_latest_format = H5F_USE_LATEST_FORMAT(file);
-
/* Retrieve "defined" status of fill value */
if(H5P_is_fill_value_defined(fill_prop, &fill_status) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined")
@@ -913,8 +909,8 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update new fill value header message")
/* If there is valid information for the old fill value struct, add it */
- /* (only if we aren't trying to write the latest version of the file format) */
- if(fill_prop->buf && !use_latest_format) {
+ /* (only if we aren't trying to write the 'latest fill message version support') */
+ if(fill_prop->buf && !(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_FILL_MSG))) {
H5O_fill_t old_fill_prop; /* Copy of fill value property, for writing as "old" fill value */
/* Shallow copy the fill value property */
@@ -966,10 +962,10 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
#endif /* H5O_ENABLE_BOGUS */
/* Add a modification time message, if using older format. */
- /* (If using the latest format, the modification time is part of the object
+ /* (If using the latest 'no modification time message' version support, the modification time is part of the object
* header and doesn't use a separate message -QAK)
*/
- if(!use_latest_format)
+ if(!(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_NO_MOD_TIME_MSG)))
if(H5O_touch_oh(file, dxpl_id, oh, TRUE) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update modification time message")
@@ -1208,14 +1204,23 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
} /* end if */
/* Set the latest version of the layout, pline & fill messages, if requested */
- if(H5F_USE_LATEST_FORMAT(file)) {
+ if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DSET_MSG_FLAGS)) {
/* Set the latest version for the I/O pipeline message */
- if(H5O_pline_set_latest_version(&new_dset->shared->dcpl_cache.pline) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of I/O filter pipeline")
-
- /* Set the latest version for the fill value message */
- if(H5O_fill_set_latest_version(&new_dset->shared->dcpl_cache.fill) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of fill value")
+ if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_PLINE_MSG))
+ if(H5O_pline_set_latest_version(&new_dset->shared->dcpl_cache.pline) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of I/O filter pipeline")
+
+ /* Set the latest version for the fill message */
+ if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_FILL_MSG))
+ /* Set the latest version for the fill value message */
+ if(H5O_fill_set_latest_version(&new_dset->shared->dcpl_cache.fill) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of fill value")
+
+ /* Set the latest version for the layout message */
+ if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_LAYOUT_MSG))
+ /* Set the latest version for the layout message */
+ if(H5D__layout_set_latest_version(&new_dset->shared->layout, new_dset->shared->space, &new_dset->shared->dcpl_cache) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set latest version of layout")
} /* end if */
/* Check if this dataset is going into a parallel file and set space allocation time */
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 19b1c95..2b444e4 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -212,6 +212,41 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5D__layout_set_latest_version
+ *
+ * Purpose: Set the encoding for a layout to the latest version.
+ * Part of the coding in this routine is moved to
+ * H5D__layout_set_latest_indexing().
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Thursday, January 15, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5D__layout_set_latest_version(H5O_layout_t *layout, const H5S_t *space,
+ const H5D_dcpl_cache_t *dcpl_cache)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Sanity check */
+ HDassert(layout);
+ HDassert(space);
+ HDassert(dcpl_cache);
+
+ /* Set encoding of layout to latest version */
+ layout->version = H5O_LAYOUT_VERSION_LATEST;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5D__layout_set_latest_version() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_create
*
* Purpose: Create layout/pline/efl information for dataset
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index e208f8e..66c4773 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -582,6 +582,8 @@ H5_DLL herr_t H5D__scatgath_write(const H5D_io_info_t *io_info,
H5_DLL herr_t H5D__layout_set_io_ops(const H5D_t *dataset);
H5_DLL size_t H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout,
hbool_t include_compact_data);
+H5_DLL herr_t H5D__layout_set_latest_version(H5O_layout_t *layout,
+ const H5S_t *space, const H5D_dcpl_cache_t *dcpl_cache);
H5_DLL herr_t H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh,
H5D_t *dset, hid_t dapl_id);
H5_DLL herr_t H5D__layout_oh_read(H5D_t *dset, hid_t dxpl_id, hid_t dapl_id,
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 1c29fee..4da382b 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -130,6 +130,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */
hbool_t driver_prop_copied = FALSE; /* Whether the driver property has been set up */
unsigned efc_size = 0;
+ hbool_t latest_format = FALSE; /* Always use the latest format? */
hid_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -166,7 +167,9 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't sieve buffer size")
if(H5P_set(new_plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->sdata_aggr.alloc_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' cache size")
- if(H5P_set(new_plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
+ if(f->shared->latest_flags > 0)
+ latest_format = TRUE;
+ if(H5P_set(new_plist, H5F_ACS_LATEST_FORMAT_NAME, &latest_format) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format' flag")
if(f->shared->efc)
efc_size = H5F_efc_max_nfiles(f->shared->efc);
@@ -575,6 +578,7 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t
else {
H5P_genplist_t *plist; /* Property list */
unsigned efc_size; /* External file cache size */
+ hbool_t latest_format; /* Always use the latest format? */
size_t u; /* Local index variable */
HDassert(lf != NULL);
@@ -630,8 +634,11 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get garbage collect reference")
if(H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get sieve buffer size")
- if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
+ if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest_format) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag")
+ /* For latest format, activate all latest version support */
+ if(latest_format)
+ f->shared->latest_flags |= H5F_LATEST_ALL_FLAGS;
if(H5P_get(plist, H5F_ACS_META_BLOCK_SIZE_NAME, &(f->shared->meta_aggr.alloc_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get metadata cache size")
f->shared->meta_aggr.feature_flag = H5FD_FEAT_AGGREGATE_METADATA;
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index ab2ef9e..06f0207 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -268,7 +268,7 @@ struct H5F_file_t {
hsize_t threshold; /* Threshold for alignment */
hsize_t alignment; /* Alignment */
unsigned gc_ref; /* Garbage-collect references? */
- hbool_t latest_format; /* Always use the latest format? */
+ unsigned latest_flags; /* The latest version support */
hbool_t store_msg_crt_idx; /* Store creation index for object header messages? */
unsigned ncwfs; /* Num entries on cwfs list */
struct H5HG_heap_t **cwfs; /* Global heap cache */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 52649e5..3a92538 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -308,7 +308,7 @@
#define H5F_RDCC_W0(F) ((F)->shared->rdcc_w0)
#define H5F_SIEVE_BUF_SIZE(F) ((F)->shared->sieve_buf_size)
#define H5F_GC_REF(F) ((F)->shared->gc_ref)
-#define H5F_USE_LATEST_FORMAT(F) ((F)->shared->latest_format)
+#define H5F_USE_LATEST_FLAGS(F,FL) ((F)->shared->latest_flags & (FL))
#define H5F_STORE_MSG_CRT_IDX(F) ((F)->shared->store_msg_crt_idx)
#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) ((F)->shared->store_msg_crt_idx = (FL))
#define H5F_GRP_BTREE_SHARED(F) ((F)->shared->grp_btree_shared)
@@ -353,7 +353,7 @@
#define H5F_RDCC_W0(F) (H5F_rdcc_w0(F))
#define H5F_SIEVE_BUF_SIZE(F) (H5F_sieve_buf_size(F))
#define H5F_GC_REF(F) (H5F_gc_ref(F))
-#define H5F_USE_LATEST_FORMAT(F) (H5F_use_latest_format(F))
+#define H5F_USE_LATEST_FLAGS(F,FL) (H5F_use_latest_flags(F,FL))
#define H5F_STORE_MSG_CRT_IDX(F) (H5F_store_msg_crt_idx(F))
#define H5F_SET_STORE_MSG_CRT_IDX(F, FL) (H5F_set_store_msg_crt_idx((F), (FL)))
#define H5F_GRP_BTREE_SHARED(F) (H5F_grp_btree_shared(F))
@@ -555,6 +555,22 @@
#define H5SM_LIST_MAGIC "SMLI" /* Shared Message List */
+/* Latest format will activate the following latest version support */
+/* "latest_flags" in H5F_file_t */
+#define H5F_LATEST_DATATYPE 0x0001
+#define H5F_LATEST_DATASPACE 0x0002
+#define H5F_LATEST_ATTRIBUTE 0x0004
+#define H5F_LATEST_FILL_MSG 0x0008
+#define H5F_LATEST_PLINE_MSG 0x0010
+#define H5F_LATEST_LAYOUT_MSG 0x0020
+#define H5F_LATEST_NO_MOD_TIME_MSG 0x0040
+#define H5F_LATEST_STYLE_GROUP 0x0080
+#define H5F_LATEST_OBJ_HEADER 0x0100
+#define H5F_LATEST_SUPERBLOCK 0x0200
+#define H5F_LATEST_ALL_FLAGS (H5F_LATEST_DATATYPE | H5F_LATEST_DATASPACE | H5F_LATEST_ATTRIBUTE | H5F_LATEST_FILL_MSG | H5F_LATEST_PLINE_MSG | H5F_LATEST_LAYOUT_MSG | H5F_LATEST_NO_MOD_TIME_MSG | H5F_LATEST_STYLE_GROUP | H5F_LATEST_OBJ_HEADER | H5F_LATEST_SUPERBLOCK)
+
+#define H5F_LATEST_DSET_MSG_FLAGS (H5F_LATEST_FILL_MSG | H5F_LATEST_PLINE_MSG | H5F_LATEST_LAYOUT_MSG)
+
/****************************/
/* Library Private Typedefs */
/****************************/
@@ -641,7 +657,7 @@ H5_DLL size_t H5F_rdcc_nslots(const H5F_t *f);
H5_DLL double H5F_rdcc_w0(const H5F_t *f);
H5_DLL size_t H5F_sieve_buf_size(const H5F_t *f);
H5_DLL unsigned H5F_gc_ref(const H5F_t *f);
-H5_DLL hbool_t H5F_use_latest_format(const H5F_t *f);
+H5_DLL unsigned H5F_use_latest_flags(const H5F_t *f, unsigned fl);
H5_DLL hbool_t H5F_store_msg_crt_idx(const H5F_t *f);
H5_DLL herr_t H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag);
H5_DLL struct H5UC_t *H5F_grp_btree_shared(const H5F_t *f);
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index e9af300..dd6e8e3 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -779,23 +779,22 @@ H5F_gc_ref(const H5F_t *f)
/*-------------------------------------------------------------------------
- * Function: H5F_use_latest_format
+ * Function: H5F_use_latest_flags
*
- * Purpose: Retrieve the 'use the latest version of the format' flag for
- * the file.
+ * Purpose: Retrieve the 'latest version support' for the file.
*
- * Return: Success: Non-negative, the 'use the latest format' flag
+ * Return: Success: Non-negative, the requested 'version support'
*
* Failure: (can't happen)
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
- * Oct 2 2006
+ * Mar 5 2007
*
*-------------------------------------------------------------------------
*/
-hbool_t
-H5F_use_latest_format(const H5F_t *f)
+unsigned
+H5F_use_latest_flags(const H5F_t *f, unsigned fl)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -803,8 +802,8 @@ H5F_use_latest_format(const H5F_t *f)
HDassert(f);
HDassert(f->shared);
- FUNC_LEAVE_NOAPI(f->shared->latest_format)
-} /* end H5F_use_latest_format() */
+ FUNC_LEAVE_NOAPI(f->shared->latest_flags & (fl))
+} /* end H5F_use_latest_flags() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 70d1a49..4aca221 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -744,8 +744,8 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id)
if(H5P_get(plist, H5F_CRT_BTREE_RANK_NAME, &sblock->btree_k[0]) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes")
- /* Bump superblock version if we are to use the latest version of the format */
- if(f->shared->latest_format)
+ /* Bump superblock version if latest superblock version support is enabled */
+ if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_SUPERBLOCK))
super_vers = HDF5_SUPERBLOCK_VERSION_LATEST;
/* Bump superblock version to create superblock extension for SOHM info */
else if(f->shared->sohm_nindexes > 0)
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index f7782a6..92ad0af 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -208,7 +208,7 @@ H5G__obj_create_real(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) || linfo->track_corder
+ if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_STYLE_GROUP) || linfo->track_corder
|| (pline && pline->nused))
use_latest_format = TRUE;
else
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index 19ea14a..42857c0 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -427,7 +427,7 @@ H5HF_hdr_create(H5F_t *f, hid_t dxpl_id, const H5HF_create_t *cparam)
HGOTO_ERROR(H5E_HEAP, H5E_CANTCOPY, HADDR_UNDEF, "can't copy I/O filter pipeline")
/* Pay attention to the latest version flag for the file */
- if(H5F_USE_LATEST_FORMAT(hdr->f))
+ if(H5F_USE_LATEST_FLAGS(hdr->f, H5F_LATEST_PLINE_MSG))
/* Set the latest version for the I/O pipeline message */
if(H5O_pline_set_latest_version(&(hdr->pline)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTSET, HADDR_UNDEF, "can't set latest version of I/O filter pipeline")
diff --git a/src/H5O.c b/src/H5O.c
index 1937483..e881817 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1161,7 +1161,7 @@ H5O_create(H5F_t *f, hid_t dxpl_id, size_t size_hint, size_t initial_rc,
/* Initialize file-specific information for object header */
store_msg_crt_idx = H5F_STORE_MSG_CRT_IDX(f);
- if(H5F_USE_LATEST_FORMAT(f) || store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
+ if(H5F_USE_LATEST_FLAGS(f, H5F_LATEST_OBJ_HEADER) || store_msg_crt_idx || (oh_flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED))
oh->version = H5O_VERSION_LATEST;
else
oh->version = H5O_VERSION_1;
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index cc1b289..5bce19e 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -66,7 +66,7 @@
#define H5O_ALIGN_OH(O, X) \
H5O_ALIGN_VERS((O)->version, X)
#define H5O_ALIGN_F(F, X) \
- H5O_ALIGN_VERS((H5F_USE_LATEST_FORMAT(F) ? H5O_VERSION_LATEST : H5O_VERSION_1), X)
+ H5O_ALIGN_VERS((H5F_USE_LATEST_FLAGS(F, H5F_LATEST_OBJ_HEADER) ? H5O_VERSION_LATEST : H5O_VERSION_1), X)
/* Size of checksum (on disk) */
#define H5O_SIZEOF_CHKSUM 4
@@ -138,7 +138,7 @@
#define H5O_SIZEOF_MSGHDR_OH(O) \
H5O_SIZEOF_MSGHDR_VERS((O)->version, (O)->flags & H5O_HDR_ATTR_CRT_ORDER_TRACKED)
#define H5O_SIZEOF_MSGHDR_F(F, C) \
- H5O_SIZEOF_MSGHDR_VERS((H5F_USE_LATEST_FORMAT(F) || H5F_STORE_MSG_CRT_IDX(F)) ? H5O_VERSION_LATEST : H5O_VERSION_1, (C))
+ H5O_SIZEOF_MSGHDR_VERS((H5F_USE_LATEST_FLAGS(F, H5F_LATEST_OBJ_HEADER) || H5F_STORE_MSG_CRT_IDX(F)) ? H5O_VERSION_LATEST : H5O_VERSION_1, (C))
/*
* Size of chunk "header" for each chunk
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 8c9f792..0346f89 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -774,12 +774,6 @@ H5P__dcrt_layout_cmp(const void *_layout1, const void *_layout2,
if(layout1->type > layout2->type)
HGOTO_DONE(1)
- /* Check for different layout version */
- if(layout1->version < layout2->version)
- HGOTO_DONE(-1)
- if(layout1->version > layout2->version)
- HGOTO_DONE(1)
-
/* Compare non-dataset-specific fields in layout info */
switch(layout1->type) {
case H5D_COMPACT:
@@ -1651,14 +1645,6 @@ H5P__dcrt_ext_file_list_cmp(const void *_efl1, const void *_efl2,
HDassert(efl2);
HDassert(size == sizeof(H5O_efl_t));
- /* Check the heap address of external file lists */
- if(H5F_addr_defined(efl1->heap_addr) || H5F_addr_defined(efl2->heap_addr)) {
- if(!H5F_addr_defined(efl1->heap_addr) && H5F_addr_defined(efl2->heap_addr)) HGOTO_DONE(-1);
- if(H5F_addr_defined(efl1->heap_addr) && !H5F_addr_defined(efl2->heap_addr)) HGOTO_DONE(1);
- if((cmp_value = H5F_addr_cmp(efl1->heap_addr, efl2->heap_addr)) != 0)
- HGOTO_DONE(cmp_value);
- } /* end if */
-
/* Check the number of allocated efl entries */
if(efl1->nalloc < efl2->nalloc) HGOTO_DONE(-1);
if(efl1->nalloc > efl2->nalloc) HGOTO_DONE(1);
diff --git a/src/H5Ppkg.h b/src/H5Ppkg.h
index 3662cf9..7d29f3d 100644
--- a/src/H5Ppkg.h
+++ b/src/H5Ppkg.h
@@ -204,7 +204,6 @@ H5_DLL herr_t H5P_get_filter(const struct H5Z_filter_info_t *filter,
#ifdef H5P_TESTING
H5_DLL char *H5P_get_class_path_test(hid_t pclass_id);
H5_DLL hid_t H5P_open_class_path_test(const char *path);
-H5_DLL herr_t H5P_reset_external_file_test(hid_t dcpl_id);
#endif /* H5P_TESTING */
#endif /* _H5Ppkg_H */
diff --git a/src/H5Ptest.c b/src/H5Ptest.c
index 8240f6a..f6cc97e 100644
--- a/src/H5Ptest.c
+++ b/src/H5Ptest.c
@@ -125,49 +125,3 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5P_open_class_path_test() */
-
-/*--------------------------------------------------------------------------
- NAME
- H5P_reset_external_file_test
- PURPOSE
- Routine to reset external file list
- USAGE
- herr_t H5P_reset_external_file_test(plist)
- hid_t dcpl_id; IN: the property list
-
- RETURNS
- Non-negative on success/Negative on failure
-
- PROGRAMMER
- Peter Cao
- April 30, 2007
---------------------------------------------------------------------------*/
-herr_t
-H5P_reset_external_file_test(hid_t dcpl_id)
-{
- H5O_efl_t efl; /* External file list */
- H5P_genplist_t *plist; /* Property list */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(FAIL)
-
- /* Check arguments */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list")
-
- /* get external file list */
- if(H5P_peek(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get external file list")
-
- /* Clean up any values set for the external file-list */
- if(H5O_msg_reset(H5O_EFL_ID, &efl) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't release external file list info")
-
- /* set external file list */
- if(H5P_poke(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set external file list")
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_reset_external_file_test() */
-
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 8511ff5..07fe371 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -351,7 +351,7 @@ H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id)
loc_init = TRUE;
/* Set the latest format, if requested */
- if(H5F_USE_LATEST_FORMAT(file))
+ if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DATATYPE))
if(H5T_set_latest_version(type) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set latest version of datatype")
diff --git a/test/objcopy.c b/test/objcopy.c
index a9791d5..e435dd1 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -1219,47 +1219,10 @@ compare_datasets(hid_t did, hid_t did2, hid_t pid, const void *wbuf)
/* Open the dataset creation property list for the destination dataset */
if((dcpl2 = H5Dget_create_plist(did2)) < 0) TEST_ERROR
- /* If external file storage is being used, the value stored in the
- * dcpl will be a heap ID, which is not guaranteed to be the same in
- * source and destination files.
- * Instead, compare the actual external file values and then
- * delete this property from the dcpls before comparing them.
- */
- if((ext_count = H5Pget_external_count(dcpl)) < 0) TEST_ERROR
-
- if(ext_count > 0)
- {
- unsigned x; /* Counter varaible */
- char name1[NAME_BUF_SIZE];
- char name2[NAME_BUF_SIZE];
- off_t offset1=0;
- off_t offset2=0;
- hsize_t size1=0;
- hsize_t size2=0;
-
- if(H5Pget_external_count(dcpl2) != ext_count) TEST_ERROR
-
- /* Ensure that all external file information is the same */
- for(x=0; x < (unsigned) ext_count; ++x)
- {
- if(H5Pget_external(dcpl, x, (size_t)NAME_BUF_SIZE, name1, &offset1, &size1) < 0) TEST_ERROR
- if(H5Pget_external(dcpl2, x, (size_t)NAME_BUF_SIZE, name2, &offset2, &size2) < 0) TEST_ERROR
-
- if(offset1 != offset2) TEST_ERROR
- if(size1 != size2) TEST_ERROR
- if(HDstrcmp(name1, name2) != 0) TEST_ERROR
- }
-
- /* Reset external file information from the dcpls */
- /* (Directly removing default property causes memory leak) */
- if (H5P_reset_external_file_test(dcpl) < 0) TEST_ERROR
- if (H5P_reset_external_file_test(dcpl2) < 0) TEST_ERROR
- }
-
/* Compare the rest of the dataset creation property lists */
if(H5Pequal(dcpl, dcpl2) != TRUE) TEST_ERROR
- /* Get the number of filters on dataset */
+ /* Get the number of filters on dataset (for later) */
if((nfilters = H5Pget_nfilters(dcpl)) < 0) TEST_ERROR
/* close the source dataset creation property list */