diff options
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 108 |
1 files changed, 54 insertions, 54 deletions
@@ -23,7 +23,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Aprivate.h" /* Attributes */ #include "H5AC1private.h" /* Metadata cache */ -#include "H5AC2private.h" /* Metadata cache2 */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ @@ -778,7 +778,7 @@ H5Fis_hdf5(const char *name) HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file") /* The file is an hdf5 file if the hdf5 file signature can be found */ - ret_value = (HADDR_UNDEF!=H5F_locate_signature(file, H5AC2_ind_dxpl_id)); + ret_value = (HADDR_UNDEF!=H5F_locate_signature(file, H5AC_ind_dxpl_id)); done: /* Close the file */ @@ -822,7 +822,7 @@ done: * * J Mainzer, Jun 30, 2005 * Added lf parameter so the shared->lf field can be - * initialized prior to the call to H5AC2_create() if a + * initialized prior to the call to H5AC_create() if a * new instance of H5F_file_t is created. lf should be * NULL if shared isn't, and vise versa. * @@ -938,14 +938,14 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf) * the access property list should be updated to reflect that. */ if(SUCCEED != H5AC1_create(f, &(f->shared->mdc_initCacheCfg))) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create metadata cache") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create metadata cache1") /* Create a metadata cache with modified API along side the regular * version. For now, this is just for testing. Once we get it * fully in use, we will delete the old version. */ - if(H5AC2_create(f, (H5AC2_cache_config_t *)&(f->shared->mdc_initCacheCfg)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create meta data cache2") + if(H5AC_create(f, (H5AC_cache_config_t *)&(f->shared->mdc_initCacheCfg)) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to create metadata cache") /* Create the file's "open object" information */ if(H5FO_create(f) < 0) @@ -1017,13 +1017,13 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) /* Dump debugging info */ H5AC1_stats(f); #endif /* H5AC1_DUMP_STATS_ON_CLOSE */ -#if H5AC2_DUMP_STATS_ON_CLOSE +#if H5AC_DUMP_STATS_ON_CLOSE /* Dump debugging info */ - H5AC2_stats(f); -#endif /* H5AC2_DUMP_STATS_ON_CLOSE */ + H5AC_stats(f); +#endif /* H5AC_DUMP_STATS_ON_CLOSE */ /* shut down metadata journaling if it is enabled. */ - if(H5C2_end_journaling(f, dxpl_id, f->shared->cache2) < 0) + if(H5C_end_journaling(f, dxpl_id, f->shared->cache) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to shutdown metadata journaling") @@ -1059,7 +1059,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id) /* Push error, but keep going*/ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file") /* also destroy the new cache */ - if(H5AC2_dest(f, dxpl_id) < 0) + if(H5AC_dest(f, dxpl_id) < 0) /* Push error, but keep going*/ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file") if(H5FO_dest(f) < 0) @@ -1393,16 +1393,16 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t d HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "unable to build extpath") { - H5AC2_jnl_config_t * config_ptr = NULL; + H5AC_jnl_config_t * config_ptr = NULL; config_ptr = &(file->shared->initJnlCfg); - if(H5AC2_check_for_journaling(file, dxpl_id, file->shared->cache2, + if(H5AC_check_for_journaling(file, dxpl_id, file->shared->cache, config_ptr->journal_recovered) < 0 ) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "H5AC2_check_for_journaling() reports failure.") + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "H5AC_check_for_journaling() reports failure.") - if(H5AC2_set_jnl_config(file, dxpl_id, config_ptr, TRUE) < 0 ) - HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "H5AC2_set_jnl_config() failed.") + if(H5AC_set_jnl_config(file, dxpl_id, config_ptr, TRUE) < 0 ) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "H5AC_set_jnl_config() failed.") } /* Success */ @@ -1515,7 +1515,7 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* * Create a new file or truncate an existing file. */ - if(NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id, H5AC2_dxpl_id))) + if(NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id, H5AC_dxpl_id))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to create file") /* Get an atom for the file */ @@ -1602,7 +1602,7 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list") /* Open the file */ - if(NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC2_dxpl_id))) + if(NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id, H5AC_dxpl_id))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open file") /* Get an atom for the file */ @@ -1700,7 +1700,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "object is not associated with a file") /* Flush the file */ - if(H5F_flush(f, H5AC2_dxpl_id, scope, H5F_FLUSH_NONE) < 0) + if(H5F_flush(f, H5AC_dxpl_id, scope, H5F_FLUSH_NONE) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "flush failed") done: @@ -1729,7 +1729,7 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags) unsigned nerrors = 0; /* Errors from nested flushes */ unsigned i; /* Index variable */ unsigned int H5AC1_flags; /* translated flags for H5AC1_flush() */ - unsigned int H5AC2_flags; /* translated flags for H5AC2_flush() */ + unsigned int H5AC_flags; /* translated flags for H5AC_flush() */ herr_t ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT(H5F_flush) @@ -1768,12 +1768,12 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags) if((flags & H5F_FLUSH_INVALIDATE) != 0 ) H5AC1_flags |= H5AC1__FLUSH_INVALIDATE_FLAG; if(H5AC1_flush(f, dxpl_id, H5AC1_flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache") - H5AC2_flags = 0; + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache1") + H5AC_flags = 0; if((flags & H5F_FLUSH_INVALIDATE) != 0 ) - H5AC2_flags |= H5AC2__FLUSH_INVALIDATE_FLAG; - if(H5AC2_flush(f, dxpl_id, H5AC2_flags) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache2") + H5AC_flags |= H5AC__FLUSH_INVALIDATE_FLAG; + if(H5AC_flush(f, dxpl_id, H5AC_flags) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush metadata cache") /* * If we are invalidating everything (which only happens just before @@ -2007,7 +2007,7 @@ H5F_try_close(H5F_t *f) */ if(f->intent&H5F_ACC_RDWR) { /* Flush and destroy all caches */ - if(H5F_flush(f, H5AC2_dxpl_id, H5F_SCOPE_LOCAL, H5F_FLUSH_NONE) < 0) + if(H5F_flush(f, H5AC_dxpl_id, H5F_SCOPE_LOCAL, H5F_FLUSH_NONE) < 0) HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush cache") } /* end if */ @@ -2016,7 +2016,7 @@ H5F_try_close(H5F_t *f) * shared H5F_file_t struct. If the reference count for the H5F_file_t * struct reaches zero then destroy it also. */ - if(H5F_dest(f, H5AC2_dxpl_id) < 0) + if(H5F_dest(f, H5AC_dxpl_id) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problems closing file") done: @@ -2125,7 +2125,7 @@ H5Freopen(hid_t file_id) done: if(ret_value < 0 && new_file) - if(H5F_dest(new_file, H5AC2_dxpl_id) < 0) + if(H5F_dest(new_file, H5AC_dxpl_id) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") FUNC_LEAVE_API(ret_value) @@ -3393,22 +3393,22 @@ done: * * Changes: John Mainzer * 8/4/08 - * Reworked function to use the new H5AC2_jnl_config_t - * structure and H5AC2_get_jnl_config(). + * Reworked function to use the new H5AC_jnl_config_t + * structure and H5AC_get_jnl_config(). * *------------------------------------------------------------------------- */ htri_t H5F_is_journaling_enabled(const H5F_t *f) { - H5AC2_jnl_config_t config; /* Current journaling configuration */ + H5AC_jnl_config_t config; /* Current journaling configuration */ htri_t ret_value; /* Return value */ FUNC_ENTER_NOAPI(H5F_is_journaling_enabled, FAIL) /* Retrieve the current cache information */ - config.version = H5AC2__CURR_JNL_CONFIG_VER; - if(H5AC2_get_jnl_config(f->shared->cache2, &config) < 0) + config.version = H5AC__CURR_JNL_CONFIG_VER; + if(H5AC_get_jnl_config(f->shared->cache, &config) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve journaling configuration") /* Set return value */ @@ -3438,7 +3438,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Fget_jnl_config(hid_t file_id, H5AC2_jnl_config_t *config_ptr) +H5Fget_jnl_config(hid_t file_id, H5AC_jnl_config_t *config_ptr) { H5F_t *file; /* File object for file ID */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3449,12 +3449,12 @@ H5Fget_jnl_config(hid_t file_id, H5AC2_jnl_config_t *config_ptr) /* Check args */ if(NULL == (file = H5I_object_verify(file_id, H5I_FILE)) ) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") - if((NULL == config_ptr) || (!H5AC2_validate_jnl_config_ver(config_ptr->version))) + if((NULL == config_ptr) || (!H5AC_validate_jnl_config_ver(config_ptr->version))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config_ptr") /* Go get the journaling configuration */ - if(H5AC2_get_jnl_config(file->shared->cache2, config_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC2_get_jnl_config() failed.") + if(H5AC_get_jnl_config(file->shared->cache, config_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_jnl_config() failed.") done: FUNC_LEAVE_API(ret_value) @@ -3465,7 +3465,7 @@ done: * Function: H5Fset_jnl_config * * Purpose: Sets the current journaling configuration, using the - * contents of the instance of H5AC2_jnl_config_t pointed + * contents of the instance of H5AC_jnl_config_t pointed * to by config_ptr. * * Return: Success: SUCCEED @@ -3477,7 +3477,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Fset_jnl_config(hid_t file_id, const H5AC2_jnl_config_t *config_ptr) +H5Fset_jnl_config(hid_t file_id, const H5AC_jnl_config_t *config_ptr) { H5F_t *file; /* File object for file ID */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3490,8 +3490,8 @@ H5Fset_jnl_config(hid_t file_id, const H5AC2_jnl_config_t *config_ptr) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") /* Set the resize configuration */ - if(H5AC2_set_jnl_config(file, H5P_DATASET_XFER_DEFAULT, config_ptr, FALSE) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC2_set_jnl_config() failed.") + if(H5AC_set_jnl_config(file, H5P_DATASET_XFER_DEFAULT, config_ptr, FALSE) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC_set_jnl_config() failed.") done: FUNC_LEAVE_API(ret_value) @@ -3528,12 +3528,12 @@ H5Fget_mdc_config(hid_t file_id, H5AC1_cache_config_t *config_ptr) /* Check args */ if(NULL == (file = H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") - if((NULL == config_ptr) || !H5AC2_validate_cache_config_ver(config_ptr->version)) + if((NULL == config_ptr) || !H5AC_validate_cache_config_ver(config_ptr->version)) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config_ptr") /* Go get the resize configuration */ - if(H5AC2_get_cache_auto_resize_config(file->shared->cache2, (H5AC2_cache_config_t *)config_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC2_get_cache_auto_resize_config() failed.") + if(H5AC_get_cache_auto_resize_config(file->shared->cache, (H5AC_cache_config_t *)config_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_auto_resize_config() failed.") done: FUNC_LEAVE_API(ret_value) @@ -3569,12 +3569,12 @@ H5Fset_mdc_config(hid_t file_id, H5AC1_cache_config_t *config_ptr) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") /* set the resize configuration */ - if(H5AC1_set_cache_auto_resize_config(file->shared->cache, config_ptr) < 0) + if(H5AC1_set_cache_auto_resize_config(file->shared->cache1, config_ptr) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC1_set_cache_auto_resize_config() failed.") /* pass the resize configuration to the modified cache as well. */ - if(H5AC2_set_cache_auto_resize_config(file->shared->cache2, (H5AC2_cache_config_t *)config_ptr) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC2_set_cache_auto_resize_config() failed.") + if(H5AC_set_cache_auto_resize_config(file->shared->cache, (H5AC_cache_config_t *)config_ptr) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "H5AC_set_cache_auto_resize_config() failed.") done: FUNC_LEAVE_API(ret_value) @@ -3613,8 +3613,8 @@ H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL hit rate pointer") /* Go get the current hit rate */ - if(H5AC2_get_cache_hit_rate(file->shared->cache2, hit_rate_ptr) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC2_get_cache_hit_rate() failed.") + if(H5AC_get_cache_hit_rate(file->shared->cache, hit_rate_ptr) < 0) + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_hit_rate() failed.") done: FUNC_LEAVE_API(ret_value) @@ -3655,9 +3655,9 @@ H5Fget_mdc_size(hid_t file_id, size_t *max_size_ptr, size_t *min_clean_size_ptr, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") /* Go get the size data */ - if(H5AC2_get_cache_size(file->shared->cache2, max_size_ptr, + if(H5AC_get_cache_size(file->shared->cache, max_size_ptr, min_clean_size_ptr, cur_size_ptr, &cur_num_entries) < 0) - HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC2_get_cache_size() failed.") + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "H5AC_get_cache_size() failed.") if(cur_num_entries_ptr != NULL) *cur_num_entries_ptr = (int)cur_num_entries; @@ -3701,7 +3701,7 @@ H5Freset_mdc_hit_rate_stats(hid_t file_id) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") /* Reset the hit rate statistic */ - if(H5AC2_reset_cache_hit_rate_stats(file->shared->cache2) < 0) + if(H5AC_reset_cache_hit_rate_stats(file->shared->cache) < 0) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "can't reset cache hit rate") done: @@ -3821,12 +3821,12 @@ H5Fget_info(hid_t obj_id, H5F_info_t *finfo) /* Check for superblock extension info */ if(H5F_addr_defined(f->shared->extension_addr)) - if(H5F_super_ext_size(f, H5AC2_ind_dxpl_id, &finfo->super_ext_size) < 0) + if(H5F_super_ext_size(f, H5AC_ind_dxpl_id, &finfo->super_ext_size) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock extension size") /* Check for SOHM info */ if(H5F_addr_defined(f->shared->sohm_addr)) - if(H5SM_ih_size(f, H5AC2_ind_dxpl_id, finfo) < 0) + if(H5SM_ih_size(f, H5AC_ind_dxpl_id, finfo) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve SOHM btree & heap storage info") done: |