summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-14 19:08:34 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-14 19:08:34 (GMT)
commit769ee96c1fd7cdcc4de2f2b1f36e943ebf9fff8b (patch)
treed17a58cc98b8789145de837650aaba38dd7af262 /src/H5Gnode.c
parentbc6ab7c0a6ff27d3d52707419385ccd0771ffa0c (diff)
downloadhdf5-769ee96c1fd7cdcc4de2f2b1f36e943ebf9fff8b.zip
hdf5-769ee96c1fd7cdcc4de2f2b1f36e943ebf9fff8b.tar.gz
hdf5-769ee96c1fd7cdcc4de2f2b1f36e943ebf9fff8b.tar.bz2
[svn-r8874] Purpose:
Bug fix Description: Correct problems with "resurrecting" a dataset in a file. (This occurs when a dataset which is open gets unlinked from the group hierarchy (making it "dead" and marked for deletion in the file) and then is re-linked to the group hierarchy). Note that the current solution applies only to datasets, further work will fix this for groups and named datatypes also. Also, fix the "debug" routines to be a little more helpful in certain situations. Additionally, fix a locking bug in the symbol table node splitting routine which could be [one of] the cause[s] of the file corruption in flexible parallel operation. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel h5committested
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r--src/H5Gnode.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 279d9da..6743c7e 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -1163,13 +1163,6 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *_lt_key,
*rt_key_changed = TRUE;
}
}
-
- if (H5AC_unprotect(f, dxpl_id, H5AC_SNODE, *new_node_p, snrt, FALSE) != SUCCEED) {
- snrt = NULL;
- HGOTO_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node");
- }
-
- snrt=NULL; /* Make certain future references will be caught */
} else {
/* Where to insert the new entry? */
ret_value = H5B_INS_NOOP;
@@ -1190,6 +1183,8 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *_lt_key,
insert_into->nsyms += 1;
done:
+ if (snrt && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, *new_node_p, snrt, FALSE) < 0)
+ HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node");
if (sn && H5AC_unprotect(f, dxpl_id, H5AC_SNODE, addr, sn, FALSE) < 0)
HDONE_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR, "unable to release symbol table node");
@@ -1903,8 +1898,7 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
for (i = 0; i < sn->nsyms; i++) {
fprintf(stream, "%*sSymbol %d:\n", indent - 3, "", i);
-
- if (H5F_addr_defined(heap)) {
+ if (heap>0 && H5F_addr_defined(heap)) {
if (NULL == (heap_ptr = H5HL_protect(f, dxpl_id, heap)))
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to protect symbol name");
@@ -1917,6 +1911,8 @@ H5G_node_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent,
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, FAIL, "unable to unprotect symbol name");
heap_ptr=NULL; s=NULL;
}
+ else
+ fprintf(stream, "%*s%-*s\n", indent, "", fwidth, "Warning: Invalid heap address given, name not displayed!");
H5G_ent_debug(f, dxpl_id, sn->entry + i, stream, indent, fwidth, heap);
}