diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-12-13 05:42:10 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-12-13 05:42:10 (GMT) |
commit | e9a3da63a4a36c1c7431832cc50f71200b523864 (patch) | |
tree | 22228b9967f3e7ffd25544a297b5e957f0c45158 /src/H5F.c | |
parent | 4b36b8271b59f7f87294735812bfa80404c69f88 (diff) | |
download | hdf5-e9a3da63a4a36c1c7431832cc50f71200b523864.zip hdf5-e9a3da63a4a36c1c7431832cc50f71200b523864.tar.gz hdf5-e9a3da63a4a36c1c7431832cc50f71200b523864.tar.bz2 |
[svn-r28605] 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/H5F.c')
-rw-r--r-- | src/H5F.c | 36 |
1 files changed, 17 insertions, 19 deletions
@@ -1649,8 +1649,8 @@ H5Fstart_swmr_write(hid_t file_id) if(H5F_get_obj_count(file, H5F_OBJ_LOCAL|H5F_OBJ_GROUP|H5F_OBJ_DATASET, FALSE, &grp_dset_count) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_BADITER, FAIL, "H5F_get_obj_count failed") - /* Allocate space for group and object locations */ if(grp_dset_count) { + /* Allocate space for group and object locations */ if((obj_ids = (hid_t *) H5MM_malloc(grp_dset_count * sizeof(hid_t))) == NULL) HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for hid_t") if((obj_glocs = (H5G_loc_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_loc_t))) == NULL) @@ -1659,31 +1659,29 @@ H5Fstart_swmr_write(hid_t file_id) HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5O_loc_t") if((obj_paths = (H5G_name_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_name_t))) == NULL) HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5G_name_t") - } - /* Get the list of opened object ids (groups & datasets) */ - if(grp_dset_count) { + /* Get the list of opened object ids (groups & datasets) */ if(H5F_get_obj_ids(file, H5F_OBJ_LOCAL|H5F_OBJ_GROUP|H5F_OBJ_DATASET, grp_dset_count, obj_ids, FALSE, &grp_dset_count) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5F_get_obj_ids failed") - } - /* Refresh opened objects (groups, datasets) in the file */ - for(u = 0; u < grp_dset_count; u++) { - H5O_loc_t *oloc; /* object location */ + /* Refresh opened objects (groups, datasets) in the file */ + for(u = 0; u < grp_dset_count; u++) { + H5O_loc_t *oloc; /* object location */ - /* Set up the id's group location */ - obj_glocs[u].oloc = &obj_olocs[u]; - obj_glocs[u].path = &obj_paths[u]; - H5G_loc_reset(&obj_glocs[u]); + /* Set up the id's group location */ + obj_glocs[u].oloc = &obj_olocs[u]; + obj_glocs[u].path = &obj_paths[u]; + H5G_loc_reset(&obj_glocs[u]); - /* get the id's object location */ - if((oloc = H5O_get_loc(obj_ids[u])) == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object") + /* get the id's object location */ + if((oloc = H5O_get_loc(obj_ids[u])) == NULL) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object") - /* Refresh (part 1) */ - if(H5O_refresh_metadata_close(obj_ids[u], *oloc, &obj_glocs[u], H5AC_dxpl_id) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't refresh-close object") - } + /* Refresh (part 1) */ + if(H5O_refresh_metadata_close(obj_ids[u], *oloc, &obj_glocs[u], H5AC_dxpl_id) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't refresh-close object") + } /* end for */ + } /* end if */ /* Set up I/O info for operation */ fio_info.f = file; |