summaryrefslogtreecommitdiffstats
path: root/src/H5Olayout.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-07-02 21:17:02 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-07-02 21:17:02 (GMT)
commitb0df711c3c1a31d8ddfc6600308b42ee81c8a27f (patch)
tree2882be3f917c6ae660b7168dd27082e64833987e /src/H5Olayout.c
parent55a945c985692dfd2c8e1b2915d413b1b704905a (diff)
downloadhdf5-b0df711c3c1a31d8ddfc6600308b42ee81c8a27f.zip
hdf5-b0df711c3c1a31d8ddfc6600308b42ee81c8a27f.tar.gz
hdf5-b0df711c3c1a31d8ddfc6600308b42ee81c8a27f.tar.bz2
[svn-r17147] Description:
Bring r17146 from trunk to 1.8 branch: Bring a bunch of misc. improvements & tweaks from the revise_chunks branch back to the trunk, so that future merges won't be so painful. Tested on: FreeBSd/32 6.3 (duty) (h5committested on trunk)
Diffstat (limited to 'src/H5Olayout.c')
-rw-r--r--src/H5Olayout.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 73d2c81..da8f2a8 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -390,6 +390,10 @@ H5O_layout_copy(const void *_mesg, void *_dest)
HDmemcpy(dest->u.compact.buf, mesg->u.compact.buf, dest->u.compact.size);
} /* end if */
+ /* Reset the pointer of the chunked storage index but not the address */
+ if(dest->type == H5D_CHUNKED && dest->u.chunk.ops)
+ H5D_chunk_idx_reset(dest, FALSE);
+
/* Set return value */
ret_value = dest;
@@ -517,7 +521,7 @@ H5O_layout_free(void *_mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
+H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
{
H5O_layout_t *mesg = (H5O_layout_t *) _mesg;
herr_t ret_value = SUCCEED; /* Return value */
@@ -526,6 +530,7 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
/* check args */
HDassert(f);
+ HDassert(open_oh);
HDassert(mesg);
/* Perform different actions, depending on the type of storage */
@@ -542,7 +547,7 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t UNUSED *open_oh, void *_mesg)
case H5D_CHUNKED: /* Chunked blocks on disk */
/* Free the file space for the index & chunk raw data */
- if(H5D_chunk_delete(f, dxpl_id, mesg) < 0)
+ if(H5D_chunk_delete(f, dxpl_id, open_oh, mesg) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
break;
@@ -626,7 +631,7 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
case H5D_CHUNKED:
if(H5D_chunk_is_space_alloc(layout_src)) {
/* Layout is not created in the destination file, reset index address */
- if(H5D_chunk_idx_reset(layout_dst) < 0)
+ if(H5D_chunk_idx_reset(layout_dst, TRUE) < 0)
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, NULL, "unable to reset chunked storage index in dest")
/* Create chunked layout */