diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2012-09-13 19:18:45 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2012-09-13 19:18:45 (GMT) |
commit | 495b8de00214c9f99d6f10fd91de0feef55cefa8 (patch) | |
tree | 3b4b59b6de32b179aa2cb0c67e6ca739b89c47af /src/H5B2int.c | |
parent | 4e44c3b7e27e3cd76d148bc5158a17d747aeea62 (diff) | |
download | hdf5-495b8de00214c9f99d6f10fd91de0feef55cefa8.zip hdf5-495b8de00214c9f99d6f10fd91de0feef55cefa8.tar.gz hdf5-495b8de00214c9f99d6f10fd91de0feef55cefa8.tar.bz2 |
[svn-r22761] Purpose: Fix testswmr failures
Description:
Patched H5B2 shadowed list implementation to remove nodes from the shadowed list
when they are evicted, and added some missing initializations. Also removed
inadvertent temporary changes to the tests that disabled srandom, added
assertions and fixed formatting.
Tested: ummon
Diffstat (limited to 'src/H5B2int.c')
-rw-r--r-- | src/H5B2int.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5B2int.c b/src/H5B2int.c index 29d12e8..3d6ac14 100644 --- a/src/H5B2int.c +++ b/src/H5B2int.c @@ -4214,6 +4214,7 @@ H5B2_shadow_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, HDassert(internal); HDassert(*internal); HDassert(hdr->swmr_write); + HDassert((*internal)->hdr == hdr); /* We only need to shadow the node if it has not been shadowed since the * last time the header was flushed, as otherwise it will be unreachable by @@ -4254,8 +4255,10 @@ H5B2_shadow_internal(H5B2_hdr_t *hdr, hid_t dxpl_id, unsigned depth, node_protected = TRUE; /* Add node to shadowed node list */ - if(hdr->shadowed_internal) + if(hdr->shadowed_internal) { (*internal)->shadowed_next = hdr->shadowed_internal; + hdr->shadowed_internal->shadowed_prev = *internal; + } /* end if */ else (*internal)->shadowed_next = *internal; hdr->shadowed_internal = *internal; @@ -4307,6 +4310,7 @@ H5B2_shadow_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, HDassert(leaf); HDassert(*leaf); HDassert(hdr->swmr_write); + HDassert((*leaf)->hdr == hdr); /* We only need to shadow the node if it has not been shadowed since the * last time the header was flushed, as otherwise it will be unreachable by @@ -4347,8 +4351,10 @@ H5B2_shadow_leaf(H5B2_hdr_t *hdr, hid_t dxpl_id, node_protected = TRUE; /* Add node to shadowed node list */ - if(hdr->shadowed_leaf) + if(hdr->shadowed_leaf) { (*leaf)->shadowed_next = hdr->shadowed_leaf; + hdr->shadowed_leaf->shadowed_prev = *leaf; + } /* end if */ else (*leaf)->shadowed_next = *leaf; hdr->shadowed_leaf = *leaf; |