diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-14 15:22:29 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-12-14 15:22:29 (GMT) |
commit | 7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a (patch) | |
tree | 6bd24199653eff3e99f312d748ba4909686bef61 /src/H5Dbtree.c | |
parent | 8e9b142d9cd347432d400b4f9b3b88a3f047c06d (diff) | |
parent | 2cb441c507dfbd4437ccf29e232a9b730e6e1003 (diff) | |
download | hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.zip hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.gz hdf5-7a0cdfbbacc86aa73e91dedc4d89e3e59214d50a.tar.bz2 |
[svn-r28636] merge from trunk.
Diffstat (limited to 'src/H5Dbtree.c')
-rw-r--r-- | src/H5Dbtree.c | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index 762c252..30c3a28 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -153,21 +153,21 @@ static herr_t H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info); /* v1 B-tree indexed chunk I/O ops */ const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{ - H5D__btree_idx_init, - H5D__btree_idx_create, - H5D__btree_idx_is_space_alloc, - H5D__btree_idx_insert, - H5D__btree_idx_get_addr, - NULL, - H5D__btree_idx_iterate, - H5D__btree_idx_remove, - H5D__btree_idx_delete, - H5D__btree_idx_copy_setup, - H5D__btree_idx_copy_shutdown, - H5D__btree_idx_size, - H5D__btree_idx_reset, - H5D__btree_idx_dump, - H5D__btree_idx_dest + H5D__btree_idx_init, /* insert */ + H5D__btree_idx_create, /* create */ + H5D__btree_idx_is_space_alloc, /* is_space_alloc */ + H5D__btree_idx_insert, /* insert */ + H5D__btree_idx_get_addr, /* get_addr */ + NULL, /* resize */ + H5D__btree_idx_iterate, /* iterate */ + H5D__btree_idx_remove, /* remove */ + H5D__btree_idx_delete, /* delete */ + H5D__btree_idx_copy_setup, /* copy_setup */ + H5D__btree_idx_copy_shutdown, /* copy_shutdown */ + H5D__btree_idx_size, /* size */ + H5D__btree_idx_reset, /* reset */ + H5D__btree_idx_dump, /* dump */ + H5D__btree_idx_dest /* destroy */ }}; @@ -649,7 +649,7 @@ H5D__btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out /* Remove raw data chunk from file */ H5_CHECK_OVERFLOW(lt_key->nbytes, uint32_t, hsize_t); if(H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, addr, (hsize_t)lt_key->nbytes) < 0) - HGOTO_ERROR(H5E_STORAGE, H5E_CANTFREE, H5B_INS_ERROR, "unable to free chunk") + HGOTO_ERROR(H5E_STORAGE, H5E_CANTFREE, H5B_INS_ERROR, "unable to free chunk") /* Mark keys as unchanged */ *lt_key_changed = FALSE; @@ -969,17 +969,12 @@ done: static hbool_t H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage) { - hbool_t ret_value = FALSE; /* Return value */ - FUNC_ENTER_STATIC_NOERR /* Check args */ HDassert(storage); - /* Set return value */ - ret_value = (hbool_t)H5F_addr_defined(storage->idx_addr); - - FUNC_LEAVE_NOAPI(ret_value) + FUNC_LEAVE_NOAPI((hbool_t)H5F_addr_defined(storage->idx_addr)) } /* end H5D__btree_idx_is_space_alloc() */ @@ -1353,9 +1348,8 @@ done: static herr_t H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) { - H5D_chunk_common_ud_t udata; /* User-data for loading B-tree nodes */ + H5D_chunk_common_ud_t udata; /* User-data for loading B-tree nodes */ H5B_info_t bt_info; /* B-tree info */ - hbool_t shared_init = FALSE; /* Whether shared B-tree info is initialized */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1368,11 +1362,6 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) HDassert(idx_info->storage); HDassert(index_size); - /* Initialize the shared info for the B-tree traversal */ - if(H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout) < 0) - HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info") - shared_init = TRUE; - /* Initialize B-tree node user-data */ HDmemset(&udata, 0, sizeof udata); udata.layout = idx_info->layout; @@ -1386,13 +1375,6 @@ H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size) *index_size = bt_info.size; done: - if(shared_init) { - if(NULL == idx_info->storage->u.btree.shared) - HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "ref-counted page nil") - if(H5UC_DEC(idx_info->storage->u.btree.shared) < 0) - HDONE_ERROR(H5E_IO, H5E_CANTFREE, FAIL, "unable to decrement ref-counted page") - } /* end if */ - FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__btree_idx_size() */ |