summaryrefslogtreecommitdiffstats
path: root/src/H5Oalloc.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2017-03-14 04:30:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2017-03-14 04:30:37 (GMT)
commit0313cbb91d974b153dbe8747d193ac3c619eea3b (patch)
treeaf6c4a631d5753685ee0033a6a8415a25fc97672 /src/H5Oalloc.c
parent847d675f2743ec420ef6c9efdd6e52ae93b4fe44 (diff)
downloadhdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.zip
hdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.tar.gz
hdf5-0313cbb91d974b153dbe8747d193ac3c619eea3b.tar.bz2
Final merge of page buffering branch to develop
Diffstat (limited to 'src/H5Oalloc.c')
-rw-r--r--src/H5Oalloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 4f98cfa..40c9c38 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -2023,6 +2023,7 @@ H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
/* Second message has been merged, delete it */
if(merged_msg) {
H5O_chunk_proxy_t *curr_chk_proxy; /* Chunk that message is in */
+ htri_t result;
/* Release any information/memory for second message */
H5O_msg_free_mesg(curr_msg2);
@@ -2050,6 +2051,13 @@ H5O_merge_null(H5F_t *f, hid_t dxpl_id, H5O_t *oh)
/* (Don't bother reducing size of message array for now -QAK) */
oh->nmesgs--;
+ /* The merge null message might span the entire chunk: scan for empty chunk to remove */
+ if((result = H5O_remove_empty_chunks(f, dxpl_id, oh)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTPACK, FAIL, "can't remove empty chunk")
+ else if(result > 0)
+ /* Get out of loop */
+ break;
+
/* If the merged message is too large, shrink the chunk */
if(curr_msg->raw_size >= H5O_MESG_MAX_SIZE)
if(H5O_alloc_shrink_chunk(f, dxpl_id, oh, curr_msg->chunkno) < 0)