diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-07-05 22:12:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-07-05 22:12:05 (GMT) |
commit | 97f51bfde14d16893b9556216e643a34f751b5f1 (patch) | |
tree | bd66d865cd68aed4565403c843f3d6d187f90104 /src/H5F.c | |
parent | c7cb8e6adc4c980d7e3e83fa06d0ea95a23fb00b (diff) | |
download | hdf5-97f51bfde14d16893b9556216e643a34f751b5f1.zip hdf5-97f51bfde14d16893b9556216e643a34f751b5f1.tar.gz hdf5-97f51bfde14d16893b9556216e643a34f751b5f1.tar.bz2 |
[svn-r15321] Description:
Disable dataset caching when journaling is enabled.
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.5.2 (amazon) in debug mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -3283,6 +3283,41 @@ done: /*------------------------------------------------------------------------- + * Function: H5F_is_journaling enabled + * + * Purpose: Checks if metadata cache journaling is enabled currently for + * a file. + * + * Return: Success: TRUE/FALSE + * Failure: FAIL + * + * Programmer: Quincey Koziol + * 7/3/08 + * + *------------------------------------------------------------------------- + */ +htri_t +H5F_is_journaling_enabled(const H5F_t *f) +{ + H5AC2_cache_config_t mdc_config; /* Current cache configuration */ + htri_t ret_value; /* Return value */ + + FUNC_ENTER_NOAPI(H5F_is_journaling_enabled, FAIL) + + /* Retrieve the current cache information */ + mdc_config.version = H5AC2__CURR_CACHE_CONFIG_VERSION; + if(H5AC2_get_cache_auto_resize_config(f->shared->cache2, &mdc_config) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache configuration") + + /* Set return value */ + ret_value = mdc_config.enable_journaling; + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* H5F_is_journaling_enabled() */ + + +/*------------------------------------------------------------------------- * Function: H5Fget_mdc_config * * Purpose: Retrieves the current automatic cache resize configuration @@ -3705,3 +3740,4 @@ H5Fget_info(hid_t obj_id, H5F_info_t *finfo) done: FUNC_LEAVE_API(ret_value) } /* end H5Fget_info() */ + |