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/H5Groot.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/H5Groot.c')
-rw-r--r-- | src/H5Groot.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5Groot.c b/src/H5Groot.c index f754f29..a79a5dd 100644 --- a/src/H5Groot.c +++ b/src/H5Groot.c @@ -97,6 +97,7 @@ herr_t H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root) { H5G_loc_t root_loc; /* Root location information */ + H5G_obj_create_t gcrt_info; /* Root group object creation info */ htri_t stab_exists = -1; /* Whether the symbol table exists */ hbool_t sblock_dirty = FALSE; /* Whether superblock was dirtied */ hbool_t path_init = FALSE; /* Whether path was initialized */ @@ -140,7 +141,9 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root) if(create_root) { /* Create root group */ /* (Pass the FCPL which is a sub-class of the group creation property class) */ - if(H5G_obj_create(f, dxpl_id, f->shared->fcpl_id, root_loc.oloc/*out*/) < 0) + gcrt_info.gcpl_id = f->shared->fcpl_id; + gcrt_info.cache_type = H5G_NOTHING_CACHED; + if(H5G_obj_create(f, dxpl_id, &gcrt_info, root_loc.oloc/*out*/) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry") if(1 != H5O_link(root_loc.oloc, 1, dxpl_id)) HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)") @@ -156,7 +159,9 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, hbool_t create_root) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate space for symbol table entry") /* Initialize the root group symbol table entry */ - f->shared->sblock->root_ent->type = H5G_NOTHING_CACHED; /* We will cache the stab later */ + f->shared->sblock->root_ent->type = gcrt_info.cache_type; + if(gcrt_info.cache_type != H5G_NOTHING_CACHED) + f->shared->sblock->root_ent->cache = gcrt_info.cache; f->shared->sblock->root_ent->name_off = 0; /* No name (yet) */ f->shared->sblock->root_ent->header = root_loc.oloc->addr; } /* end if */ |