summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-12-13 05:42:10 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-12-13 05:42:10 (GMT)
commite9a3da63a4a36c1c7431832cc50f71200b523864 (patch)
tree22228b9967f3e7ffd25544a297b5e957f0c45158 /src
parent4b36b8271b59f7f87294735812bfa80404c69f88 (diff)
downloadhdf5-e9a3da63a4a36c1c7431832cc50f71200b523864.zip
hdf5-e9a3da63a4a36c1c7431832cc50f71200b523864.tar.gz
hdf5-e9a3da63a4a36c1c7431832cc50f71200b523864.tar.bz2
[svn-r28605] Description:
Revisions to normalize revise chunks vs. trunk, plus push dataset metadata changes into the cache immediately (instead of holding them within the dataset data structures). Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest not required on this branch)
Diffstat (limited to 'src')
-rw-r--r--src/H5Dchunk.c3
-rw-r--r--src/H5Dint.c123
-rw-r--r--src/H5Dlayout.c47
-rw-r--r--src/H5Dpkg.h4
-rw-r--r--src/H5Dsingle.c2
-rw-r--r--src/H5F.c36
-rw-r--r--src/H5Fsuper.c18
-rw-r--r--src/H5Ocopy.c8
-rw-r--r--src/H5Odbg.c21
-rw-r--r--src/H5Oflush.c6
-rw-r--r--src/H5Olink.c4
-rw-r--r--src/H5Opkg.h18
-rw-r--r--src/H5Oprivate.h30
-rw-r--r--src/H5Opublic.h3
-rw-r--r--src/H5Otest.c6
-rw-r--r--src/H5Pdcpl.c2
-rw-r--r--src/H5T.c22
17 files changed, 156 insertions, 197 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index c3b16b7..194048b 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -4007,9 +4007,6 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
} /* end if */
/* Insert the chunk record into the index */
- /* (Note that this isn't safe, from a SWMR perspective, unlike
- * serial operation. -QAK
- */
if((need_insert || udata.need_modify) && ops->insert)
if((ops->insert)(&idx_info, &udata, dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 3e54471..de3e26a 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -1225,25 +1225,23 @@ H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id,
/* Set the latest version of the layout, pline & fill messages, if requested */
if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_DSET_MSG_FLAGS)) {
/* Set the latest version for the I/O pipeline message */
- if(H5F_USE_LATEST_FLAGS(file, H5F_LATEST_PLINE_MSG)) {
+ 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)) {
+ 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)) {
+ 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")
- }
- } else if(new_dset->shared->layout.version >= H5O_LAYOUT_VERSION_4) {
+ } /* end if */
+ else if(new_dset->shared->layout.version >= H5O_LAYOUT_VERSION_4) {
/* Use latest indexing type for layout message version >= 4 */
if(H5D__layout_set_latest_indexing(&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 indexing")
@@ -2073,7 +2071,7 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
case H5D_CHUNKED:
if(!(*dset->shared->layout.ops->is_space_alloc)(&dset->shared->layout.storage)) {
- /* Create the root of the B-tree that describes chunked storage */
+ /* Create the root of the index that manages chunked storage */
if(H5D__chunk_create(dset /*in,out*/, dxpl_id) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
@@ -2086,7 +2084,7 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
/* If space allocation is set to 'early' and we are extending
* the dataset, indicate that space should be allocated, so the
- * B-tree gets expanded. -QAK
+ * index gets expanded. -QAK
*/
if(dset->shared->dcpl_cache.fill.alloc_time == H5D_ALLOC_TIME_EARLY
&& time_alloc == H5D_ALLOC_EXTEND)
@@ -2137,7 +2135,7 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
/* Check if we need to initialize the space */
if(must_init_space) {
if(layout->type == H5D_CHUNKED) {
- /* If we are doing incremental allocation and the B-tree got
+ /* If we are doing incremental allocation and the index got
* created during a H5Dwrite call, don't initialize the storage
* now, wait for the actual writes to each block and let the
* low-level chunking routines handle initialize the fill-values.
@@ -2160,10 +2158,9 @@ H5D__alloc_storage(const H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc
/* If we are filling the dataset on allocation or "if set" and
* the fill value _is_ set, do that now */
if(dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_ALLOC ||
- (dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) {
+ (dset->shared->dcpl_cache.fill.fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED))
if(H5D__init_storage(dset, full_overwrite, old_dim, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
- } /* end if */
} /* end else */
} /* end if */
@@ -2731,7 +2728,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id)
&& (dset->shared->dcpl_cache.pline.nused > 0))
if(H5D__chunk_update_old_edge_chunks(dset, dxpl_id, curr_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to do update old edge chunks")
- }
+ } /* end if */
/* Mark the dataspace as dirty, for later writing to the file */
if(H5D__mark(dset, dxpl_id, H5D_MARK_SPACE) < 0)
@@ -2800,7 +2797,6 @@ done:
herr_t
H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
{
- H5O_t *oh = NULL; /* Pointer to dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dxpl_id, dataset->oloc.addr, FAIL)
@@ -2811,55 +2807,13 @@ H5D__flush_real(H5D_t *dataset, hid_t dxpl_id)
/* Avoid flushing the dataset (again) if it's closing */
if(!dataset->shared->closing) {
-
- /* Flush cached raw data for each kind of dataset layout */
- /* Need to flush first before the "layout" message because the single chunk address
- is stored in the message */
- /* Continue flushing even if it fails */
+ /* Flush cached raw data for each kind of dataset layout */
if(dataset->shared->layout.ops->flush &&
(dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data")
-
- /* Check for metadata changes that will require updating the object's modification time */
- if(dataset->shared->layout_dirty || dataset->shared->space_dirty) {
- unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
-
- /* Pin the object header */
- if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
- HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
-
- /* Update the layout on disk, if it's been changed */
- if(dataset->shared->layout_dirty) {
- if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
- dataset->shared->layout_dirty = FALSE;
-
- /* Reset the "update the modification time" flag, so we only do it once */
- update_flags = 0;
- } /* end if */
-
- /* Update the dataspace on disk, if it's been changed */
- if(dataset->shared->space_dirty) {
- if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace")
- dataset->shared->space_dirty = FALSE;
-
- /* Reset the "update the modification time" flag, so we only do it once */
- update_flags = 0;
- } /* end if */
-
- /* _Somebody_ should have update the modification time! */
- HDassert(update_flags == 0);
- } /* end if */
-
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data")
} /* end if */
done:
- /* Release pointer to object header */
- if(oh != NULL)
- if(H5O_unpin(oh) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
-
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
} /* end H5D__flush_real() */
@@ -2883,7 +2837,6 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id)
H5D_chk_idx_info_t new_idx_info; /* Index info for the new layout */
H5D_chk_idx_info_t idx_info; /* Index info for the current layout */
H5O_layout_t newlayout; /* The new layout */
- unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dxpl_id, dataset->oloc.addr, FAIL)
@@ -2917,13 +2870,12 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id)
/* Initialize version 1 B-tree */
if(newlayout.storage.u.chunk.ops->init &&
- (newlayout.storage.u.chunk.ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) < 0)
+ (newlayout.storage.u.chunk.ops->init)(&new_idx_info, dataset->shared->space, dataset->oloc.addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information")
/* If the current chunk index exists */
if(H5F_addr_defined(dataset->shared->layout.storage.u.chunk.idx_addr)) {
-
- /* Create version 1 B-tree chunk index */
+ /* Create v1 B-tree chunk index */
if((newlayout.storage.u.chunk.ops->create)(&new_idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create chunk index")
@@ -2931,11 +2883,11 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id)
* into the version 1 B-tree chunk index */
if(H5D__chunk_format_convert(dataset, &idx_info, &new_idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to iterate over chunk index to chunk info")
- }
+ } /* end if */
/* Release the old (i.e. current) chunk index */
if(dataset->shared->layout.storage.u.chunk.ops->dest &&
- (dataset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
+ (dataset->shared->layout.storage.u.chunk.ops->dest)(&idx_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to release chunk index info")
/* Delete the "layout" message */
@@ -2952,7 +2904,7 @@ H5D__format_convert(H5D_t *dataset, hid_t dxpl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update old fill value header message")
/* Update the layout on disk, if it's been changed */
- if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
+ if(H5D__layout_oh_write(dataset, dxpl_id, oh, H5O_UPDATE_TIME) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info")
done:
@@ -2981,19 +2933,50 @@ done:
herr_t
H5D__mark(const H5D_t *dataset, hid_t H5_ATTR_UNUSED dxpl_id, unsigned flags)
{
+ H5O_t *oh = NULL; /* Pointer to dataset's object header */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE_NOERR
+ FUNC_ENTER_PACKAGE
/* Check args */
HDassert(dataset);
HDassert(!(flags & (unsigned)~(H5D_MARK_SPACE | H5D_MARK_LAYOUT)));
/* Mark aspects of the dataset as dirty */
- if(flags & H5D_MARK_SPACE)
- dataset->shared->space_dirty = TRUE;
- if(flags & H5D_MARK_LAYOUT)
- dataset->shared->layout_dirty = TRUE;
+ if(flags) {
+ unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */
+
+ /* Pin the object header */
+ if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id)))
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header")
+
+ /* Update the layout on disk, if it's been changed */
+ if(flags & H5D_MARK_LAYOUT) {
+ if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout info")
+
+ /* Reset the "update the modification time" flag, so we only do it once */
+ update_flags = 0;
+ } /* end if */
+
+ /* Update the dataspace on disk, if it's been changed */
+ if(flags & H5D_MARK_SPACE) {
+ if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace")
+
+ /* Reset the "update the modification time" flag, so we only do it once */
+ update_flags = 0;
+ } /* end if */
+
+ /* _Somebody_ should have update the modification time! */
+ HDassert(update_flags == 0);
+ } /* end if */
+
+done:
+ /* Release pointer to object header */
+ if(oh != NULL)
+ if(H5O_unpin(oh) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTUNPIN, FAIL, "unable to unpin dataset object header")
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__mark() */
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index beccdd7..37cf2cc 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -355,10 +355,10 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
/* Avoid scalar/null dataspace */
if(ndims > 0) {
- hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */
- hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
- unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
- hbool_t single = TRUE; /* Fulfill single chunk indexing */
+ hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */
+ hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */
+ unsigned unlim_count = 0; /* Count of unlimited max. dimensions */
+ hbool_t single = TRUE; /* Fulfill single chunk indexing */
unsigned u; /* Local index variable */
/* Query the dataspace's dimensions */
@@ -371,7 +371,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
unlim_count++;
if(cur_dims[u] != max_dims[u] || cur_dims[u] != layout->u.chunk.dim[u])
single = FALSE;
- }
+ } /* end for */
/* Chunked datasets with unlimited dimension(s) */
if(unlim_count) { /* dataset with unlimited dimension(s) must be chunked */
@@ -398,6 +398,9 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
layout->storage.u.chunk.ops = H5D_COPS_BT2;
/* Set the v2 B-tree creation parameters */
+ /* (use hard-coded defaults for now, until we give applications
+ * control over this with a property list - QAK)
+ */
layout->u.chunk.u.btree2.cparam.node_size = H5D_BT2_NODE_SIZE;
layout->u.chunk.u.btree2.cparam.split_percent = H5D_BT2_SPLIT_PERC;
layout->u.chunk.u.btree2.cparam.merge_percent = H5D_BT2_MERGE_PERC;
@@ -409,14 +412,16 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space,
layout->u.chunk.idx_type = H5D_CHUNK_IDX_SINGLE;
layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_SINGLE;
layout->storage.u.chunk.ops = H5D_COPS_SINGLE;
- } else if(!dcpl_cache->pline.nused &&
+ } /* end if */
+ else if(!dcpl_cache->pline.nused &&
dcpl_cache->fill.alloc_time == H5D_ALLOC_TIME_EARLY) {
- /* Set the chunk index type to Non Index */
+ /* Set the chunk index type to "none" Index */
layout->u.chunk.idx_type = H5D_CHUNK_IDX_NONE;
layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_NONE;
layout->storage.u.chunk.ops = H5D_COPS_NONE;
- } else { /* Used Fixed Array */
+ } /* end else-if */
+ else { /* Used Fixed Array */
/* Set the chunk index type to Fixed Array */
layout->u.chunk.idx_type = H5D_CHUNK_IDX_FARRAY;
layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_FARRAY;
@@ -454,8 +459,9 @@ herr_t
H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
hid_t dapl_id)
{
- H5O_layout_t *layout; /* Dataset's layout information */
+ H5O_layout_t *layout; /* Dataset's layout information */
const H5O_fill_t *fill_prop; /* Pointer to dataset's fill value information */
+ unsigned layout_mesg_flags; /* Flags for inserting layout message */
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
herr_t ret_value = SUCCEED; /* Return value */
@@ -545,8 +551,13 @@ H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
/* Create layout message */
/* (Don't make layout message constant unless allocation time is early and non-filtered, since space may not be allocated) */
- /* (Note: this is relying on H5D_alloc_storage not calling H5O_msg_write during dataset creation) */
- if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_LAYOUT_ID, ((fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY && H5D_COMPACT != layout->type && !dset->shared->dcpl_cache.pline.nused) ? H5O_MSG_FLAG_CONSTANT : 0), 0, layout) < 0)
+ /* (Note: this is relying on H5D__alloc_storage not calling H5O_msg_write during dataset creation) */
+ if(fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY && H5D_COMPACT != layout->type
+ && !dset->shared->dcpl_cache.pline.nused)
+ layout_mesg_flags = H5O_MSG_FLAG_CONSTANT;
+ else
+ layout_mesg_flags = 0;
+ if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_LAYOUT_ID, layout_mesg_flags, 0, layout) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout")
done:
@@ -649,7 +660,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__layout_oh_write
*
- * Purpose: Write layout/pline/efl information for dataset
+ * Purpose: Write layout information for dataset
*
* Return: Success: SUCCEED
* Failure: FAIL
@@ -662,6 +673,7 @@ done:
herr_t
H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_flags)
{
+ htri_t msg_exists; /* Whether the layout message exists */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -670,9 +682,14 @@ H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_f
HDassert(dataset);
HDassert(oh);
- /* Write the layout message to the dataset's header */
- if(H5O_msg_write_oh(dataset->oloc.file, dxpl_id, oh, H5O_LAYOUT_ID, H5O_MSG_FLAG_CONSTANT, update_flags, &dataset->shared->layout) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout message")
+ /* Check if the layout message has been added to the dataset's header */
+ if((msg_exists = H5O_msg_exists_oh(oh, H5O_LAYOUT_ID)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to check if layout message exists")
+ if(msg_exists) {
+ /* Write the layout message to the dataset's header */
+ if(H5O_msg_write_oh(dataset->oloc.file, dxpl_id, oh, H5O_LAYOUT_ID, 0, update_flags, &dataset->shared->layout) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout message")
+ } /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h
index 015d0dc..248808d 100644
--- a/src/H5Dpkg.h
+++ b/src/H5Dpkg.h
@@ -290,8 +290,8 @@ typedef struct H5D_chunk_ud_t {
H5F_block_t chunk_block; /*offset/length of chunk in file */
unsigned filter_mask; /*excluded filters */
hbool_t new_unfilt_chunk; /*whether the chunk just became unfiltered */
- hsize_t chunk_idx; /*chunk index for EA, FA indexing */
- hbool_t need_modify;
+ hsize_t chunk_idx; /*chunk index for EA, FA indexing */
+ hbool_t need_modify;
} H5D_chunk_ud_t;
/* Typedef for "generic" chunk callbacks */
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index b472f7e..04b8971 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -247,7 +247,7 @@ H5D__single_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
if(dset) {
if(dset->shared->dcpl_cache.fill.alloc_time != H5D_ALLOC_TIME_EARLY || idx_info->pline->nused > 0) {
- /* Mark the layout/storage dirty so that the address of the single chunk will be flushed later */
+ /* Mark the layout dirty so that the address of the single chunk will be flushed later */
if(H5D__mark(dset, idx_info->dxpl_id, H5D_MARK_LAYOUT) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark layout as dirty")
} /* end if */
diff --git a/src/H5F.c b/src/H5F.c
index 3b1e8a0..09765cb 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1649,8 +1649,8 @@ H5Fstart_swmr_write(hid_t file_id)
if(H5F_get_obj_count(file, H5F_OBJ_LOCAL|H5F_OBJ_GROUP|H5F_OBJ_DATASET, FALSE, &grp_dset_count) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_count failed")
- /* Allocate space for group and object locations */
if(grp_dset_count) {
+ /* Allocate space for group and object locations */
if((obj_ids = (hid_t *) H5MM_malloc(grp_dset_count * sizeof(hid_t))) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for hid_t")
if((obj_glocs = (H5G_loc_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_loc_t))) == NULL)
@@ -1659,31 +1659,29 @@ H5Fstart_swmr_write(hid_t file_id)
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5O_loc_t")
if((obj_paths = (H5G_name_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_name_t))) == NULL)
HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5G_name_t")
- }
- /* Get the list of opened object ids (groups & datasets) */
- if(grp_dset_count) {
+ /* Get the list of opened object ids (groups & datasets) */
if(H5F_get_obj_ids(file, H5F_OBJ_LOCAL|H5F_OBJ_GROUP|H5F_OBJ_DATASET, grp_dset_count, obj_ids, FALSE, &grp_dset_count) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5F_get_obj_ids failed")
- }
- /* Refresh opened objects (groups, datasets) in the file */
- for(u = 0; u < grp_dset_count; u++) {
- H5O_loc_t *oloc; /* object location */
+ /* Refresh opened objects (groups, datasets) in the file */
+ for(u = 0; u < grp_dset_count; u++) {
+ H5O_loc_t *oloc; /* object location */
- /* Set up the id's group location */
- obj_glocs[u].oloc = &obj_olocs[u];
- obj_glocs[u].path = &obj_paths[u];
- H5G_loc_reset(&obj_glocs[u]);
+ /* Set up the id's group location */
+ obj_glocs[u].oloc = &obj_olocs[u];
+ obj_glocs[u].path = &obj_paths[u];
+ H5G_loc_reset(&obj_glocs[u]);
- /* get the id's object location */
- if((oloc = H5O_get_loc(obj_ids[u])) == NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object")
+ /* get the id's object location */
+ if((oloc = H5O_get_loc(obj_ids[u])) == NULL)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object")
- /* Refresh (part 1) */
- if(H5O_refresh_metadata_close(obj_ids[u], *oloc, &obj_glocs[u], H5AC_dxpl_id) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't refresh-close object")
- }
+ /* Refresh (part 1) */
+ if(H5O_refresh_metadata_close(obj_ids[u], *oloc, &obj_glocs[u], H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't refresh-close object")
+ } /* end for */
+ } /* end if */
/* Set up I/O info for operation */
fio_info.f = file;
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index d1911b8..da3bf3d 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -249,8 +249,8 @@ H5F__super_read(H5F_t *f, hid_t dxpl_id, hbool_t initial_read)
unsigned sblock_flags = H5AC__NO_FLAGS_SET; /* flags used in superblock unprotect call */
haddr_t super_addr; /* Absolute address of superblock */
haddr_t eof; /* End of file address */
- hbool_t skip_eof_check = FALSE;
unsigned rw_flags; /* Read/write permissions for file */
+ hbool_t skip_eof_check = FALSE; /* Whether to skip checking the EOF value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE_TAG(dxpl_id, H5AC__SUPERBLOCK_TAG, FAIL)
@@ -419,24 +419,22 @@ H5F__super_read(H5F_t *f, hid_t dxpl_id, hbool_t initial_read)
* Note: the aggregator is changed again after being reset
* earlier before H5AC_flush due to allocation of tmp addresses.
*/
-
- /* (This check can be skipped when the file is opened for SWMR read,
+ /* The EOF check must be skipped when the file is opened for SWMR read,
* as the file can appear truncated if only part of it has been
- * been flushed to disk by the single writer process.)
+ * been flushed to disk by the SWMR writer process.
*/
- if((H5F_INTENT(f) & H5F_ACC_SWMR_READ)) {
+ if(H5F_INTENT(f) & H5F_ACC_SWMR_READ) {
/*
* When the file is opened for SWMR read access, skip the check if:
* --the file is already marked for SWMR writing and
* --the file has version 3 superblock for SWMR support
*/
if((sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS) &&
- (sblock->status_flags & H5F_SUPER_WRITE_ACCESS) &&
- sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_3)
+ (sblock->status_flags & H5F_SUPER_WRITE_ACCESS) &&
+ sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_3)
skip_eof_check = TRUE;
- }
-
- if (!skip_eof_check && initial_read) {
+ } /* end if */
+ if(!skip_eof_check && initial_read) {
if(HADDR_UNDEF == (eof = H5FD_get_eof(f->shared->lf, H5FD_MEM_DEFAULT)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to determine file size")
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 7f041c5..aaafd72 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -357,12 +357,11 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
HDassert(cpy_info);
/* Get pointer to object class for this object */
- if((obj_class = H5O_obj_class(oloc_src, dxpl_id)) == NULL)
+ if(NULL == (obj_class = H5O_obj_class(oloc_src, dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object type")
/* Check if the object at the address is already open in the file */
if(H5FO_opened(oloc_src->file, oloc_src->addr) != NULL) {
-
H5G_loc_t tmp_loc; /* Location of object */
H5O_loc_t tmp_oloc; /* Location of object */
H5G_name_t tmp_path; /* Object's path */
@@ -390,15 +389,14 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/,
/* Release the temporary ID */
if(tmp_id != -1 && H5I_dec_app_ref(tmp_id))
HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to close temporary ID")
- }
+ } /* end if */
/* Get source object header */
if(NULL == (oh_src = H5O_protect(oloc_src, dxpl_id, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTPROTECT, FAIL, "unable to load object header")
/* Retrieve user data for particular type of object to copy */
- if(obj_class->get_copy_file_udata &&
- (NULL == (cpy_udata = (obj_class->get_copy_file_udata)())))
+ if(obj_class->get_copy_file_udata && (NULL == (cpy_udata = (obj_class->get_copy_file_udata)())))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to retrieve copy user data")
/* If we are merging committed datatypes, check for a match in the destination
diff --git a/src/H5Odbg.c b/src/H5Odbg.c
index a606611..d9d4b8b 100644
--- a/src/H5Odbg.c
+++ b/src/H5Odbg.c
@@ -455,20 +455,23 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
if(oh->mesg[i].flags) {
hbool_t flag_printed = FALSE;
- if(oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
- HDfprintf(stream, "<S");
- flag_printed = TRUE;
- } /* end if */
+ /* Sanity check that all flags in format are covered below */
+ HDcompile_assert(H5O_MSG_FLAG_BITS == (H5O_MSG_FLAG_CONSTANT|H5O_MSG_FLAG_SHARED|H5O_MSG_FLAG_DONTSHARE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE|H5O_MSG_FLAG_MARK_IF_UNKNOWN|H5O_MSG_FLAG_WAS_UNKNOWN|H5O_MSG_FLAG_SHAREABLE|H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS));
+
if(oh->mesg[i].flags & H5O_MSG_FLAG_CONSTANT) {
HDfprintf(stream, "%sC", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
+ if(oh->mesg[i].flags & H5O_MSG_FLAG_SHARED) {
+ HDfprintf(stream, "%sS", (flag_printed ? ", " : "<"));
+ flag_printed = TRUE;
+ } /* end if */
if(oh->mesg[i].flags & H5O_MSG_FLAG_DONTSHARE) {
HDfprintf(stream, "%sDS", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_AND_OPEN_FOR_WRITE) {
- HDfprintf(stream, "%sFIU", (flag_printed ? ", " : "<"));
+ HDfprintf(stream, "%sFIUW", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
if(oh->mesg[i].flags & H5O_MSG_FLAG_MARK_IF_UNKNOWN) {
@@ -480,6 +483,14 @@ H5O_debug_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, haddr_t addr, FILE *stream, i
HDfprintf(stream, "%sWU", (flag_printed ? ", " : "<"));
flag_printed = TRUE;
} /* end if */
+ if(oh->mesg[i].flags & H5O_MSG_FLAG_SHAREABLE) {
+ HDfprintf(stream, "%sSA", (flag_printed ? ", " : "<"));
+ flag_printed = TRUE;
+ } /* end if */
+ if(oh->mesg[i].flags & H5O_MSG_FLAG_FAIL_IF_UNKNOWN_ALWAYS) {
+ HDfprintf(stream, "%sFIUA", (flag_printed ? ", " : "<"));
+ flag_printed = TRUE;
+ } /* end if */
if(!flag_printed)
HDfprintf(stream, "-");
HDfprintf(stream, ">\n");
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 40957ac..e9189f8 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -76,15 +76,15 @@ H5Oflush(hid_t obj_id)
H5TRACE1("e", "i", obj_id);
/* Check args */
- if((oloc = H5O_get_loc(obj_id)) == NULL)
+ if(NULL == (oloc = H5O_get_loc(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object")
/* Get the object pointer */
- if((obj_ptr = H5I_object(obj_id)) == NULL)
+ if(NULL == (obj_ptr = H5I_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
/* Get the object class */
- if((obj_class = H5O_obj_class(oloc, H5AC_dxpl_id)) == NULL)
+ if(NULL == (obj_class = H5O_obj_class(oloc, H5AC_dxpl_id)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to determine object class")
/* Flush the object of this class */
diff --git a/src/H5Olink.c b/src/H5Olink.c
index d3c7f73..fd4ee88 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -835,7 +835,7 @@ H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Link Name Character Set:", (lnk->cset == H5T_CSET_ASCII ?
"ASCII" : (lnk->cset == H5T_CSET_UTF8 ? "UTF-8" : "Unknown")));
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth,
"Link Name:", lnk->name);
/* Display link-specific information */
@@ -846,7 +846,7 @@ H5O_link_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void
break;
case H5L_TYPE_SOFT:
- HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
+ HDfprintf(stream, "%*s%-*s '%s'\n", indent, "", fwidth,
"Link Value:", lnk->u.soft.name);
break;
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index a75817e..8ce2718 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -609,10 +609,7 @@ H5_DLLVAR const H5O_msg_class_t H5O_MSG_REFCOUNT[1];
/* Free-space Manager Info message. (0x0017) */
H5_DLLVAR const H5O_msg_class_t H5O_MSG_FSINFO[1];
-/* Data Storage Message. (0x0018) */
-H5_DLLVAR const H5O_msg_class_t H5O_MSG_STORAGE[1];
-
-/* Placeholder for unknown message. (0x0019) */
+/* Placeholder for unknown message. (0x0018) */
H5_DLLVAR const H5O_msg_class_t H5O_MSG_UNKNOWN[1];
@@ -714,17 +711,10 @@ H5_DLL herr_t H5O_attr_count_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
/* Object header proxy operators */
H5_DLL herr_t H5O_proxy_create(H5F_t *f, hid_t dxpl_id, H5O_t *oh);
-H5_DLL H5O_proxy_t *H5O_proxy_pin(H5F_t *f, hid_t dxpl_id,
- H5O_t *oh);
+H5_DLL H5O_proxy_t *H5O_proxy_pin(H5F_t *f, hid_t dxpl_id, H5O_t *oh);
H5_DLL herr_t H5O_proxy_unpin(H5O_proxy_t *proxy);
-H5_DLL herr_t H5O_proxy_depend(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- void *parent);
-H5_DLL herr_t H5O_proxy_undepend(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
- void *parent);
-
-
-/* These functions operate on object locations */
-/* H5_DLL H5O_loc_t *H5O_get_loc(hid_t id); */
+H5_DLL herr_t H5O_proxy_depend(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *parent);
+H5_DLL herr_t H5O_proxy_undepend(H5F_t *f, hid_t dxpl_id, H5O_t *oh, void *parent);
/* Testing functions */
#ifdef H5O_TESTING
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 4cc78d3..5cba610 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -362,27 +362,12 @@ typedef struct H5O_efl_t {
#define H5O_LAYOUT_NDIMS (H5S_MAX_RANK+1)
/* Flags for chunked layout feature encoding */
-#ifdef NOT_YET
-#define H5O_LAYOUT_CHUNK_STORE_ELEM_PHASE_CHANGE 0x01
-#define H5O_LAYOUT_CHUNK_STORE_CHUNK_PHASE_CHANGE 0x02
-#define H5O_LAYOUT_CHUNK_STORE_ELEM_CHUNK_TRANS 0x04
-#define H5O_LAYOUT_CHUNK_ABBREVIATE_PARTIAL_BOUND_CHUNKS 0x08
-#endif /* NOT_YET */
-#define H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS 0x10
-#define H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER 0x20
-#ifdef NOT_YET
-#define H5O_LAYOUT_ALL_CHUNK_FLAGS ( \
- H5O_LAYOUT_CHUNK_STORE_ELEM_PHASE_CHANGE \
- | H5O_LAYOUT_CHUNK_STORE_CHUNK_PHASE_CHANGE \
- | H5O_LAYOUT_CHUNK_STORE_ELEM_CHUNK_TRANS \
- | H5O_LAYOUT_CHUNK_ABBREVIATE_PARTIAL_BOUND_CHUNKS \
- | H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS \
+#define H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS 0x01
+#define H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER 0x02
+#define H5O_LAYOUT_ALL_CHUNK_FLAGS ( \
+ H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS \
+ | H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER \
)
-#else /* NOT_YET */
-#define H5O_LAYOUT_ALL_CHUNK_FLAGS ( \
- H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS|H5O_LAYOUT_CHUNK_SINGLE_INDEX_WITH_FILTER \
- )
-#endif /* NOT_YET */
/* Initial version of the layout information. Used when space is allocated */
#define H5O_LAYOUT_VERSION_1 1
@@ -920,15 +905,12 @@ H5_DLL int H5O_msg_get_chunkno(const H5O_loc_t *loc, unsigned type_id, hid_t dxp
H5_DLL herr_t H5O_msg_lock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
H5_DLL herr_t H5O_msg_unlock(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id);
-/* Object metadata flush/evict routines */
+/* Object metadata flush/refresh routines */
H5_DLL herr_t H5O_flush_common(H5O_loc_t *oloc, hid_t obj_id, hid_t dxpl_id);
-
H5_DLL herr_t H5O_refresh_metadata(hid_t oid, H5O_loc_t oloc, hid_t dxpl_id);
H5_DLL herr_t H5O_refresh_metadata_close(hid_t oid, H5O_loc_t oloc, H5G_loc_t *obj_loc, hid_t dxpl_id);
H5_DLL herr_t H5O_refresh_metadata_reopen(hid_t oid, H5G_loc_t *obj_loc, hid_t dxpl_id);
-
-
/* Object copying routines */
H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
hid_t dxpl_id, H5O_copy_t *cpy_info, hbool_t inc_depth,
diff --git a/src/H5Opublic.h b/src/H5Opublic.h
index af7bed1..dec7b5b 100644
--- a/src/H5Opublic.h
+++ b/src/H5Opublic.h
@@ -188,9 +188,6 @@ H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id);
H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id);
H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled);
-
-
-
/* Symbols defined for compatibility with previous versions of the HDF5 API.
*
* Use of these symbols is deprecated.
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 040a09f..a911469 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -160,7 +160,7 @@ H5O_is_attr_empty_test(hid_t oid)
{
H5O_t *oh = NULL; /* Object header */
H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5O_ainfo_t ainfo; /* Attribute information for object */
htri_t ainfo_exists = FALSE; /* Whether the attribute info exists in the file */
H5O_loc_t *loc; /* Pointer to object's location */
@@ -263,9 +263,9 @@ H5O_num_attrs_test(hid_t oid, hsize_t *nattrs)
{
H5O_t *oh = NULL; /* Object header */
H5O_proxy_t *oh_proxy = NULL; /* Object header proxy */
- H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
+ H5B2_t *bt2_name = NULL; /* v2 B-tree handle for name index */
H5O_ainfo_t ainfo; /* Attribute information for object */
- H5O_loc_t *loc; /* Pointer to object's location */
+ H5O_loc_t *loc; /* Pointer to object's location */
hsize_t obj_nattrs; /* Number of attributes */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index e917263..4202404 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -3238,7 +3238,7 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value)
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
- /* Set the fill value */
+ /* Set the fill value */
if(NULL == (fill.type = H5T_copy(type, H5T_COPY_TRANSIENT)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "can't copy datatype")
fill.size = (ssize_t)H5T_get_size(type);
diff --git a/src/H5T.c b/src/H5T.c
index 7287deb..030f5a7 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3597,19 +3597,6 @@ done:
* Programmer: Robb Matzke
* Monday, December 8, 1997
*
- * Modifications:
- * Robb Matzke, 1999-04-27
- * This function fails if the datatype state is IMMUTABLE.
- *
- * Robb Matzke, 1999-05-20
- * Closes opaque types also.
- *
- * Pedro Vicente, <pvn@ncsa.uiuc.edu> 22 Aug 2002
- * Added "ID to name" support
- *
- * Quincey Koziol, 2003-01-06
- * Moved "guts" of function to H5T__free()
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -3630,17 +3617,18 @@ H5T_close(H5T_t *dt)
if(dt->shared->state == H5T_STATE_OPEN && dt->shared->fo_count == 0) {
if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__GET_CORKED, &corked) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_SYSTEM, FAIL, "unable to retrieve an object's cork status")
- else if(corked) {
+ if(corked) {
if(H5AC_cork(dt->oloc.file, dt->oloc.addr, H5AC__UNCORK, NULL) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "unable to uncork an object")
- }
- }
+ } /* end if */
+ } /* end if */
if(H5T__free(dt) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype");
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
- } else {
+ } /* end if */
+ else {
/*
* If a named type is being closed then close the object header and
* remove from the list of open objects in the file.