diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-14 04:56:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-08-14 04:56:54 (GMT) |
commit | abd36a6f6ed8a19c2253209dd2f2632c1df34a29 (patch) | |
tree | f3f7266f36155570d26778cc18a694097078bc99 /src | |
parent | 7e654daa4689f82960e259271085342a74660e90 (diff) | |
download | hdf5-abd36a6f6ed8a19c2253209dd2f2632c1df34a29.zip hdf5-abd36a6f6ed8a19c2253209dd2f2632c1df34a29.tar.gz hdf5-abd36a6f6ed8a19c2253209dd2f2632c1df34a29.tar.bz2 |
[svn-r14082] Description:
Fix bug with moving object header messages forward into null messages
of exactly the same size and located in an object header chunk with a gap.
(Exposed by netCDF-4 test)
Tested on:
FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Oalloc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index ae07294..d5f17e0 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -1216,6 +1216,18 @@ H5O_move_msgs_forward(H5O_t *oh) /* Mark null message dirty */ null_msg->dirty = TRUE; + + /* Check for gap in null message's chunk */ + if(oh->chunk[old_chunkno].gap > 0) { + /* Eliminate the gap in the chunk */ + if(H5O_eliminate_gap(oh, null_msg, + ((oh->chunk[old_chunkno].image + oh->chunk[old_chunkno].size) - (H5O_SIZEOF_CHKSUM_OH(oh) + oh->chunk[old_chunkno].gap)), + oh->chunk[old_chunkno].gap) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTREMOVE, FAIL, "can't eliminate gap in chunk") + + /* Set the gap size to zero for the chunk */ + oh->chunk[old_chunkno].gap = 0; + } /* end if */ } /* end if */ else { unsigned new_null_msg; /* Message index for new null message */ |