summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-09-23 16:17:47 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-09-23 16:17:47 (GMT)
commit8880ec672eeb8f57c023938074d1336dfc82e2ed (patch)
treee33165e0428a7e4e9d35952ef9cecd9331b111ee /src/H5Fint.c
parentb5446a9c638b5a95b8dfe132f646aa4358d2b539 (diff)
downloadhdf5-8880ec672eeb8f57c023938074d1336dfc82e2ed.zip
hdf5-8880ec672eeb8f57c023938074d1336dfc82e2ed.tar.gz
hdf5-8880ec672eeb8f57c023938074d1336dfc82e2ed.tar.bz2
Style cleanups and misc. bugfixes discovered during full SWMR development.
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index e52d539..4c5e00e 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -678,8 +678,10 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t
if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &latest_format) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag")
/* For latest format or SWMR_WRITE, activate all latest version support */
- if(latest_format || (H5F_INTENT(f) & H5F_ACC_SWMR_WRITE))
+ if(latest_format)
f->shared->latest_flags |= H5F_LATEST_ALL_FLAGS;
+ else if(H5F_INTENT(f) & H5F_ACC_SWMR_WRITE)
+ f->shared->latest_flags |= H5F_LATEST_LAYOUT_MSG;
if(H5P_get(plist, H5F_ACS_USE_MDC_LOGGING_NAME, &(f->shared->use_mdc_logging)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'use mdc logging' flag")
if(H5P_get(plist, H5F_ACS_START_MDC_LOG_ON_ACCESS_NAME, &(f->shared->start_mdc_log_on_access)) < 0)
@@ -1456,11 +1458,13 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
if(H5F_INTENT(file) & H5F_ACC_SWMR_WRITE)
file->shared->sblock->status_flags |= H5F_SUPER_SWMR_WRITE_ACCESS;
- /* Flush the superblock */
+ /* Flush the superblock & superblock extension */
if(H5F_super_dirty(file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, NULL, "unable to mark superblock as dirty")
if(H5F_flush_tagged_metadata(file, H5AC__SUPERBLOCK_TAG, meta_dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock")
+ if(H5F_flush_tagged_metadata(file, file->shared->sblock->ext_addr, meta_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock extension")
/* Remove the file lock for SWMR_WRITE */
if(use_file_locking && (H5F_INTENT(file) & H5F_ACC_SWMR_WRITE)) {