summaryrefslogtreecommitdiffstats
path: root/src/H5Fvfd_swmr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fvfd_swmr.c')
-rw-r--r--src/H5Fvfd_swmr.c45
1 files changed, 14 insertions, 31 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index 675d708..d7cb830 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.