diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-13 15:21:28 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-13 15:21:28 (GMT) |
commit | 4fad103187db9095afc8eab90b5f5544feb1d19b (patch) | |
tree | 3e74669322711c4ea14f8fd80ecf14da984c6212 /src/H5Fio.c | |
parent | 0b78740ff471ff6fe68ceae65e3df76fef886ec4 (diff) | |
download | hdf5-4fad103187db9095afc8eab90b5f5544feb1d19b.zip hdf5-4fad103187db9095afc8eab90b5f5544feb1d19b.tar.gz hdf5-4fad103187db9095afc8eab90b5f5544feb1d19b.tar.bz2 |
Bring changes to I/O parameters from page_buffering branch.
Diffstat (limited to 'src/H5Fio.c')
-rw-r--r-- | src/H5Fio.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/H5Fio.c b/src/H5Fio.c index afe1278..d40483f 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -96,15 +96,11 @@ herr_t H5F_block_read(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, hid_t dxpl_id, void *buf/*out*/) { - H5F_io_info_t fio_info; /* I/O info for operation */ + H5F_io_info2_t fio_info; /* I/O info for operation */ H5FD_mem_t map_type; /* Mapped memory type */ - hid_t my_dxpl_id = dxpl_id; /* transfer property to use for I/O */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) -#ifdef QAK -HDfprintf(stderr, "%s: read from addr = %a, size = %Zu\n", FUNC, addr, size); -#endif /* QAK */ HDassert(f); HDassert(f->shared); @@ -118,16 +114,20 @@ HDfprintf(stderr, "%s: read from addr = %a, size = %Zu\n", FUNC, addr, size); /* Treat global heap as raw data */ map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type; -#ifdef H5_DEBUG_BUILD - /* GHEAP type is treated as RAW, so update the dxpl type property too */ - if(H5FD_MEM_GHEAP == type) - my_dxpl_id = H5AC_rawdata_dxpl_id; -#endif /* H5_DEBUG_BUILD */ - - /* Set up I/O info for operation */ + /* Set up the I/O info object */ fio_info.f = f; - if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(my_dxpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + if(H5FD_MEM_DRAW == type) { + if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(H5AC_ind_read_dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + } /* end if */ + else { + if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + } /* end else */ /* Pass through metadata accumulator layer */ if(H5F__accum_read(&fio_info, map_type, addr, size, buf) < 0) @@ -157,15 +157,11 @@ herr_t H5F_block_write(const H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, hid_t dxpl_id, const void *buf) { - H5F_io_info_t fio_info; /* I/O info for operation */ + H5F_io_info2_t fio_info; /* I/O info for operation */ H5FD_mem_t map_type; /* Mapped memory type */ - hid_t my_dxpl_id = dxpl_id; /* transfer property to use for I/O */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) -#ifdef QAK -HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size); -#endif /* QAK */ HDassert(f); HDassert(f->shared); @@ -180,16 +176,20 @@ HDfprintf(stderr, "%s: write to addr = %a, size = %Zu\n", FUNC, addr, size); /* Treat global heap as raw data */ map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type; -#ifdef H5_DEBUG_BUILD - /* GHEAP type is treated as RAW, so update the dxpl type property too */ - if(H5FD_MEM_GHEAP == type) - my_dxpl_id = H5AC_rawdata_dxpl_id; -#endif /* H5_DEBUG_BUILD */ - - /* Set up I/O info for operation */ + /* Set up the I/O info object */ fio_info.f = f; - if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(my_dxpl_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + if(H5FD_MEM_DRAW == type) { + if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(H5AC_ind_read_dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + } /* end if */ + else { + if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + } /* end else */ /* Pass through metadata accumulator layer */ if(H5F__accum_write(&fio_info, map_type, addr, size, buf) < 0) @@ -216,7 +216,7 @@ done: herr_t H5F_flush_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id) { - H5F_io_info_t fio_info; /* I/O info for operation */ + H5F_io_info2_t fio_info; /* I/O info for operation */ herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -227,10 +227,10 @@ H5F_flush_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id) /* Set up I/O info for operation */ fio_info.f = f; - - if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + if(NULL == (fio_info.meta_dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + if(NULL == (fio_info.raw_dxpl = (H5P_genplist_t *)H5I_object(H5AC_rawdata_dxpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") - /* Flush and reset the accumulator */ if(H5F__accum_reset(&fio_info, TRUE) < 0) |