summaryrefslogtreecommitdiffstats
path: root/src/H5Ostab.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2010-09-21 17:52:12 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2010-09-21 17:52:12 (GMT)
commit2087c6a9e49daa4d160fdbd79230bb3b36e63c30 (patch)
treea3f6011efa1a9369fd33d1fffa09365edc696ac5 /src/H5Ostab.c
parent95bc60ceb48bf6cd508691dd94be071b190fa74a (diff)
downloadhdf5-2087c6a9e49daa4d160fdbd79230bb3b36e63c30.zip
hdf5-2087c6a9e49daa4d160fdbd79230bb3b36e63c30.tar.gz
hdf5-2087c6a9e49daa4d160fdbd79230bb3b36e63c30.tar.bz2
[svn-r19461] Purpose: Fix bug 1864
Description: Library versions 1.6.3 and earlier contain a bug which causes them to be unable to perform certain operations on a group if that group's symbol table information is not cached in the parent group's symbol table. Versions 1.8.0 to 1.8.5 did not cache this information. Modified library to cache this information. Tested: jam, amani, heiwa (h5committest)
Diffstat (limited to 'src/H5Ostab.c')
-rw-r--r--src/H5Ostab.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 4829e93..e29a856 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -44,7 +44,7 @@ static size_t H5O_stab_size(const H5F_t *f, hbool_t disable_shared, const void *
static herr_t H5O_stab_free(void *_mesg);
static herr_t H5O_stab_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg);
static void *H5O_stab_copy_file(H5F_t *file_src, void *native_src,
- H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void *udata,
+ H5F_t *file_dst, hbool_t *recompute_size, H5O_copy_t *cpy_info, void *_udata,
hid_t dxpl_id);
static herr_t H5O_stab_post_copy_file(const H5O_loc_t *src_oloc, const void *mesg_src, H5O_loc_t *dst_oloc,
void *mesg_dst, hid_t dxpl_id, H5O_copy_t *cpy_info);
@@ -307,11 +307,12 @@ done:
*/
static void *
H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
- hbool_t UNUSED *recompute_size, H5O_copy_t UNUSED *cpy_info, void UNUSED *udata,
+ hbool_t UNUSED *recompute_size, H5O_copy_t UNUSED *cpy_info, void *_udata,
hid_t dxpl_id)
{
H5O_stab_t *stab_src = (H5O_stab_t *) native_src;
H5O_stab_t *stab_dst = NULL;
+ H5G_copy_file_ud_t *udata = (H5G_copy_file_ud_t *)_udata;
size_t size_hint; /* Local heap initial size */
void *ret_value; /* Return value */
@@ -328,7 +329,7 @@ H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
/* Get the old local heap's size and use that as the hint for the new heap */
if(H5HL_get_size(file_src, dxpl_id, stab_src->heap_addr, &size_hint) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, NULL, "can't query local heap size")
-
+
/* Set copy metadata tag */
H5_BEGIN_TAG(dxpl_id, H5AC__COPIED_TAG, NULL);
@@ -339,6 +340,11 @@ H5O_stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
/* Reset metadata tag */
H5_END_TAG(NULL);
+ /* Cache stab in udata */
+ udata->cache_type = H5G_CACHED_STAB;
+ udata->cache.stab.btree_addr = stab_dst->btree_addr;
+ udata->cache.stab.heap_addr = stab_dst->heap_addr;
+
/* Set return value */
ret_value = stab_dst;