summaryrefslogtreecommitdiffstats
path: root/src/H5Fvfd_swmr.c
diff options
context:
space:
mode:
authorvchoi <vchoi@jelly.ad.hdfgroup.org>2021-12-21 18:25:32 (GMT)
committervchoi <vchoi@jelly.ad.hdfgroup.org>2021-12-21 18:25:32 (GMT)
commitcdc93ea7faa30084c6399b1a7cc5347e5654f860 (patch)
treee7f98fb474120199dd06207a81d581da281b8e82 /src/H5Fvfd_swmr.c
parenta30ca5afcd9f2e35b3a37f74286a6fe264b946f2 (diff)
downloadhdf5-cdc93ea7faa30084c6399b1a7cc5347e5654f860.zip
hdf5-cdc93ea7faa30084c6399b1a7cc5347e5654f860.tar.gz
hdf5-cdc93ea7faa30084c6399b1a7cc5347e5654f860.tar.bz2
Address issue #1 and issue #3 of the group test failures.
See Kent's documentation "Designed to Fail Tests and Issues". (A) Fix for issue #1: HDassert the < and = cases between old and new entry length. John will take care of the > case. (B) Fix for issue #3: set the cache copy of page_size again if different from f->shared->fs_page_size.
Diffstat (limited to 'src/H5Fvfd_swmr.c')
-rw-r--r--src/H5Fvfd_swmr.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index 43567ac..1a8f127 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -169,7 +169,7 @@ H5FL_DEFINE(eot_queue_entry_t);
* Return: Success: SUCCEED
* Failure: FAIL
*
- * Programmer: Vailin Choi -- 11/??/18
+ * Programmer: Vailin Choi -- 10/??/18
*
* Changes: None.
*
@@ -252,6 +252,21 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create)
HDassert(!shared->vfd_swmr_config.writer);
+ HDassert(shared->fs_page_size > 0);
+ /* This is a bug uncovered by issue #3 of the group test failures.
+ * See Kent's documentation "Designed to Fail Tests and Issues".
+ * The file opening process in H5F__new() initializes the cache copy of
+ * page_size via H5AC_create(). However, later on H5F__super_read()
+ * may change page size due to non-default setting of
+ * 'free-space manager info' in superblock extension.
+ * Fix: set the cache copy of page_size again if different from
+ * f->shared->fs_page_size.
+ */
+ if(shared->cache) {
+ if (H5AC_set_vfd_swmr_reader(shared->cache, TRUE, shared->fs_page_size) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set page size in cache for VFD SWMR reader");
+ }
+
shared->vfd_swmr_writer = FALSE;
shared->max_jump_ticks = 0;
@@ -1258,6 +1273,14 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api)
#if 0 /*Kent*/
HDassert(oent->length == nent->length);
#endif
+ /* This is a bug uncovered by issue #1 of the
+ * group test failures. See Kent's documentation
+ * "Designed to Fail Tests and Issues".
+ * nent->length can be <, =, > to oent->length.
+ * Fix: HDassert the 1st two cases: < and =.
+ * John will address the > case.
+ */
+ HDassert(nent->length <= oent->length);
/* the page has been altered -- evict it and
* any contained metadata cache entries.