summaryrefslogtreecommitdiffstats
path: root/src/H5MF.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-11-14 21:35:35 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-11-14 21:35:35 (GMT)
commitce2748f0114cb1eae00799f8349a5451152c7fa3 (patch)
treefd3e39e6de7b37651a2c7047bd3ad128b5c4e204 /src/H5MF.c
parente62f4bd4fab00b0cd03e269a858c21558a9321fa (diff)
downloadhdf5-ce2748f0114cb1eae00799f8349a5451152c7fa3.zip
hdf5-ce2748f0114cb1eae00799f8349a5451152c7fa3.tar.gz
hdf5-ce2748f0114cb1eae00799f8349a5451152c7fa3.tar.bz2
(A) Fixes for the assertion failures described in issue #2 (see John Mainzer's last checkin message):
--src/H5PB.c: checks for size >= page size --src/H5MF.c: disable/enable page buffering in H5MF_tidy_self_referential_fsm_hack() --src/H5MFsection.c: call H5PB_remove_entry() for both raw/metadata pages in H5MF__sect_small_merge() (B) Port and modify existing concurrent swmr tests to VFD SWMR. Also modify the following: --remove flushes from VFD SWMR writer tests --set Nreaders to 0 in test/testvfdswmr.sh.in to test for writers only Please enter the commit message for your changes. Lines starting
Diffstat (limited to 'src/H5MF.c')
-rw-r--r--src/H5MF.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/H5MF.c b/src/H5MF.c
index 3be5e0a..f64a27a 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -3579,6 +3579,7 @@ H5MF_tidy_self_referential_fsm_hack(H5F_t *f)
H5F_mem_page_t sm_fssinfo_fs_type; /* Small fs sinfo fsm */
H5F_mem_page_t lg_fshdr_fs_type; /* Large fs hdr fsm */
H5F_mem_page_t lg_fssinfo_fs_type; /* Large fs sinfo fsm */
+ H5PB_t *saved_pb_ptr = NULL; /* Pointer to page buffer */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_TAG(H5AC__FREESPACE_TAG, FAIL)
@@ -3636,6 +3637,18 @@ H5MF_tidy_self_referential_fsm_hack(H5F_t *f)
HDassert(NULL == f->shared->fs_man[sm_fshdr_fs_type]);
HDassert(NULL == f->shared->fs_man[sm_fssinfo_fs_type]);
+ /* Disable page buffering when paged aggregation strategy with
+ * persistent FS and page buffering are used.
+ * This is in response to an assertion failure in H5PB.c when
+ * running test/fheap.c.
+ * This is due to header/section info got loaded into the page buffer
+ * when freeing them via H5FS_free() called in this routine.
+ */
+ if(H5F_PAGED_AGGR(f) && f->shared->pb_ptr) {
+ saved_pb_ptr = f->shared->pb_ptr;
+ f->shared->pb_ptr = NULL;
+ }
+
if(H5F_addr_defined(f->shared->fs_addr[sm_fshdr_fs_type])) {
first_srfsm_hdr = f->shared->fs_addr[sm_fshdr_fs_type];
@@ -3790,6 +3803,12 @@ H5MF_tidy_self_referential_fsm_hack(H5F_t *f)
HDassert((!H5F_PAGED_AGGR(f)) || (0 == (eoa % f->shared->fs_page_size)));
done:
+ /* Enable page buffering as needed */
+ if(H5F_PAGED_AGGR(f) && saved_pb_ptr) {
+ HDassert(f->shared->pb_ptr == NULL);
+ f->shared->pb_ptr = saved_pb_ptr;
+ }
+
/* Reset the ring in the API context */
if(orig_ring != H5AC_RING_INV)
H5AC_set_ring(orig_ring, NULL);