summaryrefslogtreecommitdiffstats
path: root/src/H5Dcontig.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Dcontig.c')
-rw-r--r--src/H5Dcontig.c51
1 files changed, 23 insertions, 28 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 484514f..c75ae43 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -195,8 +195,9 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
+H5D__contig_fill(const H5D_io_info_t *io_info)
{
+ const H5D_t *dset = io_info->dset; /* the dataset pointer */
H5D_io_info_t ioinfo; /* Dataset I/O info */
H5D_storage_t store; /* Union of storage info for dataset */
H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */
@@ -211,15 +212,17 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
hbool_t blocks_written = FALSE; /* Flag to indicate that chunk was actually written */
hbool_t using_mpi = FALSE; /* Flag to indicate that the file is being accessed with an MPI-capable file driver */
#endif /* H5_HAVE_PARALLEL */
+ hid_t md_dxpl_id = io_info->md_dxpl_id;
+ hid_t raw_dxpl_id = io_info->raw_dxpl_id;
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
- hid_t my_dxpl_id; /* DXPL ID to use for this operation */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Check args */
- HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
+ HDassert(TRUE == H5P_isa_class(md_dxpl_id, H5P_DATASET_XFER));
+ HDassert(TRUE == H5P_isa_class(raw_dxpl_id, H5P_DATASET_XFER));
HDassert(dset && H5D_CONTIGUOUS == dset->shared->layout.type);
HDassert(H5F_addr_defined(dset->shared->layout.storage.u.contig.addr));
HDassert(dset->shared->layout.storage.u.contig.size > 0);
@@ -239,20 +242,11 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
/* Set the MPI-capable file driver flag */
using_mpi = TRUE;
-
- /* Use the internal "independent" DXPL */
- my_dxpl_id = H5AC_dxpl_id;
} /* end if */
- else {
-#endif /* H5_HAVE_PARALLEL */
- /* Use the DXPL we were given */
- my_dxpl_id = dxpl_id;
-#ifdef H5_HAVE_PARALLEL
- } /* end else */
#endif /* H5_HAVE_PARALLEL */
/* Fill the DXPL cache values for later use */
- if(H5D__get_dxpl_cache(my_dxpl_id, &dxpl_cache) < 0)
+ if(H5D__get_dxpl_cache(raw_dxpl_id, &dxpl_cache) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
/* Initialize storage info for this dataset */
@@ -268,7 +262,7 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
if(H5D__fill_init(&fb_info, NULL, NULL, NULL, NULL, NULL,
&dset->shared->dcpl_cache.fill,
dset->shared->type, dset->shared->type_id, npoints,
- dxpl_cache->max_temp_buf, my_dxpl_id) < 0)
+ dxpl_cache->max_temp_buf, md_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize fill buffer info")
fb_info_init = TRUE;
@@ -276,7 +270,7 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
offset = 0;
/* Simple setup for dataset I/O info struct */
- H5D_BUILD_IO_INFO_WRT(&ioinfo, dset, dxpl_cache, my_dxpl_id, &store, fb_info.fill_buf);
+ H5D_BUILD_IO_INFO_WRT(&ioinfo, dset, dxpl_cache, raw_dxpl_id, &store, fb_info.fill_buf);
/*
* Fill the entire current extent with the fill value. We can do
@@ -296,7 +290,7 @@ H5D__contig_fill(const H5D_t *dset, hid_t dxpl_id)
/* Check for VL datatype & non-default fill value */
if(fb_info.has_vlen_fill_type)
/* Re-fill the buffer to use for this I/O operation */
- if(H5D__fill_refill_vl(&fb_info, curr_points, my_dxpl_id) < 0)
+ if(H5D__fill_refill_vl(&fb_info, curr_points, md_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
#ifdef H5_HAVE_PARALLEL
@@ -940,7 +934,7 @@ H5D__contig_readvv(const H5D_io_info_t *io_info,
udata.dset_contig = &(io_info->dset->shared->cache.contig);
udata.store_contig = &(io_info->store->contig);
udata.rbuf = (unsigned char *)io_info->u.rbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.dxpl_id = io_info->raw_dxpl_id;
/* Call generic sequence operation routine */
if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
@@ -955,7 +949,7 @@ H5D__contig_readvv(const H5D_io_info_t *io_info,
udata.file = io_info->dset->oloc.file;
udata.dset_addr = io_info->store->contig.dset_addr;
udata.rbuf = (unsigned char *)io_info->u.rbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.dxpl_id = io_info->raw_dxpl_id;
/* Call generic sequence operation routine */
if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
@@ -1266,7 +1260,7 @@ H5D__contig_writevv(const H5D_io_info_t *io_info,
udata.dset_contig = &(io_info->dset->shared->cache.contig);
udata.store_contig = &(io_info->store->contig);
udata.wbuf = (const unsigned char *)io_info->u.wbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.dxpl_id = io_info->raw_dxpl_id;
/* Call generic sequence operation routine */
if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
@@ -1281,7 +1275,7 @@ H5D__contig_writevv(const H5D_io_info_t *io_info,
udata.file = io_info->dset->oloc.file;
udata.dset_addr = io_info->store->contig.dset_addr;
udata.wbuf = (const unsigned char *)io_info->u.wbuf;
- udata.dxpl_id = io_info->dxpl_id;
+ udata.dxpl_id = io_info->raw_dxpl_id;
/* Call generic sequence operation routine */
if((ret_value = H5VM_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
@@ -1308,7 +1302,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__contig_flush(H5D_t *dset, hid_t dxpl_id)
+H5D__contig_flush(H5D_t *dset, hid_t H5_ATTR_UNUSED dxpl_id)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1317,8 +1311,9 @@ H5D__contig_flush(H5D_t *dset, hid_t dxpl_id)
/* Sanity check */
HDassert(dset);
- /* Flush any data in sieve buffer */
- if(H5D__flush_sieve_buf(dset, dxpl_id) < 0)
+ /* Flush any data in sieve buffer - use the raw data dxpl since
+ the one passed in is a metadata dxpl. */
+ if(H5D__flush_sieve_buf(dset, H5AC_rawdata_dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer")
done:
@@ -1517,8 +1512,8 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
dst_nbytes = mem_nbytes = src_nbytes;
} /* end if */
- /* Read raw data from source file */
- if(H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, H5P_DATASET_XFER_DEFAULT, buf) < 0)
+ /* Read raw data from source file - use raw dxpl because passed in one is metadata */
+ if(H5F_block_read(f_src, H5FD_MEM_DRAW, addr_src, src_nbytes, H5AC_rawdata_dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read raw data")
/* Perform datatype conversion, if necessary */
@@ -1538,7 +1533,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed")
/* Reclaim space from variable length data */
- if(H5D_vlen_reclaim(tid_mem, buf_space, H5P_DATASET_XFER_DEFAULT, reclaim_buf) < 0)
+ if(H5D_vlen_reclaim(tid_mem, buf_space, dxpl_id, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, FAIL, "unable to reclaim variable-length data")
} /* end if */
else if(fix_ref) {
@@ -1561,8 +1556,8 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
HDmemset(buf, 0, src_nbytes);
} /* end if */
- /* Write raw data to destination file */
- if(H5F_block_write(f_dst, H5FD_MEM_DRAW, addr_dst, dst_nbytes, H5P_DATASET_XFER_DEFAULT, buf) < 0)
+ /* Write raw data to destination file - use raw dxpl because passed in one is metadata */
+ if(H5F_block_write(f_dst, H5FD_MEM_DRAW, addr_dst, dst_nbytes, H5AC_rawdata_dxpl_id, buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write raw data")
/* Adjust loop variables */