Fixes a bug in the FSM section merge code exposed by VFD SWMR (#1505)

From Vailin:

    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).
This commit is contained in:
Dana Robinson 2022-03-17 08:39:55 -07:00 committed by GitHub
parent 96398e47af
commit fb29cd77ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1601,7 +1601,7 @@ H5FS_sect_try_merge(H5F_t *f, H5FS_t *fspace, H5FS_section_info_t *sect, unsigne
} /* 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")