diff options
author | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-08-10 19:25:06 (GMT) |
---|---|---|
committer | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-08-10 19:25:06 (GMT) |
commit | 0bb13dcf92a309d7668e8cda85f248b420934f29 (patch) | |
tree | 5cc9e27f69466ab86b346af07bfa437b000c4107 /src | |
parent | 0212f12d60d622f19aad1ddfd3f121c7953ad903 (diff) | |
download | hdf5-0bb13dcf92a309d7668e8cda85f248b420934f29.zip hdf5-0bb13dcf92a309d7668e8cda85f248b420934f29.tar.gz hdf5-0bb13dcf92a309d7668e8cda85f248b420934f29.tar.bz2 |
(1)
src/H5Fvfd_swmr.c
--enable or disable raw data flush depending on configuration
(2)
vfd_swmr_dsetchks_writer.c
vfd_swmr_dsetops_writer.c
--modifications to test/verify when flushing of raw data is enabled/disabled
--refactor coding
(3)
testvfdswmr.sh.in
--add testing with/without flush of raw data to tests: dsetchks and dsetops
(4)
vfd_swmr_attrdset_writer.c
--pass true for flushing raw data to the common routine init_vfd_swmr_config()
--refactor coding so that it has similar format as the other two tests: dsetops and dsetchks
(5)
vfd_swmr_addrem_writer.c
vfd_swmr_bigset_writer.c
vfd_swmr_generator.c
vfd_swmr_group_writer.c
vfd_swmr_reader.c
vfd_swmr_remove_reader.c
vfd_swmr_remove_writer.c
vfd_swmr_sparse_reader.c
vfd_swmr_sparse_writer.c
vfd_swmr_vlstr_reader.c
vfd_swmr_vlstr_writer.c
vfd_swmr_writer.c
vfd_swmr_zoo_writer.c
--pass true for flushing raw data to the common routine init_vfd_swmr_config()
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Fvfd_swmr.c | 45 |
1 files changed, 14 insertions, 31 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index 13170af..3220443 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -768,26 +768,26 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) /* 1) If requested, flush all raw data to the HDF5 file. * - * (Not for first cut.) - */ - HDassert(!shared->vfd_swmr_config.flush_raw_data); - -#if 1 - /* Test to see if b-tree corruption seen in VFD SWMR tests - * is caused by client hiding data from the metadata cache. Do - * this by calling H5D_flush_all(), which flushes any cached - * dataset storage. Eventually, we will do this regardless - * when the above flush_raw_data flag is set. */ + if(shared->vfd_swmr_config.flush_raw_data) { + + /* Test to see if b-tree corruption seen in VFD SWMR tests + * is caused by client hiding data from the metadata cache. Do + * this by calling H5D_flush_all(), which flushes any cached + * dataset storage. Eventually, we will do this regardless + * when the above flush_raw_data flag is set. + */ - if (H5D_flush_all(f) < 0) + if (H5D_flush_all(f) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush dataset cache") + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush dataset cache") - if (H5MF_free_aggrs(f) < 0) + if (H5MF_free_aggrs(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file space") + HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file space") + } + /* 2) If it exists, flush the metadata cache to the page buffer. */ if (shared->cache) { if (H5AC_prep_for_file_flush(f) < 0) @@ -806,23 +806,6 @@ H5F_vfd_swmr_writer_end_of_tick(H5F_t *f, hbool_t wait_for_reader) if (H5FD_truncate(shared->lf, FALSE) < 0) HGOTO_ERROR(H5E_FILE, H5E_WRITEERROR, FAIL, "low level truncate failed") -#endif - - /* 2) If it exists, flush the metadata cache to the page buffer. */ - if (shared->cache) { - - if (H5AC_prep_for_file_flush(f) < 0) - - HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "prep for MDC flush failed") - - if (H5AC_flush(f) < 0) - - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't flush metadata cache to the page buffer") - - if (H5AC_secure_from_file_flush(f) < 0) - - HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "secure from MDC flush failed") - } /* 3) If this is the first tick (i.e. tick == 1), create the * in memory version of the metadata file index. |