summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-17 15:39:55 (GMT)
committerGitHub <noreply@github.com>2022-03-17 15:39:55 (GMT)
commitfb29cd77ad7891ac423159e6436ac496b67f0c72 (patch)
tree81d547417f33886b5686e90f68b899b7a645b3cc
parent96398e47af98c55e14b81527a354c2f83c370576 (diff)
downloadhdf5-fb29cd77ad7891ac423159e6436ac496b67f0c72.zip
hdf5-fb29cd77ad7891ac423159e6436ac496b67f0c72.tar.gz
hdf5-fb29cd77ad7891ac423159e6436ac496b67f0c72.tar.bz2
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).
-rw-r--r--src/H5FSsection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index befc760..55f8a94 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -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")