summaryrefslogtreecommitdiffstats
path: root/src/H5Doh.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-12-13 05:42:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-12-13 05:42:36 (GMT)
commite78db67c621a2ce04d95c1c6b2b4b3c23682abfb (patch)
tree56a0b2364c3416c82e2fdcdb0c245b9c07d9c149 /src/H5Doh.c
parentaa4fc58ac985ba354525056428d79f918f95d119 (diff)
downloadhdf5-e78db67c621a2ce04d95c1c6b2b4b3c23682abfb.zip
hdf5-e78db67c621a2ce04d95c1c6b2b4b3c23682abfb.tar.gz
hdf5-e78db67c621a2ce04d95c1c6b2b4b3c23682abfb.tar.bz2
[svn-r28606] Description:
Revisions to normalize revise chunks vs. trunk, plus push dataset metadata changes into the cache immediately (instead of holding them within the dataset data structures). Tested on: MacOSX/64 10.11.2 (amazon) w/serial & parallel (h5committest not required on this branch)
Diffstat (limited to 'src/H5Doh.c')
-rw-r--r--src/H5Doh.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/src/H5Doh.c b/src/H5Doh.c
index db65479..8b70362 100644
--- a/src/H5Doh.c
+++ b/src/H5Doh.c
@@ -53,7 +53,7 @@ static hid_t H5O__dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id,
static void *H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc,
hid_t dxpl_id);
static H5O_loc_t *H5O__dset_get_oloc(hid_t obj_id);
-static herr_t H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
+static herr_t H5O__dset_bh_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh,
H5_ih_info_t *bh_info);
static herr_t H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id);
@@ -359,13 +359,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
+H5O__dset_bh_info(const H5O_loc_t *loc, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
{
H5O_layout_t layout; /* Data storage layout message */
- H5O_pline_t pline; /* I/O pipeline message */
H5O_efl_t efl; /* External File List message */
hbool_t layout_read = FALSE; /* Whether the layout message was read */
- hbool_t pline_read = FALSE; /* Whether the I/O pipeline message was read */
hbool_t efl_read = FALSE; /* Whether the external file list message was read */
htri_t exists; /* Flag if header message of interest exists */
herr_t ret_value = SUCCEED; /* Return value */
@@ -373,29 +371,21 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
FUNC_ENTER_STATIC
/* Sanity check */
- HDassert(f);
+ HDassert(loc);
+ HDassert(loc->file);
+ HDassert(H5F_addr_defined(loc->addr));
HDassert(oh);
HDassert(bh_info);
/* Get the layout message from the object header */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
+ if(NULL == H5O_msg_read_oh(loc->file, dxpl_id, oh, H5O_LAYOUT_ID, &layout))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find layout message")
layout_read = TRUE;
/* Check for chunked dataset storage */
if(layout.type == H5D_CHUNKED && H5D__chunk_is_space_alloc(&layout.storage)) {
- /* Check for I/O pipeline message */
- if((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
- else if(exists) {
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_PLINE_ID, &pline))
- HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find I/O pipeline message")
- pline_read = TRUE;
- } /* end else if */
- else
- HDmemset(&pline, 0, sizeof(pline));
-
- if(H5D__chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0)
+ /* Get size of chunk index */
+ if(H5D__chunk_bh_info(loc, dxpl_id, oh, &layout, &(bh_info->index_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info")
} /* end if */
else if(layout.type == H5D_VIRTUAL
@@ -403,7 +393,7 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
size_t virtual_heap_size;
/* Get size of global heap object for virtual dataset */
- if(H5HG_get_obj_size(f, dxpl_id, &(layout.storage.u.virt.serial_list_hobjid), &virtual_heap_size) < 0)
+ if(H5HG_get_obj_size(loc->file, dxpl_id, &(layout.storage.u.virt.serial_list_hobjid), &virtual_heap_size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get global heap size for virtual dataset mapping")
/* Return heap size */
@@ -419,12 +409,12 @@ H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
HDmemset(&efl, 0, sizeof(efl));
/* Get External File List message from the object header */
- if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_EFL_ID, &efl))
+ if(NULL == H5O_msg_read_oh(loc->file, dxpl_id, oh, H5O_EFL_ID, &efl))
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find EFL message")
efl_read = TRUE;
/* Get size of local heap for EFL message's file list */
- if(H5D__efl_bh_info(f, dxpl_id, &efl, &(bh_info->heap_size)) < 0)
+ if(H5D__efl_bh_info(loc->file, dxpl_id, &efl, &(bh_info->heap_size)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine EFL heap info")
} /* end if */
@@ -432,8 +422,6 @@ done:
/* Free messages, if they've been read in */
if(layout_read && H5O_msg_reset(H5O_LAYOUT_ID, &layout) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset data storage layout message")
- if(pline_read && H5O_msg_reset(H5O_PLINE_ID, &pline) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset I/O pipeline message")
if(efl_read && H5O_msg_reset(H5O_EFL_ID, &efl) < 0)
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset external file list message")