diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-04-14 04:39:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-04-14 04:39:11 (GMT) |
commit | 9b60a446b369bf13be70eba14b6a450cf03cf891 (patch) | |
tree | 303f0686fc04c39194cc3781b8f136683d126961 /src | |
parent | 17937903c47d1db67da1bf0c638304b32c62aba0 (diff) | |
download | hdf5-9b60a446b369bf13be70eba14b6a450cf03cf891.zip hdf5-9b60a446b369bf13be70eba14b6a450cf03cf891.tar.gz hdf5-9b60a446b369bf13be70eba14b6a450cf03cf891.tar.bz2 |
[svn-r6649] Purpose:
Bug fix.
Description:
Corrected fencepost error which was incorrectly checking for merging
metadata at the front of the metadata accumulator. This now allows the
metadata cache to cache I/O operations more efficiently.
Platforms tested:
FreeBSD 4.8 (sleipnir) w/C++
Linux 2.4 (burrwhite) w/FORTRAN
Solaris 2.7 (arabica) w/FORTRAN
IRIX64 6.5 (modi4) w/parallel & FORTRAN
(h5committest not run due to my ongoing difficulties with C++ on burrwhite).
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FD.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2268,10 +2268,12 @@ H5FD_free(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t si * Truncate it if this is true. */ if(file->cls->get_eoa) { haddr_t eoa; + eoa = file->cls->get_eoa(file); if(eoa == (last->addr+last->size)) { if(file->cls->set_eoa(file, last->addr) < 0) HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "set end of space allocation request failed"); + /* Remove this free block from the list */ file->fl[mapped_type] = last->next; if(file->maxsize==last->size) @@ -2984,7 +2986,7 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t si /* Check if the piece of metadata being written adjoins or is inside the metadata accumulator */ if((addr>=file->accum_loc && addr<=(file->accum_loc+file->accum_size)) || ((addr+size)>file->accum_loc && (addr+size)<=(file->accum_loc+file->accum_size)) - || (addr<file->accum_loc && (addr+size)>file->accum_loc)) { + || (addr<file->accum_loc && (addr+size)>=file->accum_loc)) { /* Check if the new metadata adjoins the beginning of the current accumulator */ if((addr+size)==file->accum_loc) { |