summaryrefslogtreecommitdiffstats
path: root/src/H5Olayout.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2019-03-06 22:57:42 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2019-03-06 22:57:42 (GMT)
commitfaec33960f48e070afd6a7d74630cda3029cb46f (patch)
tree3690e1d9c7bf74363a9ae30a212cbff3914576e5 /src/H5Olayout.c
parentcdec6ca87f5485aa29679070908d4774127e8a78 (diff)
downloadhdf5-faec33960f48e070afd6a7d74630cda3029cb46f.zip
hdf5-faec33960f48e070afd6a7d74630cda3029cb46f.tar.gz
hdf5-faec33960f48e070afd6a7d74630cda3029cb46f.tar.bz2
Fix issue with direct chunk write not updating the "last chunk" index
cache. Fix issues involving datasets being "no allocated" when they contain cached raw data.
Diffstat (limited to 'src/H5Olayout.c')
-rw-r--r--src/H5Olayout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 2b65e0c..86f4c46 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -1039,7 +1039,8 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
layout_dst->storage.u.contig.size = H5S_extent_nelem(udata->src_space_extent) *
H5T_get_size(udata->src_dtype);
- if(H5D__contig_is_space_alloc(&layout_src->storage)) {
+ if(H5D__contig_is_space_alloc(&layout_src->storage)
+ || (cpy_info->shared_fo && H5D__contig_is_data_cached((const H5D_shared_t *)cpy_info->shared_fo))) {
/* copy contiguous raw data */
if(H5D__contig_copy(file_src, &layout_src->storage.u.contig, file_dst, &layout_dst->storage.u.contig, udata->src_dtype, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy contiguous storage")
@@ -1048,7 +1049,8 @@ H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
break;
case H5D_CHUNKED:
- if(H5D__chunk_is_space_alloc(&layout_src->storage)) {
+ if(H5D__chunk_is_space_alloc(&layout_src->storage)
+ || (cpy_info->shared_fo && H5D__chunk_is_data_cached((const H5D_shared_t *)cpy_info->shared_fo))) {
/* Create chunked layout */
if(H5D__chunk_copy(file_src, &layout_src->storage.u.chunk, &layout_src->u.chunk, file_dst, &layout_dst->storage.u.chunk, udata->src_space_extent, udata->src_dtype, udata->common.src_pline, cpy_info) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage")