summaryrefslogtreecommitdiffstats
path: root/src/H5HFcache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-02 14:45:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-02 14:45:49 (GMT)
commit22a3d4b0c9d7fede5be19f736b9f9f4dfdb0aa0e (patch)
treeacc2dc8cee511f8d7a61051029bcba62fb719246 /src/H5HFcache.c
parentf45bd275371331b00545e45bb1ca594d6f8ac47f (diff)
downloadhdf5-22a3d4b0c9d7fede5be19f736b9f9f4dfdb0aa0e.zip
hdf5-22a3d4b0c9d7fede5be19f736b9f9f4dfdb0aa0e.tar.gz
hdf5-22a3d4b0c9d7fede5be19f736b9f9f4dfdb0aa0e.tar.bz2
[svn-r12702] Description:
Add test to fractal heaps to exercise issues with opening the same heap through two different file handles. Fix issues with file handle contexts in metadata cache callbacks for heap components. Fix bug in file close handling where cached information was being invalidated even when another file handle was open to the file. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/64 2.4 (mir) w/1.6 compat Linux/32 2.4 (heping) w/FORTRAN & C++ Mac OSX/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5HFcache.c')
-rw-r--r--src/H5HFcache.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index ae4185d..cd54db1 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -460,6 +460,9 @@ HDfprintf(stderr, "%s: Flushing heap header, addr = %a, destroy = %u\n", FUNC, a
/* Sanity check */
HDassert(hdr->dirty);
+ /* Set the shared heap header's file context for this operation */
+ hdr->f = f;
+
/* Compute the size of the heap header on disk */
size = hdr->heap_size;
@@ -706,6 +709,9 @@ HDfprintf(stderr, "%s: Load indirect block, addr = %a\n", FUNC, addr);
/* Get the pointer to the shared heap header */
hdr = par_info->hdr;
+ /* Set the shared heap header's file context for this operation */
+ hdr->f = f;
+
/* Share common heap information */
iblock->hdr = hdr;
if(H5HF_hdr_incr(hdr) < 0)
@@ -903,6 +909,9 @@ HDfprintf(stderr, "%s: Flushing indirect block, addr = %a, destroy = %u\n", FUNC
/* Get the pointer to the shared heap header */
hdr = iblock->hdr;
+ /* Set the shared heap header's file context for this operation */
+ hdr->f = f;
+
/* Allocate buffer to encode block */
/* XXX: Use free list factories? */
#ifdef QAK
@@ -1035,6 +1044,9 @@ H5HF_cache_iblock_dest(H5F_t UNUSED *f, H5HF_indirect_t *iblock)
HDfprintf(stderr, "%s: Destroying indirect block\n", FUNC);
#endif /* QAK */
+ /* Set the shared heap header's file context for this operation */
+ iblock->hdr->f = f;
+
/* Decrement reference count on shared info */
HDassert(iblock->hdr);
if(H5HF_hdr_decr(iblock->hdr) < 0)
@@ -1168,6 +1180,9 @@ H5HF_cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_size,
/* Get the pointer to the shared heap header */
hdr = par_info->hdr;
+ /* Set the shared heap header's file context for this operation */
+ hdr->f = f;
+
/* Share common heap information */
dblock->hdr = hdr;
if(H5HF_hdr_incr(hdr) < 0)
@@ -1290,6 +1305,9 @@ H5HF_cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr,
/* Get the pointer to the shared heap header */
hdr = dblock->hdr;
+ /* Set the shared heap header's file context for this operation */
+ hdr->f = f;
+
HDassert(dblock->blk);
p = dblock->blk;
@@ -1404,6 +1422,9 @@ H5HF_cache_dblock_dest(H5F_t UNUSED *f, H5HF_direct_t *dblock)
HDfprintf(stderr, "%s: Destroying direct block, dblock = %p\n", FUNC, dblock);
#endif /* QAK */
+ /* Set the shared heap header's file context for this operation */
+ dblock->hdr->f = f;
+
/* Decrement reference count on shared fractal heap info */
HDassert(dblock->hdr);
if(H5HF_hdr_decr(dblock->hdr) < 0)