diff options
Diffstat (limited to 'src/H5MFsection.c')
-rw-r--r-- | src/H5MFsection.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/H5MFsection.c b/src/H5MFsection.c index f35ff21..ad1f074 100644 --- a/src/H5MFsection.c +++ b/src/H5MFsection.c @@ -774,9 +774,12 @@ H5MF__sect_small_merge(H5FS_section_info_t **_sect1, H5FS_section_info_t *_sect2 /* Need to free possible raw/metadata page in the page buffer. * This is in response to the data corruption bug from test/fheap.c * when page buffering + page aggregation strategy are used. - * Note: Large raw/metadata page bypasses the page buffer */ + * Note: Large raw/metadata page bypasses the page buffer. + * Note: Update of raw data page (large or small sized) is handled + * by the PB cache + */ if(udata->f->shared->pb_ptr != NULL) - if(H5PB_remove_entry(udata->f, (*sect1)->sect_info.addr) < 0) + if(H5PB_remove_entry(udata->f->shared, (*sect1)->sect_info.addr) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "can't free merged section from page buffer") if(H5MF__sect_free((H5FS_section_info_t *)(*sect1)) < 0) @@ -819,12 +822,21 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, const H5MF_free_section_t *sect2 = (const H5MF_free_section_t *)_sect2; /* File free section */ htri_t ret_value = FALSE; /* Return value */ - FUNC_ENTER_STATIC_NOERR + FUNC_ENTER_STATIC /* Check arguments. */ HDassert(sect1); HDassert(sect2); HDassert(sect1->sect_info.type == sect2->sect_info.type); /* Checks "MERGE_SYM" flag */ + if (!H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)) { + fprintf(stderr, "%s.%d: sect1->sect_info.addr %" PRIuHADDR + ", sect2->sect_info.addr %" PRIuHADDR "\n", __func__, __LINE__, + sect1->sect_info.addr, sect2->sect_info.addr); + fprintf(stderr, "%s.%d: sect1->sect_info.size %" PRIuHSIZE + ", sect2->sect_info.size %" PRIuHSIZE "\n", __func__, __LINE__, + sect1->sect_info.size, sect2->sect_info.size); + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't merge") + } HDassert(H5F_addr_lt(sect1->sect_info.addr, sect2->sect_info.addr)); ret_value = H5F_addr_eq(sect1->sect_info.addr + sect1->sect_info.size, sect2->sect_info.addr); @@ -833,6 +845,7 @@ H5MF__sect_large_can_merge(const H5FS_section_info_t *_sect1, HDfprintf(stderr, "%s: Leaving: ret_value = %t\n", FUNC, ret_value); #endif /* H5MF_ALLOC_DEBUG_MORE */ +done: FUNC_LEAVE_NOAPI(ret_value) } /* H5MF__sect_large_can_merge() */ |