diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-07-01 21:26:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-07-01 21:26:27 (GMT) |
commit | 55a945c985692dfd2c8e1b2915d413b1b704905a (patch) | |
tree | 9e2e2e79738a65b20c33dc6443e348b4421ba31a /src/H5HFiblock.c | |
parent | 732e64b335c7a16d0724a993d7f85f8b748e244c (diff) | |
download | hdf5-55a945c985692dfd2c8e1b2915d413b1b704905a.zip hdf5-55a945c985692dfd2c8e1b2915d413b1b704905a.tar.gz hdf5-55a945c985692dfd2c8e1b2915d413b1b704905a.tar.bz2 |
[svn-r17139] Description:
Bring r17138 from trunk into 1.8 branch:
Disable use of temporary file space allocation when using a parallel VFD,
until we've made changes to broadcast the new address of the metadata when it
is relocated down into 'normal' file space.
Tested on:
Mac OS X/32 10.5.8 (amazon)
(h5committested on trunk)
Diffstat (limited to 'src/H5HFiblock.c')
-rw-r--r-- | src/H5HFiblock.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c index 2c79403..04b1f50 100644 --- a/src/H5HFiblock.c +++ b/src/H5HFiblock.c @@ -600,8 +600,14 @@ HDfprintf(stderr, "%s: new_next_entry = %u\n", FUNC, new_next_entry); iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock); /* Allocate [temporary] space for the new indirect block on disk */ - if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + if(H5F_USE_TMP_SPACE(hdr->f)) { + if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + } /* end if */ + else { + if(HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + } /* end else */ #ifdef QAK HDfprintf(stderr, "%s: Check 1.0 - iblock->addr = %a, new_addr = %a\n", FUNC, iblock->addr, new_addr); #endif /* QAK */ @@ -771,8 +777,14 @@ HDfprintf(stderr, "%s: iblock->nrows = %u\n", FUNC, iblock->nrows); iblock->size = H5HF_MAN_INDIRECT_SIZE(hdr, iblock); /* Allocate [temporary] space for the new indirect block on disk */ - if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + if(H5F_USE_TMP_SPACE(hdr->f)) { + if(HADDR_UNDEF == (new_addr = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + } /* end if */ + else { + if(HADDR_UNDEF == (new_addr = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size))) + HGOTO_ERROR(H5E_HEAP, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + } /* end else */ #ifdef QAK HDfprintf(stderr, "%s: new_addr = %a\n", FUNC, new_addr); #endif /* QAK */ @@ -1087,8 +1099,14 @@ HDfprintf(stderr, "%s: dir_rows = %u\n", FUNC, dir_rows); iblock->child_iblocks = NULL; /* Allocate [temporary] space for the indirect block on disk */ - if(HADDR_UNDEF == (*addr_p = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + if(H5F_USE_TMP_SPACE(hdr->f)) { + if(HADDR_UNDEF == (*addr_p = H5MF_alloc_tmp(hdr->f, (hsize_t)iblock->size))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + } /* end if */ + else { + if(HADDR_UNDEF == (*addr_p = H5MF_alloc(hdr->f, H5FD_MEM_FHEAP_IBLOCK, dxpl_id, (hsize_t)iblock->size))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for fractal heap indirect block") + } /* end else */ iblock->addr = *addr_p; /* Attach to parent indirect block, if there is one */ |