summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 78fce2a..211f1aa 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1633,7 +1633,7 @@ H5Fstart_swmr_write(hid_t file_id)
if(file->shared->sblock->super_vers < HDF5_SUPERBLOCK_VERSION_3)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "file superblock version should be at least 3")
- HDassert(file->shared->latest_flags == H5F_LATEST_ALL_FLAGS);
+ HDassert((file->shared->latest_flags | H5F_LATEST_LAYOUT_MSG) > 0);
/* Should not be marked for SWMR writing mode already */
if(file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS)
@@ -1647,6 +1647,10 @@ H5Fstart_swmr_write(hid_t file_id)
if(ci_load || ci_write )
HGOTO_ERROR(H5E_FILE, H5E_UNSUPPORTED, FAIL, "can't have both SWMR and MDC cache image")
+ /* Flush the superblock extension */
+ if(H5F_flush_tagged_metadata(file, file->shared->sblock->ext_addr, H5AC_ind_read_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock extension")
+
/* Flush data buffers */
if(H5F__flush(file, H5AC_ind_read_dxpl_id, H5AC_rawdata_dxpl_id, FALSE) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information")