diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2010-09-21 17:52:12 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2010-09-21 17:52:12 (GMT) |
commit | 2087c6a9e49daa4d160fdbd79230bb3b36e63c30 (patch) | |
tree | a3f6011efa1a9369fd33d1fffa09365edc696ac5 /src/H5G.c | |
parent | 95bc60ceb48bf6cd508691dd94be071b190fa74a (diff) | |
download | hdf5-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/H5G.c')
-rw-r--r-- | src/H5G.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -256,6 +256,8 @@ H5G_create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, /* Set up group creation info */ gcrt_info.gcpl_id = gcpl_id; + gcrt_info.cache_type = H5G_NOTHING_CACHED; + HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache)); /* Set up object creation information */ ocrt_info.obj_type = H5O_TYPE_GROUP; @@ -315,6 +317,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id) { H5G_loc_t loc; H5G_t *grp = NULL; + H5G_obj_create_t gcrt_info; /* Information for group creation */ hid_t ret_value; FUNC_ENTER_API(H5Gcreate_anon, FAIL) @@ -338,8 +341,13 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id) if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list") + /* Set up group creation info */ + gcrt_info.gcpl_id = gcpl_id; + gcrt_info.cache_type = H5G_NOTHING_CACHED; + HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache)); + /* Create the new group & get its ID */ - if(NULL == (grp = H5G_create(loc.oloc->file, gcpl_id, H5AC_dxpl_id))) + if(NULL == (grp = H5G_create(loc.oloc->file, &gcrt_info, H5AC_dxpl_id))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group") if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register group") @@ -853,7 +861,7 @@ H5G_term_interface(void) *------------------------------------------------------------------------- */ H5G_t * -H5G_create(H5F_t *file, hid_t gcpl_id, hid_t dxpl_id) +H5G_create(H5F_t *file, H5G_obj_create_t *gcrt_info, hid_t dxpl_id) { H5G_t *grp = NULL; /*new group */ unsigned oloc_init = 0; /* Flag to indicate that the group object location was created successfully */ @@ -863,7 +871,7 @@ H5G_create(H5F_t *file, hid_t gcpl_id, hid_t dxpl_id) /* check args */ HDassert(file); - HDassert(gcpl_id != H5P_DEFAULT); + HDassert(gcrt_info->gcpl_id != H5P_DEFAULT); HDassert(dxpl_id != H5P_DEFAULT); /* create an open group */ @@ -873,7 +881,7 @@ H5G_create(H5F_t *file, hid_t gcpl_id, hid_t dxpl_id) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Create the group object header */ - if(H5G_obj_create(file, dxpl_id, gcpl_id, &(grp->oloc)/*out*/) < 0) + if(H5G_obj_create(file, dxpl_id, gcrt_info, &(grp->oloc)/*out*/) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header") oloc_init = 1; /* Indicate that the object location information is valid */ |