From adcf8a315e82c0848d126e7e46b662930c081896 Mon Sep 17 00:00:00 2001 From: Vailin Choi Date: Mon, 2 Dec 2019 11:07:25 -0600 Subject: 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). --- doc/VFD_SWMR_Punch_List.md | 5 +++++ src/H5FSsection.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- cgit v0.12