summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-12-02 17:07:25 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-12-02 17:07:25 (GMT)
commitadcf8a315e82c0848d126e7e46b662930c081896 (patch)
tree270c1a15f2cdfb4da645f7a59da639b9fff35d29
parent4d50f9a7a8737380b37b7cde751dbeae3b7c6b7c (diff)
downloadhdf5-adcf8a315e82c0848d126e7e46b662930c081896.zip
hdf5-adcf8a315e82c0848d126e7e46b662930c081896.tar.gz
hdf5-adcf8a315e82c0848d126e7e46b662930c081896.tar.bz2
Fix the FSM bug when setting the FSM threshold to a non-default value.
Check for smaller or larger section size after merging and shrinking a section, for this case is the section that is smaller than threshold (see H5MF_xfree() in H5MF.c). It is possible for the section to be smaller after merging/shrinking (see H5MF__sect_large_shrink() in H5MFsection.c).
-rw-r--r--doc/VFD_SWMR_Punch_List.md5
-rw-r--r--src/H5FSsection.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/VFD_SWMR_Punch_List.md b/doc/VFD_SWMR_Punch_List.md
index 5970bd4..e3d2223 100644
--- a/doc/VFD_SWMR_Punch_List.md
+++ b/doc/VFD_SWMR_Punch_List.md
@@ -140,3 +140,8 @@ guide to the syntax.
Given that the VFD SWMR configuration FAPL property is set, the writer field must
be consistent with the flags passed in the H5Fopen() (either H5F_ACC_RDWR for the
VFD SWMR writer, or H5F_ACC_RDONLY for the VFD SWMR readers).
+
+29. **Vailin, complete** Fix the FSM bug when setting the FSM threshold to a non-default value.
+ The problem was manifested when setting the threshold value in vfd_swmr_generator.c via
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, 1024 * 1024 * 1024) and
+ then run the vfd_swmr_addrem_writer.c.
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 27486f1..9fbc6f0 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -1617,7 +1617,7 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect,
} /* end if */
else {
/* Check if section is merged */
- if(sect->size > saved_fs_size) {
+ if(sect->size != saved_fs_size) {
if(H5FS__sect_link(fspace, sect, flags) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
sinfo_modified = TRUE;