mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r28717] Description:
Minor change to align w/revise_chunks branch Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (too minor for h5committest)
This commit is contained in:
parent
9ceca0f89a
commit
4a25e5b788
@ -1885,6 +1885,9 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
|||||||
void *chunk = NULL; /* Pointer to locked chunk buffer */
|
void *chunk = NULL; /* Pointer to locked chunk buffer */
|
||||||
htri_t cacheable; /* Whether the chunk is cacheable */
|
htri_t cacheable; /* Whether the chunk is cacheable */
|
||||||
|
|
||||||
|
/* Set chunk's [scaled] coordinates */
|
||||||
|
io_info->store->chunk.scaled = chunk_info->scaled;
|
||||||
|
|
||||||
/* Determine if we should use the chunk cache */
|
/* Determine if we should use the chunk cache */
|
||||||
if((cacheable = H5D__chunk_cacheable(io_info, udata.chunk_block.offset, FALSE)) < 0)
|
if((cacheable = H5D__chunk_cacheable(io_info, udata.chunk_block.offset, FALSE)) < 0)
|
||||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
|
||||||
@ -1895,9 +1898,6 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
|||||||
H5_CHECK_OVERFLOW(type_info->src_type_size, /*From:*/ size_t, /*To:*/ uint32_t);
|
H5_CHECK_OVERFLOW(type_info->src_type_size, /*From:*/ size_t, /*To:*/ uint32_t);
|
||||||
src_accessed_bytes = chunk_info->chunk_points * (uint32_t)type_info->src_type_size;
|
src_accessed_bytes = chunk_info->chunk_points * (uint32_t)type_info->src_type_size;
|
||||||
|
|
||||||
/* Set chunk's [scaled] coordinates */
|
|
||||||
io_info->store->chunk.scaled = chunk_info->scaled;
|
|
||||||
|
|
||||||
/* Lock the chunk into the cache */
|
/* Lock the chunk into the cache */
|
||||||
if(NULL == (chunk = H5D__chunk_lock(io_info, &udata, FALSE)))
|
if(NULL == (chunk = H5D__chunk_lock(io_info, &udata, FALSE)))
|
||||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
|
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
|
||||||
@ -2011,6 +2011,9 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
|||||||
HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
|
HDassert((H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length > 0) ||
|
||||||
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
|
(!H5F_addr_defined(udata.chunk_block.offset) && udata.chunk_block.length == 0));
|
||||||
|
|
||||||
|
/* Set chunk's [scaled] coordinates */
|
||||||
|
io_info->store->chunk.scaled = chunk_info->scaled;
|
||||||
|
|
||||||
/* Determine if we should use the chunk cache */
|
/* Determine if we should use the chunk cache */
|
||||||
if((cacheable = H5D__chunk_cacheable(io_info, udata.chunk_block.offset, TRUE)) < 0)
|
if((cacheable = H5D__chunk_cacheable(io_info, udata.chunk_block.offset, TRUE)) < 0)
|
||||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
|
||||||
@ -2029,9 +2032,6 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
|||||||
fm->fsel_type == H5S_SEL_POINTS)
|
fm->fsel_type == H5S_SEL_POINTS)
|
||||||
entire_chunk = FALSE;
|
entire_chunk = FALSE;
|
||||||
|
|
||||||
/* Set chunk's [scaled] coordinates */
|
|
||||||
io_info->store->chunk.scaled = chunk_info->scaled;
|
|
||||||
|
|
||||||
/* Lock the chunk into the cache */
|
/* Lock the chunk into the cache */
|
||||||
if(NULL == (chunk = H5D__chunk_lock(io_info, &udata, entire_chunk)))
|
if(NULL == (chunk = H5D__chunk_lock(io_info, &udata, entire_chunk)))
|
||||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
|
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
|
||||||
@ -3684,9 +3684,6 @@ H5D__chunk_allocate(const H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite,
|
|||||||
} /* end if */
|
} /* end if */
|
||||||
|
|
||||||
/* Insert the chunk record into the index */
|
/* Insert the chunk record into the index */
|
||||||
/* (Note that this isn't safe, from a SWMR perspective, unlike
|
|
||||||
* serial operation. -QAK
|
|
||||||
*/
|
|
||||||
if(need_insert && ops->insert)
|
if(need_insert && ops->insert)
|
||||||
if((ops->insert)(&idx_info, &udata, dset) < 0)
|
if((ops->insert)(&idx_info, &udata, dset) < 0)
|
||||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
|
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert chunk addr into index")
|
||||||
|
Loading…
Reference in New Issue
Block a user