summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5AC2.c439
-rw-r--r--src/H5AC2private.h29
-rw-r--r--src/H5AC2public.h146
-rw-r--r--src/H5ACprivate.h12
-rw-r--r--src/H5ACpublic.h19
-rw-r--r--src/H5C2.c2
-rw-r--r--src/H5C2journal.c52
-rw-r--r--src/H5C2pkg.h2
-rw-r--r--src/H5C2private.h1
-rw-r--r--src/H5F.c152
-rw-r--r--src/H5Fpkg.h5
-rw-r--r--src/H5Fprivate.h1
-rw-r--r--src/H5Fpublic.h5
-rw-r--r--src/H5Pfapl.c136
-rw-r--r--src/H5Ppublic.h5
-rw-r--r--test/cache2_api.c477
-rw-r--r--test/cache2_journal.c263
-rw-r--r--test/cache_api.c441
-rw-r--r--testpar/t_cache2.c40
-rw-r--r--tools/h5recover/h5recover.c8
20 files changed, 957 insertions, 1278 deletions
diff --git a/src/H5AC2.c b/src/H5AC2.c
index 78d96e2..7dc93b4 100644
--- a/src/H5AC2.c
+++ b/src/H5AC2.c
@@ -200,12 +200,8 @@ static herr_t H5AC2_log_renamed_entry(H5F_t * f,
haddr_t new_addr);
#endif /* H5_HAVE_PARALLEL */
-static herr_t H5AC2_set_non_journaling_cache_config(H5F_t * f,
- hid_t dxpl_id,
- H5AC2_cache_config_t *config_ptr);
-
-static herr_t H5AC2_validate_journaling_config(
- H5AC2_cache_config_t * config_ptr);
+static herr_t H5AC2_set_cache_config(H5F_t * f,
+ H5AC2_cache_config_t *config_ptr);
/*-------------------------------------------------------------------------
@@ -522,7 +518,6 @@ static const char * H5AC2_entry_type_names[H5AC2_NTYPES] =
herr_t
H5AC2_create(H5F_t * f,
- hid_t dxpl_id,
H5AC2_cache_config_t *config_ptr)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -707,9 +702,7 @@ H5AC2_create(H5F_t * f,
}
#endif /* H5_HAVE_PARALLEL */
- result = H5AC2_set_non_journaling_cache_config(f,
- dxpl_id,
- config_ptr);
+ result = H5AC2_set_cache_config(f, config_ptr);
if ( result != SUCCEED ) {
@@ -2945,6 +2938,11 @@ done:
* JRM -- 4/12/08
* Added support for the new journaling control fields.
*
+ * JRM - 8/1/08
+ * Removed support for the new journaling control fields.
+ * This functionality is now handled through the
+ * H5AC2_jnl_config_t structure and the related calls.
+ *
*-------------------------------------------------------------------------
*/
@@ -3051,8 +3049,68 @@ H5AC2_get_cache_auto_resize_config(H5AC2_t * cache_ptr,
}
#endif /* H5_HAVE_PARALLEL */
+done:
+
+ FUNC_LEAVE_NOAPI(ret_value)
+
+} /* H5AC2_get_cache_auto_resize_config() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5AC2_get_jnl_config
+ *
+ * Purpose: Get the current journaling configuration and load it into
+ * the supplied instance of H5AC2_jnl_config_t.
+ *
+ * For the moment, the only journaling we do is metadata
+ * journaling, so in effect this function is a wrapper
+ * function for H5C2_get_journal_config().
+ *
+ * Return: SUCCEED on success, and FAIL on failure.
+ *
+ * Programmer: John Mainzer
+ * 7/31/08
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5AC2_get_jnl_config(H5AC2_t * cache_ptr,
+ H5AC2_jnl_config_t * config_ptr)
+{
+ herr_t result;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5AC2_get_jnl_config, FAIL)
+
+ if ( ( cache_ptr == NULL )
+ ||
+#ifdef H5_HAVE_PARALLEL
+ ( ( cache_ptr->aux_ptr != NULL )
+ &&
+ ( ((H5AC2_aux_t *)(cache_ptr->aux_ptr))->magic
+ !=
+ H5AC2__H5AC2_AUX_T_MAGIC
+ )
+ )
+ ||
+#endif /* H5_HAVE_PARALLEL */
+ ( config_ptr == NULL )
+ ||
+ ( config_ptr->version != H5AC2__CURR_CACHE_CONFIG_VERSION )
+ )
+ {
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
+ "Bad cache_ptr or config_ptr on entry.")
+
+ }
+
/* get the current journal configuration. Start by setting defaults,
- * which may be changed shortly.
+ * which will typically be changed shortly.
*/
config_ptr->enable_journaling = FALSE;
@@ -3065,7 +3123,6 @@ H5AC2_get_cache_auto_resize_config(H5AC2_t * cache_ptr,
result = H5C2_get_journal_config(cache_ptr,
&(config_ptr->enable_journaling),
- NULL,
&(config_ptr->journal_file_path[0]),
&(config_ptr->jbrb_buf_size),
&(config_ptr->jbrb_num_bufs),
@@ -3082,7 +3139,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC2_get_cache_auto_resize_config() */
+} /* H5AC2_get_jnl_config() */
/*-------------------------------------------------------------------------
@@ -3264,12 +3321,15 @@ done:
* Added code to allow control of metadata journaling.
* This required the addition of the dxpl_id parameter.
*
+ * John Mainzer -- 8/1/08
+ * Pulled journaling configuration back out of the
+ * function, and teh dxpl_id parameter with it.
+ *
*-------------------------------------------------------------------------
*/
herr_t
H5AC2_set_cache_auto_resize_config(H5F_t * f,
- hid_t dxpl_id,
H5AC2_cache_config_t *config_ptr)
{
/* const char * fcn_name = "H5AC2_set_cache_auto_resize_config"; */
@@ -3325,21 +3385,12 @@ H5AC2_set_cache_auto_resize_config(H5F_t * f,
}
- result = H5AC2_set_non_journaling_cache_config(f, dxpl_id, config_ptr);
+ result = H5AC2_set_cache_config(f, config_ptr);
if ( result < 0 ) {
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC2_set_non_journaling_cache_config() failed.")
- }
-
-
- result = H5AC2_set_cache_journaling_config(f, dxpl_id, config_ptr, FALSE);
-
- if ( result < 0 ) {
-
- HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
- "H5AC2_set_cache_journaling_config() failed.")
+ "H5AC2_set_cache_config() failed.")
}
done:
@@ -3354,7 +3405,7 @@ done:
( trace_file_ptr != NULL ) ) {
HDfprintf(trace_file_ptr,
- "%s %d %d %d %d \"%s\" %d %d %d %f %d %d %ld %d %f %f %d %d %d %f %f %d %f %f %d %d %d %d %f %d %d \"%s\" %d %d %d %d %d %d\n",
+ "%s %d %d %d %d \"%s\" %d %d %d %f %d %d %ld %d %f %f %d %d %d %f %f %d %f %f %d %d %d %d %f %d %d\n",
"H5AC2_set_cache_auto_resize_config",
trace_config.version,
(int)(trace_config.rpt_fcn_enabled),
@@ -3385,13 +3436,6 @@ done:
(int)(trace_config.apply_empty_reserve),
trace_config.empty_reserve,
trace_config.dirty_bytes_threshold,
- (int)(config_ptr->enable_journaling),
- config_ptr->journal_file_path,
- (int)(config_ptr->journal_recovered),
- (int)(config_ptr->jbrb_buf_size),
- config_ptr->jbrb_num_bufs,
- (int)(config_ptr->jbrb_use_aio),
- (int)(config_ptr->jbrb_human_readable),
(int)ret_value);
}
#endif /* H5AC2__TRACE_FILE_ENABLED */
@@ -3402,20 +3446,18 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5AC2_set_cache_journaling_config
+ * Function: H5AC2_set_jnl_config
*
- * Purpose: Handle changes in journaling configuration.
+ * Purpose: Manage changes in journaling configuration.
*
- * This code used to reside in
- * H5AC2_set_cache_auto_resize_config(), but it has been
- * split out, as on startup, we need to be able to run
- * it separately from the rest of the cache configuration
- * code.
+ * At present, metadata journaling is the only journaling we
+ * do, so this function can be thought of as a wrapper for
+ * H5C2_begin_journaling() and H5C2_end_journaling().
*
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
- * 7/6/08
+ * 7/31/08
*
* Modifications:
*
@@ -3425,26 +3467,21 @@ done:
*/
herr_t
-H5AC2_set_cache_journaling_config(H5F_t * f,
- hid_t dxpl_id,
- H5AC2_cache_config_t *config_ptr,
-#if H5AC2__TRACE_FILE_ENABLED
- hbool_t show_trace)
-#else /* H5AC2__TRACE_FILE_ENABLED */
- hbool_t UNUSED show_trace)
-#endif /* H5AC2__TRACE_FILE_ENABLED */
+H5AC2_set_jnl_config(H5F_t * f,
+ hid_t dxpl_id,
+ H5AC2_jnl_config_t *config_ptr)
{
- /* const char * fcn_name = "H5AC2_set_cache_journaling_config"; */
+ /* const char * fcn_name = "H5AC2_set_jnl_config"; */
H5AC2_t * cache_ptr;
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
hbool_t mdj_enabled = FALSE;
#if H5AC2__TRACE_FILE_ENABLED
- H5AC2_cache_config_t trace_config = H5AC2__DEFAULT_CACHE_CONFIG;
+ H5AC2_jnl_config_t trace_config = H5AC2__DEFAULT_JNL_CONFIG;
FILE * trace_file_ptr = NULL;
#endif /* H5AC2__TRACE_FILE_ENABLED */
- FUNC_ENTER_NOAPI(H5AC2_set_cache_journaling_config, FAIL)
+ FUNC_ENTER_NOAPI(H5AC2_set_jnl_config, FAIL)
HDassert( f );
HDassert( f->shared );
@@ -3455,11 +3492,7 @@ H5AC2_set_cache_journaling_config(H5F_t * f,
#if H5AC2__TRACE_FILE_ENABLED
/* Make note of the new configuration.
*/
- if ( ( show_trace ) && ( config_ptr != NULL ) ) {
-
- trace_config = *config_ptr;
-
- }
+ trace_config = *config_ptr;
#endif /* H5AC2__TRACE_FILE_ENABLED */
if ( ( cache_ptr == NULL )
@@ -3479,7 +3512,7 @@ H5AC2_set_cache_journaling_config(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "bad cache_ptr on entry.")
}
- result = H5AC2_validate_journaling_config(config_ptr);
+ result = H5AC2_validate_jnl_config(config_ptr);
if ( result != SUCCEED ) {
@@ -3488,7 +3521,7 @@ H5AC2_set_cache_journaling_config(H5F_t * f,
}
result = H5C2_get_journal_config((H5C2_t *)cache_ptr, &mdj_enabled,
- NULL, NULL, NULL, NULL, NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
if ( result < 0 ) {
@@ -3534,14 +3567,13 @@ done:
* of the config that pretain to journaling are necessary in
* the trace file. Write the return value to catch occult errors.
*/
- if ( ( show_trace ) &&
- ( cache_ptr != NULL ) &&
+ if ( ( cache_ptr != NULL ) &&
( H5C2_get_trace_file_ptr(cache_ptr, &trace_file_ptr) >= 0 ) &&
( trace_file_ptr != NULL ) ) {
HDfprintf(trace_file_ptr,
"%s %d %d \"%s\" %d %d %d %d %d %d\n",
- "H5AC2_set_cache_journaling_config",
+ "H5AC2_set_jnl_config",
trace_config.version,
(int)(config_ptr->enable_journaling),
config_ptr->journal_file_path,
@@ -3556,17 +3588,14 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC2_set_cache_journaling_config() */
+} /* H5AC2_set_jnl_config() */
/*-------------------------------------------------------------------------
- * Function: H5AC2_set_non_journaling_cache_config
- *
- * Purpose: Handle all non-journaling related configuration switches
- * in an instance of H5AC2_cache_config_t.
+ * Function: H5AC2_set_cache_config
*
- * This function is needed, as journaling cannot be set
- * at cache creation time.
+ * Purpose: Handle all configuration switches in an instance of
+ * H5AC2_cache_config_t.
*
* Return: SUCCEED on success, and FAIL on failure.
*
@@ -3581,17 +3610,16 @@ done:
*/
herr_t
-H5AC2_set_non_journaling_cache_config(H5F_t * f,
- hid_t UNUSED dxpl_id,
- H5AC2_cache_config_t *config_ptr)
+H5AC2_set_cache_config(H5F_t * f,
+ H5AC2_cache_config_t *config_ptr)
{
- /* const char * fcn_name = "H5AC2_set_non_journaling_cache_config"; */
+ /* const char * fcn_name = "H5AC2_set_cache_config"; */
H5AC2_t * cache_ptr;
herr_t result;
herr_t ret_value = SUCCEED; /* Return value */
H5C2_auto_size_ctl_t internal_config;
- FUNC_ENTER_NOAPI(H5AC2_set_non_journaling_cache_config, FAIL)
+ FUNC_ENTER_NOAPI(H5AC2_set_cache_config, FAIL)
HDassert( f );
HDassert( f->shared );
@@ -3715,7 +3743,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC2_set_non_journaling_cache_config() */
+} /* H5AC2_set_cache_config() */
/*-------------------------------------------------------------------------
@@ -3757,6 +3785,10 @@ done:
* to permit journaling.
* JRM - 10/18/07
*
+ * Pulled journaling related code out of this function.
+ *
+ * JRM - 8/1/08
+ *
*-------------------------------------------------------------------------
*/
@@ -3856,26 +3888,150 @@ H5AC2_validate_config(H5AC2_cache_config_t * config_ptr)
"H5AC2_ext_config_2_int_config() failed.")
}
- result = H5AC2_validate_journaling_config(config_ptr);
+ result = H5C2_validate_resize_config(&internal_config,
+ H5C2_RESIZE_CFG__VALIDATE_ALL);
if ( result != SUCCEED ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error(s) in new config.")
}
- result = H5C2_validate_resize_config(&internal_config,
- H5C2_RESIZE_CFG__VALIDATE_ALL);
+done:
- if ( result != SUCCEED ) {
+ FUNC_LEAVE_NOAPI(ret_value)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "error(s) in new config.")
+} /* H5AC2_validate_config() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5AC2_validate_jnl_config()
+ *
+ * Purpose: Run a sanity check on the contents of the supplied
+ * instance of H5AC2_jnl_config_t.
+ *
+ * Do nothing and return SUCCEED if no errors are detected,
+ * and flag an error and return FAIL otherwise.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: John Mainzer
+ * 7/31/08
+ *
+ * Modifications:
+ *
+ * - None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5AC2_validate_jnl_config(H5AC2_jnl_config_t * config_ptr)
+
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+ int name_len;
+
+ FUNC_ENTER_NOAPI(H5AC2_validate_jnl_config, FAIL)
+
+ if ( config_ptr == NULL ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config_ptr on entry.")
+ }
+
+ if ( config_ptr->version != H5AC2__CURR_JNL_CONFIG_VER ) {
+
+#if 0 /* JRM */
+ HDfprintf(stdout, "version = %d(%d).\n", config_ptr->version,
+ H5AC2__CURR_JNL_CONFIG_VER);
+ HDfprintf(stdout, "enable_journaling = %d.\n",
+ (int)(config_ptr->enable_journaling));
+ HDfprintf(stdout, "journal_recovered = %d\n",
+ (int)(config_ptr->journal_recovered));
+ HDfprintf(stdout, "jbrb_buf_size = %ld\n",
+ (long)(config_ptr->jbrb_buf_size));
+ HDfprintf(stdout, "jbrb_num_bufs = %d\n", config_ptr->jbrb_num_bufs);
+ HDfprintf(stdout, "jbrb_use_aio = %d\n", (int)(config_ptr->jbrb_use_aio));
+ HDfprintf(stdout, "jbrb_human_readable = %d\n",
+ (int)(config_ptr->jbrb_human_readable));
+#endif /* JRM */
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown config version.")
+ }
+
+ if ( ( config_ptr->enable_journaling != TRUE ) &&
+ ( config_ptr->enable_journaling != FALSE ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->enable_journaling must be either TRUE or FALSE.")
+ }
+
+ if ( ( config_ptr->journal_recovered != TRUE ) &&
+ ( config_ptr->journal_recovered != FALSE ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->journal_recovered must be either TRUE or FALSE.")
+ }
+
+ if ( ( config_ptr->enable_journaling ) &&
+ ( config_ptr->journal_recovered ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "enable_journaling and journal_recovered can't both be TRUE.")
+ }
+
+ /* don't test journal_file_path unless enable_journaling is TRUE */
+ if ( config_ptr->enable_journaling ) {
+
+ /* Can't really test the journal_file_path field without trying to
+ * open the file, so we will content ourselves with a couple of
+ * sanity checks on the length of the file name.
+ */
+ name_len = HDstrlen(config_ptr->journal_file_path);
+
+ if ( name_len <= 0 ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->journal_file_path is empty.")
+
+ } else if ( name_len > H5AC2__MAX_JOURNAL_FILE_NAME_LEN ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->journal_file_path too long.")
+ }
+ }
+
+ if ( ( config_ptr->jbrb_buf_size < H5AC2__MIN_JBRB_BUF_SIZE ) ||
+ ( config_ptr->jbrb_buf_size > H5AC2__MAX_JBRB_BUF_SIZE ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->jbrb_buf_size out of range.")
+ }
+
+ if ( ( config_ptr->jbrb_num_bufs < H5AC2__MIN_JBRB_NUM_BUFS ) ||
+ ( config_ptr->jbrb_num_bufs > H5AC2__MAX_JBRB_NUM_BUFS ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->jbrb_num_bufs out of range.")
+ }
+
+ if ( ( config_ptr->jbrb_use_aio != FALSE ) &&
+ ( config_ptr->jbrb_use_aio != TRUE ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->jbrb_use_aio must be either TRUE or FALSE.")
+ }
+
+ if ( ( config_ptr->jbrb_human_readable != FALSE ) &&
+ ( config_ptr->jbrb_human_readable != TRUE ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "config_ptr->jbrb_human_readable must be either TRUE or FALSE.")
}
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC2_validate_config() */
+} /* H5AC2_validate_jnl_config() */
/*-------------------------------------------------------------------------
@@ -5473,124 +5629,3 @@ done:
#endif /* H5_HAVE_PARALLEL */
-
-/*-------------------------------------------------------------------------
- * Function: H5AC2_validate_journaling_config()
- *
- * Purpose: Run a sanity check on the contents of the journaling
- * related fields of the supplied instance of
- * H5AC2_cache_config_t.
- *
- * Do nothing and return SUCCEED if no errors are detected,
- * and flag an error and return FAIL otherwise.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 7/6/08
- *
- * Modifications:
- *
- * - None.
- *
- *-------------------------------------------------------------------------
- */
-
-herr_t
-H5AC2_validate_journaling_config(H5AC2_cache_config_t * config_ptr)
-
-{
- herr_t ret_value = SUCCEED; /* Return value */
- int name_len;
-
- FUNC_ENTER_NOAPI(H5AC2_validate_journaling_config, FAIL)
-
- if ( config_ptr == NULL ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config_ptr on entry.")
- }
-
- if ( config_ptr->version != H5AC2__CURR_CACHE_CONFIG_VERSION ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown config version.")
- }
-
- if ( ( config_ptr->enable_journaling != TRUE ) &&
- ( config_ptr->enable_journaling != FALSE ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->enable_journaling must be either TRUE or FALSE.")
- }
-
- if ( ( config_ptr->journal_recovered != TRUE ) &&
- ( config_ptr->journal_recovered != FALSE ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->journal_recovered must be either TRUE or FALSE.")
- }
-
- if ( ( config_ptr->enable_journaling ) &&
- ( config_ptr->journal_recovered ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->journal_recovered must be either TRUE or FALSE.")
- }
-
- /* don't bother to test journal_file_path unless enable_journaling is TRUE */
- if ( config_ptr->enable_journaling ) {
-
- /* Can't really test the journal_file_path field without trying to
- * open the file, so we will content ourselves with a couple of
- * sanity checks on the length of the file name.
- */
- name_len = HDstrlen(config_ptr->journal_file_path);
-
- if ( name_len <= 0 ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->journal_file_path is empty.")
-
- } else if ( name_len > H5AC2__MAX_JOURNAL_FILE_NAME_LEN ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->journal_file_path too long.")
- }
- }
-
- if ( ( config_ptr->jbrb_buf_size < H5AC2__MIN_JBRB_BUF_SIZE ) ||
- ( config_ptr->jbrb_buf_size > H5AC2__MAX_JBRB_BUF_SIZE ) ) {
-#if 1 /* JRM */
- HDfprintf(stdout, "config_ptr->jbrb_buf_size = %d.\n",
- (int)(config_ptr->jbrb_buf_size));
-#endif /* JRM */
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->jbrb_buf_size out of range.")
- }
-
- if ( ( config_ptr->jbrb_num_bufs < H5AC2__MIN_JBRB_NUM_BUFS ) ||
- ( config_ptr->jbrb_num_bufs > H5AC2__MAX_JBRB_NUM_BUFS ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->jbrb_num_bufs out of range.")
- }
-
- if ( ( config_ptr->jbrb_use_aio != FALSE ) &&
- ( config_ptr->jbrb_use_aio != TRUE ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->jbrb_use_aio must be either TRUE or FALSE.")
- }
-
- if ( ( config_ptr->jbrb_human_readable != FALSE ) &&
- ( config_ptr->jbrb_human_readable != TRUE ) ) {
-
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
- "config_ptr->jbrb_human_readable must be either TRUE or FALSE.")
- }
-
-done:
-
- FUNC_LEAVE_NOAPI(ret_value)
-
-} /* H5AC2_validate_journaling_config() */
-
diff --git a/src/H5AC2private.h b/src/H5AC2private.h
index a6f9d45..9137993 100644
--- a/src/H5AC2private.h
+++ b/src/H5AC2private.h
@@ -195,7 +195,8 @@ extern hid_t H5AC2_ind_dxpl_id;
#define H5AC2__DEFAULT_CACHE_CONFIG \
{ \
- /* int version = */ H5C2__CURR_AUTO_SIZE_CTL_VER, \
+ /* int version = */ \
+ H5AC2__CURR_CACHE_CONFIG_VERSION, \
/* hbool_t rpt_fcn_enabled = */ FALSE, \
/* hbool_t open_trace_file = */ FALSE, \
/* hbool_t close_trace_file = */ FALSE, \
@@ -225,7 +226,15 @@ extern hid_t H5AC2_ind_dxpl_id;
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
/* double empty_reserve = */ 0.1, \
- /* int dirty_bytes_threshold = */ (256 * 1024), \
+ /* int dirty_bytes_threshold = */ (256 * 1024) \
+}
+
+
+/* Default journal configuration. */
+
+#define H5AC2__DEFAULT_JNL_CONFIG \
+{ \
+ /* int version = */ H5AC2__CURR_JNL_CONFIG_VER, \
/* hbool_t enable_journaling = */ FALSE, \
/* char journal_file_path[] = */ "", \
/* hbool_t journal_recovered = */ FALSE, \
@@ -279,7 +288,6 @@ H5_DLL herr_t H5AC2_check_for_journaling(H5F_t * f,
H5C2_t * cache_ptr,
hbool_t journal_recovered);
H5_DLL herr_t H5AC2_create(H5F_t *f,
- hid_t dxpl_id,
H5AC2_cache_config_t *config_ptr);
H5_DLL herr_t H5AC2_begin_transaction(hid_t id,
hbool_t * do_transaction_ptr,
@@ -338,19 +346,22 @@ H5_DLL herr_t H5AC2_get_cache_size(H5AC2_t * cache_ptr,
H5_DLL herr_t H5AC2_get_cache_hit_rate(H5AC2_t * cache_ptr,
double * hit_rate_ptr);
+H5_DLL herr_t H5AC2_get_jnl_config(H5AC2_t * cache_ptr,
+ H5AC2_jnl_config_t * config_ptr);
+
H5_DLL herr_t H5AC2_reset_cache_hit_rate_stats(H5AC2_t * cache_ptr);
H5_DLL herr_t H5AC2_set_cache_auto_resize_config(H5F_t * f,
- hid_t dxpl_id,
- H5AC2_cache_config_t *config_ptr);
+ H5AC2_cache_config_t *config_ptr);
-H5_DLL herr_t H5AC2_set_cache_journaling_config(H5F_t * f,
- hid_t dxpl_id,
- H5AC2_cache_config_t *config_ptr,
- hbool_t show_trace);
+H5_DLL herr_t H5AC2_set_jnl_config(H5F_t * f,
+ hid_t dxpl_id,
+ H5AC2_jnl_config_t *config_ptr);
H5_DLL herr_t H5AC2_validate_config(H5AC2_cache_config_t * config_ptr);
+H5_DLL herr_t H5AC2_validate_jnl_config(H5AC2_jnl_config_t * config_ptr);
+
H5_DLL herr_t H5AC2_close_trace_file(H5AC2_t * cache_ptr);
H5_DLL herr_t H5AC2_open_trace_file(H5AC2_t * cache_ptr,
diff --git a/src/H5AC2public.h b/src/H5AC2public.h
index 57c65b9..e13d76e 100644
--- a/src/H5AC2public.h
+++ b/src/H5AC2public.h
@@ -36,9 +36,6 @@
extern "C" {
#endif
-#define H5AC2__MAX_TRACE_FILE_NAME_LEN 1024
-#define H5AC2__MAX_JOURNAL_FILE_NAME_LEN 1024
-
/****************************************************************************
*
* structure H5AC2_cache_config_t
@@ -381,61 +378,10 @@ extern "C" {
* file. This field is ignored unless HDF5 has been compiled for
* parallel.
*
- *
- * Journal Configuration Fields:
- *
- * The journaling fields allow enabling of metadata journaling, specification
- * of the journal file, and marking a file as recovered.
- *
- * Note that the fields with the "jbrb_" prefix are used to configure the
- * journal buffer ring buffer -- a ring buffer of buffers used to buffer
- * output of journal messages.
- *
- * At least to begin with, these fields may only be used at file open/create
- * time -- i.e. in the FAPL.
- *
- * enable_journaling: Boolean flag that is set to TRUE if journaling is
- * to be enabled, and to FALSE otherwise.
- *
- * When the cache configuration is reported, this field is TRUE iff
- * journaling is enabled.
- *
- * journal_file_path: Full path of the file to be used to store the
- * metadata journal. This field is only defined if enable_journaling
- * is TRUE.
- *
- * At present, the length of the journal file path is restricted to
- * no more than H5AC2__MAX_JOURNAL_FILE_NAME_LEN.
- *
- * journal_recovered: Boolean flag use to indicate that we are opening
- * a journaled file that was not closed correctly, and on which the
- * journal recovery tool has been run.
- *
- * Unless you are the writer of a new journal recovery tool, you
- * should always set this field to FALSE.
- *
- * jbrb_buf_size: size_t containing the size of each individual buffer
- * in the journal buffer ring buffer. This size should be chosen
- * to be some multiple of the block size used by the file system
- * on which the journal file will be written.
- *
- * jbrb_num_bufs: Integer containing the number of buffers in the journal
- * buffer ring buffer. If synchronous I/O is used, one or two buffers
- * is sufficient. If asynchronous I/O is used, the number of buffers
- * should be sufficiently large that a write on buffer is likely to
- * complete before that buffer is needed again.
- *
- * jbrb_use_aio: Boolean flag indicating whether we should use
- * asynchronous I/O for journal entry writes.
- *
- * jbrb_human_readable: Boolean flag which determines whether the journal
- * file will be written in human readable form. In general, this
- * field should be set to false, as the human readable journal
- * file is at least twice a large as the machine readable version.
- *
****************************************************************************/
-#define H5AC2__CURR_CACHE_CONFIG_VERSION 1
+#define H5AC2__CURR_CACHE_CONFIG_VERSION 1
+#define H5AC2__MAX_TRACE_FILE_NAME_LEN 1024
typedef struct H5AC2_cache_config_t
{
@@ -495,18 +441,86 @@ typedef struct H5AC2_cache_config_t
/* parallel configuration fields: */
int dirty_bytes_threshold;
+} H5AC2_cache_config_t;
- /* metadata journaling configuration fields: */
- hbool_t enable_journaling;
- char journal_file_path[
- H5AC2__MAX_JOURNAL_FILE_NAME_LEN];
- hbool_t journal_recovered;
- size_t jbrb_buf_size;
- int jbrb_num_bufs;
- hbool_t jbrb_use_aio;
- hbool_t jbrb_human_readable;
-} H5AC2_cache_config_t;
+/****************************************************************************
+ *
+ * structure H5AC2_jnl_config_t
+ *
+ * H5AC2_jnl_config_t is a public structure intended for use in public APIs.
+ * At least in its initial incarnation, it is intended to package all the
+ * data needed to configure metadata journaling. In the future, we may
+ * use it to package configuration data for other types of journaling as well.
+ *
+ * The fields of the structure are discussed individually below. Note
+ * that the fields with the "jbrb_" prefix are used to configure the
+ * journal buffer ring buffer -- a ring buffer of buffers used to buffer
+ * output of journal messages.
+ *
+ * version: Integer field containing the version number of this version
+ * of the H5AC2_jnl_config_t structure. Any instance of
+ * H5AC2_cache_config_t passed to the cache must have a known
+ * version number, or an error will be flagged.
+ *
+ * enable_journaling: Boolean flag that is set to TRUE if journaling is
+ * to be enabled, and to FALSE otherwise.
+ *
+ * When the cache configuration is reported, this field is TRUE iff
+ * journaling is enabled.
+ *
+ * journal_file_path: Full path of the file to be used to store the
+ * metadata journal. This field is only defined if enable_journaling
+ * is TRUE.
+ *
+ * At present, the length of the journal file path is restricted to
+ * no more than H5AC2__MAX_JOURNAL_FILE_NAME_LEN.
+ *
+ * journal_recovered: Boolean flag use to indicate that we are opening
+ * a journaled file that was not closed correctly, and on which the
+ * journal recovery tool has been run.
+ *
+ * Unless you are the writer of a new journal recovery tool, you
+ * should always set this field to FALSE.
+ *
+ * jbrb_buf_size: size_t containing the size of each individual buffer
+ * in the journal buffer ring buffer. This size should be chosen
+ * to be some multiple of the block size used by the file system
+ * on which the journal file will be written.
+ *
+ * jbrb_num_bufs: Integer containing the number of buffers in the journal
+ * buffer ring buffer. If synchronous I/O is used, one or two buffers
+ * is sufficient. If asynchronous I/O is used, the number of buffers
+ * should be sufficiently large that a write on buffer is likely to
+ * complete before that buffer is needed again.
+ *
+ * jbrb_use_aio: Boolean flag indicating whether we should use
+ * asynchronous I/O for journal entry writes.
+ *
+ * jbrb_human_readable: Boolean flag which determines whether the journal
+ * file will be written in human readable form. In general, this
+ * field should be set to false, as the human readable journal
+ * file is at least twice a large as the machine readable version.
+ *
+ ****************************************************************************/
+
+#define H5AC2__CURR_JNL_CONFIG_VER 1
+#define H5AC2__MAX_JOURNAL_FILE_NAME_LEN 1024
+
+typedef struct H5AC2_jnl_config_t
+{
+ int version;
+
+ /* metadata journaling configuration fields: */
+ hbool_t enable_journaling;
+ char journal_file_path[ H5AC2__MAX_JOURNAL_FILE_NAME_LEN];
+ hbool_t journal_recovered;
+ size_t jbrb_buf_size;
+ int jbrb_num_bufs;
+ hbool_t jbrb_use_aio;
+ hbool_t jbrb_human_readable;
+
+} H5AC2_jnl_config_t;
#ifdef __cplusplus
diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h
index 40ab9ab..bbbcf11 100644
--- a/src/H5ACprivate.h
+++ b/src/H5ACprivate.h
@@ -225,17 +225,7 @@ extern hid_t H5AC_ind_dxpl_id;
/* int epochs_before_eviction = */ 3, \
/* hbool_t apply_empty_reserve = */ TRUE, \
/* double empty_reserve = */ 0.1, \
- /* int dirty_bytes_threshold = */ (256 * 1024), \
- /* The following fields are not used by H5AC or H5C -- they exist here */ \
- /* because they are used by H5AC2 and H5C2, and including them here */ \
- /* us to avoid duplicating the user level cache configuration code. */ \
- /* hbool_t enable_journaling = */ FALSE, \
- /* char journal_file_path[] = */ "", \
- /* hbool_t journal_recovered = */ FALSE, \
- /* size_t jbrb_buf_size = */ (8 * 1024), \
- /* int jbrb_num_bufs = */ 2, \
- /* hbool_t jbrb_use_aio = */ FALSE, \
- /* hbool_t jbrb_human_readable = */ TRUE \
+ /* int dirty_bytes_threshold = */ (256 * 1024) \
}
diff --git a/src/H5ACpublic.h b/src/H5ACpublic.h
index 6539a64..97be6f4 100644
--- a/src/H5ACpublic.h
+++ b/src/H5ACpublic.h
@@ -444,25 +444,6 @@ typedef struct H5AC_cache_config_t
/* parallel configuration fields: */
int dirty_bytes_threshold;
- /* The following fields are not used in H5AC or H5C. They are
- * added because they are used in H5AC2 and H5C2, and putting
- * them here allows us to avoid duplicating the functions involved
- * in metadata cache configuration at the user API level.
- *
- * The old H5AC and H5C code simply ignores them.
- *
- * -- JRM
- */
- /* metadata journaling configuration fields: */
- hbool_t enable_journaling;
- char journal_file_path[
- H5AC__MAX_JOURNAL_FILE_NAME_LEN];
- hbool_t journal_recovered;
- size_t jbrb_buf_size;
- int jbrb_num_bufs;
- hbool_t jbrb_use_aio;
- hbool_t jbrb_human_readable;
-
} H5AC_cache_config_t;
diff --git a/src/H5C2.c b/src/H5C2.c
index 18f08e7..a643fbd 100644
--- a/src/H5C2.c
+++ b/src/H5C2.c
@@ -2282,7 +2282,7 @@ H5C2_get_trace_file_ptr_from_entry(const H5C2_cache_entry_t *entry_ptr,
{
const H5C2_t *cache_ptr; /* Cache pointer, from entry */
- FUNC_ENTER_NOAPI_NOFUNC(H5C2_get_trace_file_ptr)
+ FUNC_ENTER_NOAPI_NOFUNC(H5C2_get_trace_file_ptr_from_entry)
/* Sanity checks */
HDassert( entry_ptr );
diff --git a/src/H5C2journal.c b/src/H5C2journal.c
index 84d9260..4eaab9e 100644
--- a/src/H5C2journal.c
+++ b/src/H5C2journal.c
@@ -522,10 +522,7 @@ done:
*
* Changes:
*
- * John Mainzer -- 4/2/08
- * Modified function to report the pending journaling
- * status if journaling has been enabled, but not yet
- * configured.
+ * None.
*
*-------------------------------------------------------------------------
*/
@@ -533,7 +530,6 @@ done:
herr_t
H5C2_get_journal_config(H5C2_t * cache_ptr,
hbool_t * journaling_enabled_ptr,
- hbool_t * startup_pending_ptr,
char * journal_file_path_ptr,
size_t * jbrb_buf_size_ptr,
int * jbrb_num_bufs_ptr,
@@ -553,16 +549,10 @@ H5C2_get_journal_config(H5C2_t * cache_ptr,
"journaling_enabled_ptr NULL on entry!?!.")
}
-
if ( cache_ptr->mdj_enabled ) {
*journaling_enabled_ptr = TRUE;
- if ( startup_pending_ptr != NULL ) {
-
- *startup_pending_ptr = FALSE;
- }
-
if ( journal_file_path_ptr != NULL ) {
HDsnprintf(journal_file_path_ptr,
@@ -3411,14 +3401,27 @@ H5C2_jb__bin2hex(const uint8_t * buf,
*
* Modifications:
*
+ * John Mainzer -- 8/4/08
+ * Reworked the function to use the new H5AC2_jnl_config_t
+ * structure and the associated utilities.
+ *
+ * I can't but observe that this function really doesn't
+ * belong in this file. Also, it used (and still uses)
+ * API calls -- which really shouldn't happen in the
+ * library.
+ *
+ * We must address these issues eventually, but for now my
+ * objective is simply to avoid breaking Albert's test code.
+ *
*-------------------------------------------------------------------------
*/
herr_t
-H5Pset_journal(hid_t fapl_id, const char *journal_file)
+H5Pset_journal(hid_t fapl_id,
+ const char *journal_file)
{
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* set to SUCCEED for now. */
- H5AC2_cache_config_t mdj_config;
+ H5AC2_jnl_config_t config;
FUNC_ENTER_API(H5Pset_journal, FAIL)
H5TRACE2("e", "i*s", fapl_id, journal_file);
@@ -3432,28 +3435,31 @@ H5Pset_journal(hid_t fapl_id, const char *journal_file)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file name too long")
/* setup cache config struct to enable journaling */
- mdj_config.version = H5AC2__CURR_CACHE_CONFIG_VERSION;
+ config.version = H5AC2__CURR_JNL_CONFIG_VER;
/* get cache config struct information */
- H5Pget_mdc_config(fapl_id, (H5AC_cache_config_t *)&mdj_config);
+ H5Pget_jnl_config(fapl_id, &config);
/* set enable journaling field to true */
- mdj_config.enable_journaling = TRUE; /* turn on journaling */
- mdj_config.jbrb_buf_size = 8*1024; /* multiples of system buffer size*/
- mdj_config.jbrb_num_bufs = 2;
- mdj_config.jbrb_use_aio = FALSE; /* only sync IO is supported */
- mdj_config.jbrb_human_readable = TRUE; /* only readable form is supported */
+ config.enable_journaling = TRUE; /* turn on journaling */
+ config.journal_recovered = FALSE;
+ config.jbrb_buf_size = 8*1024; /* multiples of system buffer size*/
+ config.jbrb_num_bufs = 2;
+ config.jbrb_use_aio = FALSE; /* only sync IO is supported */
+ config.jbrb_human_readable = TRUE; /* only readable form is supported */
/* specify name of journal file */
- HDstrcpy(mdj_config.journal_file_path, journal_file);
+ HDstrcpy(config.journal_file_path, journal_file);
/* set latest format */
if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format'")
/* set cache config struct information */
- ret_value = H5Pset_mdc_config(fapl_id, (H5AC_cache_config_t *)&mdj_config);
+ ret_value = H5Pset_jnl_config(fapl_id, &config);
done:
+
FUNC_LEAVE_API(ret_value)
-}
+
+} /* H5Pset_journal() */
diff --git a/src/H5C2pkg.h b/src/H5C2pkg.h
index 9111165..7646946 100644
--- a/src/H5C2pkg.h
+++ b/src/H5C2pkg.h
@@ -3617,7 +3617,7 @@ if ( ( (cache_ptr) == NULL ) || \
} else if ( (entry_ptr)->last_trans != 0 ) { \
\
HDassert( (cache_ptr)->mdj_enabled ); \
- HDassert( (cache_ptr)->trans_in_progress ); \
+ HDassert( (entry_ptr)->is_dirty ); \
H5C2__DLL_REMOVE((entry_ptr), \
((cache_ptr)->jwipl_head_ptr), \
((cache_ptr)->jwipl_tail_ptr), \
diff --git a/src/H5C2private.h b/src/H5C2private.h
index 276180d..1e4dbb3 100644
--- a/src/H5C2private.h
+++ b/src/H5C2private.h
@@ -1484,7 +1484,6 @@ H5_DLL herr_t H5C2_end_transaction(H5F_t * f,
H5_DLL herr_t H5C2_get_journal_config(H5C2_t * cache_ptr,
hbool_t * journaling_enabled_ptr,
- hbool_t * startup_pending_ptr,
char * journal_file_path_ptr,
size_t * jbrb_buf_size_ptr,
int * jbrb_num_bufs_ptr,
diff --git a/src/H5F.c b/src/H5F.c
index 3d26afe..50391e3 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -309,6 +309,8 @@ H5F_get_access_plist(H5F_t *f)
/* Copy properties of the file access property list */
if(H5P_set(new_plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set initial metadata cache resize config.")
+ if(H5P_set(new_plist, H5F_ACS_JNL_INIT_CONFIG_NAME, &(f->shared->initJnlCfg)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set initial journaling config.")
if(H5P_set(new_plist, H5F_ACS_DATA_CACHE_ELMT_SIZE_NAME, &(f->shared->rdcc_nelmts)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set data cache element size")
if(H5P_set(new_plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0)
@@ -883,6 +885,8 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list")
if(H5P_get(plist, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, &(f->shared->mdc_initCacheCfg)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial metadata cache resize config")
+ if(H5P_get(plist, H5F_ACS_JNL_INIT_CONFIG_NAME, &(f->shared->initJnlCfg)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get initial journaling config")
if(H5P_get(plist, H5F_ACS_DATA_CACHE_ELMT_SIZE_NAME, &(f->shared->rdcc_nelmts)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get data cache element size")
if(H5P_get(plist, H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME, &(f->shared->rdcc_nbytes)) < 0)
@@ -939,11 +943,8 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
/* 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.
- *
- * Note the use of H5P_DATASET_XFER_DEFAULT for the dxpl_id parameter
- * of H5AC2_create(). We may want to change this.
*/
- if(H5AC2_create(f, H5P_DATASET_XFER_DEFAULT,
+ 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")
@@ -1195,7 +1196,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
* Added calls to H5AC2_check_for_journaling() and
* H5AC2_set_cache_journaling_config() at the end of
* H5F_open(). For now at least, both of these operations
- * must be done juct before H5F_open() returns, as the
+ * must be done just before H5F_open() returns, as the
* required information is not available when the metadata
* cache is created.
*
@@ -1400,9 +1401,9 @@ 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_cache_config_t * config_ptr = NULL;
+ H5AC2_jnl_config_t * config_ptr = NULL;
- config_ptr = ((H5AC2_cache_config_t *)&(file->shared->mdc_initCacheCfg));
+ config_ptr = &(file->shared->initJnlCfg);
if ( H5AC2_check_for_journaling(file, dxpl_id, file->shared->cache2,
config_ptr->journal_recovered) < 0 ) {
@@ -1411,11 +1412,10 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t d
"H5AC2_check_for_journaling() reports failure.")
}
- if ( H5AC2_set_cache_journaling_config(file, dxpl_id,
- config_ptr, TRUE) < 0 ) {
+ if ( H5AC2_set_jnl_config(file, dxpl_id, config_ptr) < 0 ) {
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, \
- "H5AC2_set_cache_journaling_config() failed.")
+ "H5AC2_set_jnl_config() failed.")
}
}
@@ -3326,23 +3326,29 @@ done:
* Programmer: Quincey Koziol
* 7/3/08
*
+ * Changes: John Mainzer
+ * 8/4/08
+ * Reworked function to use the new H5AC2_jnl_config_t
+ * structure and H5AC2_get_jnl_config().
+ *
*-------------------------------------------------------------------------
*/
htri_t
H5F_is_journaling_enabled(const H5F_t *f)
{
- H5AC2_cache_config_t mdc_config; /* Current cache configuration */
+ H5AC2_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 */
- 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")
+ config.version = H5AC2__CURR_JNL_CONFIG_VER;
+ if(H5AC2_get_jnl_config(f->shared->cache2, &config) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, \
+ "can't retrieve journaling configuration")
/* Set return value */
- ret_value = mdc_config.enable_journaling;
+ ret_value = config.enable_journaling;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3350,6 +3356,121 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5Fget_jnl_config
+ *
+ * Purpose: Retrieves the current journaling configuration, and
+ * return it in *config_ptr.
+ *
+ * Note that the version field of *config_Ptr must be correctly
+ * filled in by the caller. This allows us to adapt for
+ * obsolete versions of the structure.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: John Mainzer
+ * 8/1/08
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5Fget_jnl_config(hid_t file_id,
+ H5AC2_jnl_config_t *config_ptr)
+{
+ H5F_t *file=NULL; /* File object for file ID */
+ herr_t ret_value = SUCCEED; /* Return value */
+ herr_t result;
+
+ FUNC_ENTER_API(H5Fget_jnl_config, FAIL)
+ H5TRACE2("e", "i*x", file_id, 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 ) ||
+ ( config_ptr->version != H5AC2__CURR_JNL_CONFIG_VER ) ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Bad config_ptr")
+ }
+
+ /* Go get the journaling configuration */
+ result = H5AC2_get_jnl_config(file->shared->cache2, config_ptr);
+
+ if ( result != SUCCEED ) {
+
+ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \
+ "H5AC_get_jnl_config() failed.");
+ }
+
+done:
+
+ FUNC_LEAVE_API(ret_value)
+
+} /* H5Fget_jnl_config() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Fset_jnl_config
+ *
+ * Purpose: Sets the current journaling configuration, using the
+ * contents of the instance of H5AC2_jnl_config_t pointed
+ * to by config_ptr.
+ *
+ * Return: Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Programmer: John Mainzer
+ * 8/1/08
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5Fset_jnl_config(hid_t file_id,
+ H5AC2_jnl_config_t *config_ptr)
+{
+ H5F_t *file=NULL; /* File object for file ID */
+ herr_t ret_value = SUCCEED; /* Return value */
+ herr_t result;
+
+ FUNC_ENTER_API(H5Fset_jnl_config, FAIL)
+ H5TRACE2("e", "i*x", file_id, 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")
+ }
+
+ /* set the resize configuration */
+ result = H5AC2_set_jnl_config(file, H5P_DATASET_XFER_DEFAULT, config_ptr);
+
+ if ( result != SUCCEED ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "H5AC2_set_jnl_config() failed.");
+ }
+
+done:
+
+ FUNC_LEAVE_API(ret_value)
+
+} /* H5Fset_jnl_config() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Fget_mdc_config
*
* Purpose: Retrieves the current automatic cache resize configuration
@@ -3460,7 +3581,6 @@ H5Fset_mdc_config(hid_t file_id,
/* pass the resize configuration to the modified cache as well. */
result = H5AC2_set_cache_auto_resize_config(file,
- H5P_DATASET_XFER_DEFAULT,
(H5AC2_cache_config_t *)config_ptr);
if ( result != SUCCEED ) {
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 2e34e64..64da334 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -99,6 +99,11 @@ typedef struct H5F_file_t {
/* metadata cache. This structure is */
/* fixed at creation time and should */
/* not change thereafter. */
+ H5AC2_jnl_config_t
+ initJnlCfg; /* Initial journaling configuration for */
+ /* the file. At least in its initial */
+ /* incarnation, this structure contains */
+ /* only metadata journaling config data */
hid_t fcpl_id; /* File creation property list ID */
H5F_close_degree_t fc_degree; /* File close behavior degree */
size_t rdcc_nelmts; /* Size of raw data chunk cache (elmts) */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 25355ab..8786306 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -366,6 +366,7 @@ typedef struct H5F_t H5F_t;
/* ========= File Access properties ============ */
#define H5F_ACS_META_CACHE_INIT_CONFIG_NAME "mdc_initCacheCfg" /* Initial metadata cache resize configuration */
+#define H5F_ACS_JNL_INIT_CONFIG_NAME "initJnlCfg" /* Initial journaling configuration */
#define H5F_ACS_DATA_CACHE_ELMT_SIZE_NAME "rdcc_nelmts" /* Size of raw data chunk cache(elements) */
#define H5F_ACS_DATA_CACHE_BYTE_SIZE_NAME "rdcc_nbytes" /* Size of raw data chunk cache(bytes) */
#define H5F_ACS_PREEMPT_READ_CHUNKS_NAME "rdcc_w0" /* Preemption read chunks first */
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index a055d46..185775d 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -23,6 +23,7 @@
#include "H5public.h"
#include "H5Cpublic.h"
#include "H5ACpublic.h"
+#include "H5AC2public.h"
#include "H5Ipublic.h"
/* When this header is included from a private header, don't make calls to H5check() */
@@ -136,6 +137,10 @@ H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist);
H5_DLL herr_t H5Funmount(hid_t loc, const char *name);
H5_DLL hssize_t H5Fget_freespace(hid_t file_id);
H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size);
+H5_DLL herr_t H5Fget_jnl_config(hid_t file_id,
+ H5AC2_jnl_config_t *config_ptr);
+H5_DLL herr_t H5Fset_jnl_config(hid_t file_id,
+ H5AC2_jnl_config_t *config_ptr);
H5_DLL herr_t H5Fget_mdc_config(hid_t file_id,
H5AC_cache_config_t * config_ptr);
H5_DLL herr_t H5Fset_mdc_config(hid_t file_id,
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index f31d1a4..c1fc572 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -35,6 +35,7 @@
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
+#include "H5AC2private.h" /* Metadata cache2 */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* Files */
@@ -58,6 +59,8 @@
/* Definitions for the initial metadata cache resize configuration */
#define H5F_ACS_META_CACHE_INIT_CONFIG_SIZE sizeof(H5AC_cache_config_t)
#define H5F_ACS_META_CACHE_INIT_CONFIG_DEF H5AC__DEFAULT_CACHE_CONFIG
+#define H5F_ACS_JNL_INIT_CONFIG_SIZE sizeof(H5AC2_jnl_config_t)
+#define H5F_ACS_JNL_INIT_CONFIG_DEF H5AC2__DEFAULT_JNL_CONFIG
/* Definitions for size of raw data chunk cache(elements) */
#define H5F_ACS_DATA_CACHE_ELMT_SIZE_SIZE sizeof(size_t)
#define H5F_ACS_DATA_CACHE_ELMT_SIZE_DEF 521
@@ -188,6 +191,7 @@ static herr_t
H5P_facc_reg_prop(H5P_genclass_t *pclass)
{
H5AC_cache_config_t mdc_initCacheCfg = H5F_ACS_META_CACHE_INIT_CONFIG_DEF; /* Default metadata cache settings */
+ H5AC2_jnl_config_t initJnlCfg = H5F_ACS_JNL_INIT_CONFIG_DEF; /* Default journaling config settings */
size_t rdcc_nelmts = H5F_ACS_DATA_CACHE_ELMT_SIZE_DEF; /* Default raw data chunk cache # of elements */
size_t rdcc_nbytes = H5F_ACS_DATA_CACHE_BYTE_SIZE_DEF; /* Default raw data chunk cache # of bytes */
double rdcc_w0 = H5F_ACS_PREEMPT_READ_CHUNKS_DEF; /* Default raw data chunk cache dirty ratio */
@@ -213,6 +217,11 @@ H5P_facc_reg_prop(H5P_genclass_t *pclass)
if(H5P_register(pclass, H5F_ACS_META_CACHE_INIT_CONFIG_NAME, H5F_ACS_META_CACHE_INIT_CONFIG_SIZE, &mdc_initCacheCfg, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ /* Register the initial journaling configuration */
+ if(H5P_register(pclass, H5F_ACS_JNL_INIT_CONFIG_NAME, H5F_ACS_JNL_INIT_CONFIG_SIZE, &initJnlCfg, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+
/* Register the size of raw data chunk cache (elements) */
if(H5P_register(pclass, H5F_ACS_DATA_CACHE_ELMT_SIZE_NAME, H5F_ACS_DATA_CACHE_ELMT_SIZE_SIZE, &rdcc_nelmts, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
@@ -1436,6 +1445,133 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5Pset_jnl_config
+ *
+ * Purpose: Set the initial journaling configuration in the
+ * target FAPL.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: J. Mainzer
+ * Thursday, July 31, 2008
+ *
+ * Modifications:
+ *
+ * Done.
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_jnl_config(hid_t plist_id,
+ H5AC2_jnl_config_t * config_ptr)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value=SUCCEED; /* return value */
+
+ FUNC_ENTER_API(H5Pset_jnl_config, FAIL);
+ H5TRACE2("e", "i*x", plist_id, config_ptr);
+
+ /* Get the plist structure */
+ if( NULL == ( plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS) ) ) {
+
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ }
+
+ /* validate the new configuration */
+ if ( H5AC2_validate_jnl_config(config_ptr) < 0 ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
+ "invalid journaling configuration");
+ }
+
+ /* set the modified config */
+
+ /* If we ever support multiple versions of H5AC_jnl_config_t, we
+ * will have to test the version and do translation here.
+ */
+
+ if(H5P_set(plist, H5F_ACS_JNL_INIT_CONFIG_NAME, config_ptr)<0) {
+
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, \
+ "can't set initial journaling config");
+ }
+
+done:
+
+ FUNC_LEAVE_API(ret_value);
+
+} /* H5Pset_jnl_config() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_mdc_config
+ *
+ * Purpose: Retrieve the journaling initial configuration
+ * from the target FAPL.
+ *
+ * Observe that the function will fail if config_ptr is
+ * NULL, or if config_ptr->version specifies an unknown
+ * version of H5AC_jnl_config_t.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: J. Mainzer
+ * Thursday, July 31, 2008
+ *
+ * Modifications:
+ *
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+herr_t
+H5Pget_jnl_config(hid_t plist_id,
+ H5AC2_jnl_config_t * config_ptr)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* return value */
+
+ FUNC_ENTER_API(H5Pget_jnl_config, FAIL);
+ H5TRACE2("e", "i*x", plist_id, config_ptr);
+
+ /* Get the plist structure */
+ if ( NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_ACCESS)) ) {
+
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ }
+
+ /* validate the config_ptr */
+ if ( config_ptr == NULL ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL config_ptr on entry.")
+ }
+
+ if ( config_ptr->version != H5AC2__CURR_JNL_CONFIG_VER ) {
+
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unknown config version.")
+ }
+
+ /* If we ever support multiple versions of H5AC_jnl_config_t, we
+ * will have to get the cannonical version here, and then translate
+ * to the version of the structure supplied.
+ */
+
+ /* Get the current initial metadata cache resize configuration */
+ if ( H5P_get(plist, H5F_ACS_JNL_INIT_CONFIG_NAME, config_ptr) < 0 ) {
+
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, \
+ "can't get initial journaling config");
+ }
+
+done:
+
+ FUNC_LEAVE_API(ret_value);
+
+} /* H5Pget_jnl_config() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5Pset_gc_references
*
* Purpose: Sets the flag for garbage collecting references for the file.
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 8382101..f2a8d1a 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -25,6 +25,7 @@
/* Public headers needed by this file */
#include "H5public.h"
#include "H5Cpublic.h"
+#include "H5AC2public.h"
#include "H5Dpublic.h"
#include "H5Fpublic.h"
#include "H5FDpublic.h"
@@ -255,6 +256,10 @@ H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id,
H5AC_cache_config_t * config_ptr);
H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id,
H5AC_cache_config_t * config_ptr); /* out */
+H5_DLL herr_t H5Pset_jnl_config(hid_t plist_id,
+ H5AC2_jnl_config_t * config_ptr);
+H5_DLL herr_t H5Pget_jnl_config(hid_t plist_id,
+ H5AC2_jnl_config_t * config_ptr); /* out */
H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref);
H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref/*out*/);
H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree);
diff --git a/test/cache2_api.c b/test/cache2_api.c
index 45f2672..0becdf8 100644
--- a/test/cache2_api.c
+++ b/test/cache2_api.c
@@ -196,6 +196,8 @@ check_fapl_mdc_api_calls(void)
{
const char * fcn_name = "check_fapl_mdc_api_calls()";
char filename[512];
+ hbool_t show_progress = FALSE;
+ int cp = 0;
herr_t result;
hid_t fapl_id = -1;
hid_t test_fapl_id = -1;
@@ -205,8 +207,7 @@ check_fapl_mdc_api_calls(void)
H5AC2_cache_config_t default_config = H5AC2__DEFAULT_CACHE_CONFIG;
H5AC2_cache_config_t mod_config =
{
- /* int version = */
- H5AC2__CURR_CACHE_CONFIG_VERSION,
+ /* int version = */ H5AC2__CURR_CACHE_CONFIG_VERSION,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
/* hbool_t close_trace_file = */ FALSE,
@@ -235,14 +236,7 @@ check_fapl_mdc_api_calls(void)
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC2_cache_config_t scratch;
H5C2_auto_size_ctl_t default_auto_size_ctl;
@@ -250,11 +244,15 @@ check_fapl_mdc_api_calls(void)
TESTING("MDC/FAPL related API calls");
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
pass2 = TRUE;
XLATE_EXT_TO_INT_MDC_CONFIG(default_auto_size_ctl, default_config)
XLATE_EXT_TO_INT_MDC_CONFIG(mod_auto_size_ctl, mod_config)
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* Create a FAPL and verify that it contains the default
* initial mdc configuration
*/
@@ -270,6 +268,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
if ( pass2 ) {
scratch.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
@@ -288,6 +288,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* Modify the initial mdc configuration in a FAPL, and verify that
* the changes can be read back
@@ -304,6 +306,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
if ( pass2 ) {
scratch.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
@@ -322,6 +326,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
if ( pass2 ) {
if ( H5Pclose(fapl_id) < 0 ) {
@@ -331,6 +337,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* Open a file using the default FAPL. Verify that the resulting
* metadata cache uses the default configuration as well. Get a
* copy of the FAPL from the file, and verify that it contains the
@@ -349,6 +357,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* create the file using the default FAPL */
if ( pass2 ) {
@@ -361,6 +371,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* get a pointer to the files internal data structure */
if ( pass2 ) {
@@ -376,6 +388,9 @@ check_fapl_mdc_api_calls(void)
cache_ptr = file_ptr->shared->cache2;
}
}
+
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
#if 0 /* JRM */
/* since this is the test cache, must build the cache explicitly */
/* remove this when we start using the new cache */
@@ -391,6 +406,8 @@ check_fapl_mdc_api_calls(void)
cache_ptr = file_ptr->shared->cache2;
}
}
+
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
#endif /* JRM */
/* verify that we can access the internal version of the cache config */
if ( pass2 ) {
@@ -404,6 +421,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* conpare the cache's internal configuration with the expected value */
if ( pass2 ) {
@@ -416,6 +435,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* get a copy of the files FAPL */
if ( pass2 ) {
@@ -428,6 +449,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* compare the initial cache config from the copy of the file's FAPL
* to the expected value. If all goes well, close the copy of the FAPL.
*/
@@ -454,6 +477,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* close the file and delete it */
if ( pass2 ) {
@@ -469,6 +494,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* Open a file using a FAPL with a modified initial metadata cache
* configuration. Verify that the resulting metadata cache uses the
@@ -489,6 +516,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* Modify the initial mdc configuration in the FAPL. */
if ( pass2 ) {
@@ -502,6 +531,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* setup the file name */
if ( pass2 ) {
@@ -513,6 +544,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* create the file using the modified FAPL */
if ( pass2 ) {
@@ -525,6 +558,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* get a pointer to the files internal data structure */
if ( pass2 ) {
@@ -540,6 +575,9 @@ check_fapl_mdc_api_calls(void)
cache_ptr = file_ptr->shared->cache2;
}
}
+
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
#if 0 /* JRM */
/* since this is the test cache, must build the cache explicitly */
/* remove this when we start using the new cache */
@@ -555,6 +593,8 @@ check_fapl_mdc_api_calls(void)
cache_ptr = file_ptr->shared->cache2;
}
}
+
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
#endif /* JRM */
/* verify that we can access the internal version of the cache config */
if ( pass2 ) {
@@ -568,6 +608,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* conpare the cache's internal configuration with the expected value */
if ( pass2 ) {
@@ -580,6 +622,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* get a copy of the files FAPL */
if ( pass2 ) {
@@ -592,6 +636,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* compare the initial cache config from the copy of the file's FAPL
* to the expected value. If all goes well, close the copy of the FAPL.
*/
@@ -619,6 +665,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* close the fapl used to create the file */
if ( pass2 ) {
@@ -629,6 +677,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
/* close the file and delete it */
if ( pass2 ) {
@@ -644,6 +694,8 @@ check_fapl_mdc_api_calls(void)
}
}
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
if ( pass2 ) { PASSED(); } else { H5_FAILED(); }
if ( ! pass2 )
@@ -844,14 +896,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC2_cache_config_t mod_config_2 =
{
@@ -884,14 +929,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC2_cache_config_t mod_config_3 =
{
@@ -924,14 +962,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ FALSE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC2_cache_config_t mod_config_4 =
{
@@ -965,14 +996,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
TESTING("MDC/FILE related API calls");
@@ -2270,14 +2294,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 1 -- bad rpt_fcn_enabled */
@@ -2310,14 +2327,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 2 -- bad open_trace_file */
@@ -2350,14 +2360,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 3 -- bad close_trace_file */
@@ -2390,14 +2393,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 4 -- open_trace_file == TRUE and empty trace_file_name */
@@ -2430,14 +2426,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 5 -- bad set_initial_size */
@@ -2470,14 +2459,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 6 -- max_size too big */
@@ -2510,14 +2492,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 7 -- min_size too small */
@@ -2550,14 +2525,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 8 -- min_size > max_size */
@@ -2590,14 +2558,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 9 -- initial size out of range (too big) */
@@ -2630,14 +2591,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 10 -- initial_size out of range (too small) */
@@ -2670,14 +2624,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 11 -- min_clean_fraction too big */
@@ -2710,14 +2657,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 12 -- min_clean_fraction too small */
@@ -2750,14 +2690,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 13 -- epoch_length too small */
@@ -2790,14 +2723,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 14 -- epoch_length too big */
@@ -2830,14 +2756,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 15 -- invalid incr_mode */
@@ -2870,14 +2789,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 16 -- lower_hr_threshold too small */
@@ -2910,14 +2822,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 17 -- lower_hr_threshold too big */
@@ -2950,14 +2855,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 18 -- increment too small */
@@ -2990,14 +2888,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 19 -- bad apply_max_increment */
@@ -3030,14 +2921,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 20 -- invalid flash_incr_mode */
@@ -3070,14 +2954,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 21 -- flash_multiple too small */
@@ -3110,14 +2987,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 22 -- flash_multiple too big */
@@ -3150,14 +3020,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 23 -- flash_threshold too small */
@@ -3190,14 +3053,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 24 -- flash_threshold too big */
@@ -3230,14 +3086,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 25 -- bad decr_mode */
@@ -3270,14 +3119,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 26 -- upper_hr_threshold too big */
@@ -3310,14 +3152,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 27 -- decrement too small */
@@ -3350,14 +3185,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 28 -- decrement too big */
@@ -3390,14 +3218,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 29 -- epochs_before_eviction too small */
@@ -3430,14 +3251,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 0,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 30 -- epochs_before_eviction too big */
@@ -3470,14 +3284,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ H5C2__MAX_EPOCH_MARKERS + 1,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 31 -- invalid apply_empty_reserve */
@@ -3510,14 +3317,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ 2,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 32 -- empty_reserve too small */
@@ -3550,14 +3350,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ -0.0000000001,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 33 -- empty_reserve too big */
@@ -3590,14 +3383,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 1.00000000001,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 34 -- upper_hr_threshold too small */
@@ -3630,14 +3416,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 35 -- upper_hr_threshold too big */
@@ -3670,14 +3449,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 36 -- upper_hr_threshold <= lower_hr_threshold */
@@ -3710,14 +3482,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 37 -- dirty_bytes_threshold too small */
@@ -3750,14 +3515,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (H5C2__MIN_MAX_CACHE_SIZE / 2) - 1,
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (H5C2__MIN_MAX_CACHE_SIZE / 2) - 1
},
{
/* 38 -- dirty_bytes_threshold too big */
@@ -3790,14 +3548,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (H5C2__MAX_MAX_CACHE_SIZE / 4) + 1,
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (H5C2__MAX_MAX_CACHE_SIZE / 4) + 1
},
{
/* 39 -- attempt to disable evictions when auto incr enabled */
@@ -3830,14 +3581,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 40 -- attempt to disable evictions when auto decr enabled */
@@ -3870,14 +3614,7 @@ H5AC2_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (64 * 1024),
- /* int jbrb_num_bufs = */ 4,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ FALSE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
}
};
diff --git a/test/cache2_journal.c b/test/cache2_journal.c
index b858353..633414e 100644
--- a/test/cache2_journal.c
+++ b/test/cache2_journal.c
@@ -1891,7 +1891,7 @@ open_existing_file_for_journaling(const char * hdf_file_name,
hbool_t verbose = FALSE;
int cp = 0;
herr_t result;
- H5AC2_cache_config_t mdj_config;
+ H5AC2_jnl_config_t jnl_config;
hid_t fapl_id = -1;
hid_t file_id = -1;
H5F_t * file_ptr = NULL;
@@ -1914,17 +1914,12 @@ open_existing_file_for_journaling(const char * hdf_file_name,
failure_mssg2 = "journal file name too long.\n";
pass2 = FALSE;
- } else {
-
- strcpy(mdj_config.journal_file_path, journal_file_name);
-
- if ( verbose ) {
+ } else if ( verbose ) {
- HDfprintf(stdout, "%s: HDF file name = \"%s\".\n",
- fcn_name, hdf_file_name);
- HDfprintf(stdout, "%s: journal file name = \"%s\".\n",
- fcn_name, journal_file_name);
- }
+ HDfprintf(stdout, "%s: HDF file name = \"%s\".\n",
+ fcn_name, hdf_file_name);
+ HDfprintf(stdout, "%s: journal file name = \"%s\".\n",
+ fcn_name, journal_file_name);
}
}
@@ -1947,7 +1942,8 @@ open_existing_file_for_journaling(const char * hdf_file_name,
/* call H5Pset_libver_bounds() on the fapl_id */
if ( pass2 ) {
- if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0 ) {
+ if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST)
+ < 0 ) {
pass2 = FALSE;
failure_mssg2 = "H5Pset_libver_bounds() failed.\n";
@@ -1958,43 +1954,42 @@ open_existing_file_for_journaling(const char * hdf_file_name,
if ( pass2 ) {
- mdj_config.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
+ jnl_config.version = H5AC2__CURR_JNL_CONFIG_VER;
- result = H5Pget_mdc_config(fapl_id, (H5AC_cache_config_t *)&mdj_config);
+ result = H5Pget_jnl_config(fapl_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Pset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Pget_jnl_config() failed.\n";
}
/* set journaling config fields to taste */
- mdj_config.enable_journaling = TRUE;
+ jnl_config.enable_journaling = TRUE;
- strcpy(mdj_config.journal_file_path, journal_file_name);
+ strcpy(jnl_config.journal_file_path, journal_file_name);
- mdj_config.journal_recovered = FALSE;
- mdj_config.jbrb_buf_size = (8 * 1024);
- mdj_config.jbrb_num_bufs = 2;
- mdj_config.jbrb_use_aio = FALSE;
- mdj_config.jbrb_human_readable = TRUE;
+ jnl_config.journal_recovered = FALSE;
+ jnl_config.jbrb_buf_size = (8 * 1024);
+ jnl_config.jbrb_num_bufs = 2;
+ jnl_config.jbrb_use_aio = FALSE;
+ jnl_config.jbrb_human_readable = TRUE;
}
if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
if ( pass2 ) {
- result = H5Pset_mdc_config(fapl_id, (H5AC_cache_config_t *)&mdj_config);
+ result = H5Pset_jnl_config(fapl_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Pset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Pset_jnl_config() failed.\n";
}
}
if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
-
/**************************************/
/* open the file with the fapl above. */
@@ -2008,7 +2003,7 @@ open_existing_file_for_journaling(const char * hdf_file_name,
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed.\n";
+ failure_mssg2 = "H5Fopen() failed (1).\n";
} else {
@@ -2170,7 +2165,7 @@ open_existing_file_without_journaling(const char * hdf_file_name,
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed.\n";
+ failure_mssg2 = "H5Fopen() failed (2).\n";
} else {
@@ -2302,7 +2297,11 @@ setup_cache_for_journaling(const char * hdf_file_name,
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (8 * 1024),
+ /* int dirty_bytes_threshold = */ (8 * 1024)
+ };
+ H5AC2_jnl_config_t jnl_config =
+ {
+ /* int version = */ H5AC2__CURR_JNL_CONFIG_VER,
/* hbool_t enable_journaling = */ TRUE,
/* char journal_file_path[] = */ "",
/* hbool_t journal_recovered = */ FALSE,
@@ -2336,7 +2335,7 @@ setup_cache_for_journaling(const char * hdf_file_name,
} else {
- strcpy(mdj_config.journal_file_path, journal_file_name);
+ strcpy(jnl_config.journal_file_path, journal_file_name);
if ( verbose ) {
@@ -2367,7 +2366,8 @@ setup_cache_for_journaling(const char * hdf_file_name,
/* call H5Pset_libver_bounds() on the fapl_id */
if ( pass2 ) {
- if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0 ) {
+ if ( H5Pset_libver_bounds(fapl_id, H5F_LIBVER_LATEST,
+ H5F_LIBVER_LATEST) < 0 ) {
pass2 = FALSE;
failure_mssg2 = "H5Pset_libver_bounds() failed.\n";
@@ -2389,6 +2389,19 @@ setup_cache_for_journaling(const char * hdf_file_name,
if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+ if ( pass2 ) {
+
+ result = H5Pset_jnl_config(fapl_id, &jnl_config);
+
+ if ( result < 0 ) {
+
+ pass2 = FALSE;
+ failure_mssg2 = "H5Pset_mdc_config() failed.\n";
+ }
+ }
+
+ if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++);
+
#if USE_CORE_DRIVER
if ( ( pass2 ) && ( use_core_driver_if_avail ) ) {
@@ -3139,7 +3152,7 @@ mdj_smoke_check_00(void)
hid_t file_id = -1;
H5F_t * file_ptr = NULL;
H5C2_t * cache_ptr = NULL;
- H5AC2_cache_config_t mdj_config;
+ H5AC2_jnl_config_t jnl_config;
TESTING("mdj smoke check 00 -- general coverage");
@@ -4258,26 +4271,26 @@ mdj_smoke_check_00(void)
/* now enable journaling */
if ( pass2 ) {
- mdj_config.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
+ jnl_config.version = H5AC2__CURR_JNL_CONFIG_VER;
- result = H5Fget_mdc_config(file_id, (H5AC_cache_config_t *)&mdj_config);
+ result = H5Fget_jnl_config(file_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fget_mdc_config() failed.\n";
+ failure_mssg2 = "H5Fget_jnl_config() failed.\n";
}
/* set journaling config fields to taste */
- mdj_config.enable_journaling = TRUE;
+ jnl_config.enable_journaling = TRUE;
- strcpy(mdj_config.journal_file_path, journal_filename);
+ strcpy(jnl_config.journal_file_path, journal_filename);
- mdj_config.journal_recovered = FALSE;
- mdj_config.jbrb_buf_size = (8 * 1024);
- mdj_config.jbrb_num_bufs = 2;
- mdj_config.jbrb_use_aio = FALSE;
- mdj_config.jbrb_human_readable = TRUE;
+ jnl_config.journal_recovered = FALSE;
+ jnl_config.jbrb_buf_size = (8 * 1024);
+ jnl_config.jbrb_num_bufs = 2;
+ jnl_config.jbrb_use_aio = FALSE;
+ jnl_config.jbrb_human_readable = TRUE;
}
if ( show_progress )
@@ -4285,12 +4298,12 @@ mdj_smoke_check_00(void)
if ( pass2 ) {
- result = H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mdj_config);
+ result = H5Fset_jnl_config(file_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Fset_jnl_config() failed.\n";
}
}
@@ -4337,14 +4350,14 @@ mdj_smoke_check_00(void)
/* disable journaling */
if ( pass2 ) {
- mdj_config.enable_journaling = FALSE;
+ jnl_config.enable_journaling = FALSE;
- result = H5Fset_mdc_config(file_id, (H5AC_cache_config_t *)&mdj_config);
+ result = H5Fset_jnl_config(file_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Fset_jnl_config() failed.\n";
}
}
@@ -5435,7 +5448,7 @@ check_mdj_config_block_IO(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed (2).\n";
+ failure_mssg2 = "H5Fopen() failed (3).\n";
}
}
@@ -6002,7 +6015,7 @@ check_superblock_extensions(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed (1).\n";
+ failure_mssg2 = "H5Fopen() failed (4).\n";
}
}
@@ -6085,7 +6098,7 @@ check_superblock_extensions(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed (2).\n";
+ failure_mssg2 = "H5Fopen() failed (5).\n";
}
}
@@ -6172,7 +6185,7 @@ check_superblock_extensions(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed (3).\n";
+ failure_mssg2 = "H5Fopen() failed (6).\n";
}
}
@@ -6266,7 +6279,7 @@ check_superblock_extensions(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed (4).\n";
+ failure_mssg2 = "H5Fopen() failed (7).\n";
}
}
@@ -6354,7 +6367,7 @@ check_superblock_extensions(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed (5).\n";
+ failure_mssg2 = "H5Fopen() failed (8).\n";
}
}
@@ -6729,7 +6742,7 @@ verify_mdj_file_marking_on_create(void)
if ( file_id >= 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() succeeded.";
+ failure_mssg2 = "H5Fopen() succeeded - 1.";
}
}
@@ -6811,7 +6824,7 @@ verify_mdj_file_marking_after_open(void)
hid_t dataset_id = -1;
hid_t dataspace_id = -1;
hsize_t dims[2];
- H5AC2_cache_config_t mdj_config;
+ H5AC2_jnl_config_t jnl_config;
/* setup the file name */
if ( pass2 ) {
@@ -7003,27 +7016,26 @@ verify_mdj_file_marking_after_open(void)
/* now enable journaling */
if ( pass2 ) {
- mdj_config.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
+ jnl_config.version = H5AC2__CURR_JNL_CONFIG_VER;
- result = H5Fget_mdc_config(file_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Fget_jnl_config(file_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fget_mdc_config() failed.\n";
+ failure_mssg2 = "H5Fget_jnl_config() failed.\n";
}
/* set journaling config fields to taste */
- mdj_config.enable_journaling = TRUE;
+ jnl_config.enable_journaling = TRUE;
- strcpy(mdj_config.journal_file_path, journal_filename);
+ strcpy(jnl_config.journal_file_path, journal_filename);
- mdj_config.journal_recovered = FALSE;
- mdj_config.jbrb_buf_size = (8 * 1024);
- mdj_config.jbrb_num_bufs = 2;
- mdj_config.jbrb_use_aio = FALSE;
- mdj_config.jbrb_human_readable = TRUE;
+ jnl_config.journal_recovered = FALSE;
+ jnl_config.jbrb_buf_size = (8 * 1024);
+ jnl_config.jbrb_num_bufs = 2;
+ jnl_config.jbrb_use_aio = FALSE;
+ jnl_config.jbrb_human_readable = TRUE;
}
if ( show_progress ) {
@@ -7035,13 +7047,12 @@ verify_mdj_file_marking_after_open(void)
if ( pass2 ) {
- result = H5Fset_mdc_config(file_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Fset_jnl_config(file_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Fset_jnl_config() failed.\n";
}
}
@@ -7149,7 +7160,7 @@ verify_mdj_file_marking_after_open(void)
if ( file_id >= 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() succeeded.";
+ failure_mssg2 = "H5Fopen() succeeded - 2.";
}
}
@@ -7235,7 +7246,7 @@ verify_mdj_file_marking_on_open(void)
hid_t dataspace_id = -1;
hsize_t dims[2];
H5F_t * file_ptr = NULL;
- H5AC2_cache_config_t mdj_config;
+ H5AC2_jnl_config_t jnl_config;
/* setup the file name */
if ( pass2 ) {
@@ -7524,27 +7535,26 @@ verify_mdj_file_marking_on_open(void)
if ( pass2 ) {
- mdj_config.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
+ jnl_config.version = H5AC2__CURR_JNL_CONFIG_VER;
- result = H5Pget_mdc_config(fapl_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Pget_jnl_config(fapl_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Pset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Pget_jnl_config() failed.\n";
}
/* set journaling config fields to taste */
- mdj_config.enable_journaling = TRUE;
+ jnl_config.enable_journaling = TRUE;
- strcpy(mdj_config.journal_file_path, journal_filename);
+ strcpy(jnl_config.journal_file_path, journal_filename);
- mdj_config.journal_recovered = FALSE;
- mdj_config.jbrb_buf_size = (8 * 1024);
- mdj_config.jbrb_num_bufs = 2;
- mdj_config.jbrb_use_aio = FALSE;
- mdj_config.jbrb_human_readable = TRUE;
+ jnl_config.journal_recovered = FALSE;
+ jnl_config.jbrb_buf_size = (8 * 1024);
+ jnl_config.jbrb_num_bufs = 2;
+ jnl_config.jbrb_use_aio = FALSE;
+ jnl_config.jbrb_human_readable = TRUE;
}
if ( show_progress ) {
@@ -7556,13 +7566,12 @@ verify_mdj_file_marking_on_open(void)
if ( pass2 ) {
- result = H5Pset_mdc_config(fapl_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Pset_jnl_config(fapl_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Pset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Pset_jnl_config() failed.\n";
}
}
@@ -7581,7 +7590,7 @@ verify_mdj_file_marking_on_open(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed.\n";
+ failure_mssg2 = "H5Fopen() failed (9).\n";
} else {
@@ -7704,7 +7713,7 @@ verify_mdj_file_marking_on_open(void)
if ( file_id >= 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() succeeded.";
+ failure_mssg2 = "H5Fopen() succeeded - 3.";
}
}
@@ -7958,7 +7967,7 @@ verify_mdj_file_unmarking_on_file_close(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed.";
+ failure_mssg2 = "H5Fopen() failed (10).";
}
}
@@ -8072,7 +8081,7 @@ verify_mdj_file_unmarking_on_journaling_shutdown(void)
hsize_t dims[2];
H5F_t * file_ptr = NULL;
H5C2_t * cache_ptr = NULL;
- H5AC2_cache_config_t mdj_config;
+ H5AC2_jnl_config_t jnl_config;
/* setup the file name */
if ( pass2 ) {
@@ -8221,32 +8230,17 @@ verify_mdj_file_unmarking_on_journaling_shutdown(void)
/* now dis-able journaling */
if ( pass2 ) {
- mdj_config.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
+ jnl_config.version = H5AC2__CURR_JNL_CONFIG_VER;
- result = H5Fget_mdc_config(file_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Fget_jnl_config(file_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fget_mdc_config() failed.\n";
+ failure_mssg2 = "H5Fget_jnl_config() failed.\n";
}
- mdj_config.enable_journaling = FALSE;
-
- /* until we disable the old cache, we need to set
- * these fields too, as until then, H5Fget_mdc_config()
- * will return data from the old cache -- and fail to
- * initialize the journaling fields.
- */
-
- strcpy(mdj_config.journal_file_path, journal_filename);
-
- mdj_config.journal_recovered = FALSE;
- mdj_config.jbrb_buf_size = (8 * 1024);
- mdj_config.jbrb_num_bufs = 2;
- mdj_config.jbrb_use_aio = FALSE;
- mdj_config.jbrb_human_readable = TRUE;
+ jnl_config.enable_journaling = FALSE;
}
if ( show_progress ) {
@@ -8258,13 +8252,12 @@ verify_mdj_file_unmarking_on_journaling_shutdown(void)
if ( pass2 ) {
- result = H5Fset_mdc_config(file_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Fset_jnl_config(file_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fset_mdc_config() failed.\n";
+ failure_mssg2 = "H5Fset_jnl_config() failed.\n";
}
}
@@ -8366,7 +8359,7 @@ verify_mdj_file_unmarking_on_journaling_shutdown(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed.";
+ failure_mssg2 = "H5Fopen() failed (11).";
}
if ( show_progress ) {
@@ -8468,7 +8461,7 @@ verify_mdj_file_unmarking_on_recovery(void)
hid_t fapl_id = -1;
H5F_t * file_ptr = NULL;
H5C2_t * cache_ptr = NULL;
- H5AC2_cache_config_t mdj_config;
+ H5AC2_jnl_config_t jnl_config;
/* setup the file name */
if ( pass2 ) {
@@ -8699,7 +8692,7 @@ verify_mdj_file_unmarking_on_recovery(void)
if ( file_id >= 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() succeeded.";
+ failure_mssg2 = "H5Fopen() succeeded - 4.";
}
}
@@ -8710,39 +8703,25 @@ verify_mdj_file_unmarking_on_recovery(void)
HDfflush(stdout);
}
- /* now set the file recovered flag in the cache config
+
+ /* now set the file recovered flag in the journal config
* structure in the fapl, and try to open again. Should
- * succeed, and the file should not be marked as haveing
+ * succeed, and the file should not be marked as having
* journaling in progress.
*/
if ( pass2 ) {
- mdj_config.version = H5C2__CURR_AUTO_SIZE_CTL_VER;
+ jnl_config.version = H5AC2__CURR_JNL_CONFIG_VER;
- result = H5Pget_mdc_config(fapl_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Pget_jnl_config(fapl_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Pget_mdc_config() failed.\n";
+ failure_mssg2 = "H5Pget_jnl_config() failed.\n";
}
- /* until we disable the old cache, we need to initialize
- * all journaling fields, as until then, H5Fget_mdc_config()
- * will return data from the old cache -- and fail to
- * initialize them.
- */
-
- mdj_config.enable_journaling = FALSE;
-
- strcpy(mdj_config.journal_file_path, journal_filename);
-
- mdj_config.journal_recovered = TRUE;
- mdj_config.jbrb_buf_size = (8 * 1024);
- mdj_config.jbrb_num_bufs = 2;
- mdj_config.jbrb_use_aio = FALSE;
- mdj_config.jbrb_human_readable = TRUE;
+ jnl_config.journal_recovered = TRUE;
}
if ( show_progress ) {
@@ -8754,13 +8733,12 @@ verify_mdj_file_unmarking_on_recovery(void)
if ( pass2 ) {
- result = H5Pset_mdc_config(fapl_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Pset_jnl_config(fapl_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Pset_mdc_config() failed(1).\n";
+ failure_mssg2 = "H5Pset_jnl_config() failed(1).\n";
}
}
@@ -8778,7 +8756,7 @@ verify_mdj_file_unmarking_on_recovery(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed(1).";
+ failure_mssg2 = "H5Fopen() failed (12).";
}
}
@@ -8811,15 +8789,14 @@ verify_mdj_file_unmarking_on_recovery(void)
if ( pass2 ) {
- mdj_config.journal_recovered = FALSE;
+ jnl_config.journal_recovered = FALSE;
- result = H5Pset_mdc_config(fapl_id,
- (H5AC_cache_config_t *)&mdj_config);
+ result = H5Pset_jnl_config(fapl_id, &jnl_config);
if ( result < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Pset_mdc_config() failed(2).\n";
+ failure_mssg2 = "H5Pset_jnl_config() failed(2).\n";
}
}
@@ -8837,7 +8814,7 @@ verify_mdj_file_unmarking_on_recovery(void)
if ( file_id < 0 ) {
pass2 = FALSE;
- failure_mssg2 = "H5Fopen() failed(2).";
+ failure_mssg2 = "H5Fopen() failed (13).";
}
}
diff --git a/test/cache_api.c b/test/cache_api.c
index c1530eb..fcc4664 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -232,14 +232,7 @@ check_fapl_mdc_api_calls(void)
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC_cache_config_t scratch;
H5C_auto_size_ctl_t default_auto_size_ctl;
@@ -808,14 +801,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC_cache_config_t mod_config_2 =
{
@@ -848,14 +834,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 4,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC_cache_config_t mod_config_3 =
{
@@ -888,14 +867,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ FALSE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC_cache_config_t mod_config_4 =
{
@@ -929,14 +901,7 @@ check_file_mdc_api_calls(void)
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
TESTING("MDC/FILE related API calls");
@@ -1468,14 +1433,7 @@ mdc_api_call_smoke_check(int express_test)
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC_cache_config_t mod_config_2 =
{
@@ -1508,14 +1466,7 @@ mdc_api_call_smoke_check(int express_test)
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
H5AC_cache_config_t mod_config_3 =
{
@@ -1548,14 +1499,7 @@ mdc_api_call_smoke_check(int express_test)
/* int epochs_before_eviction = */ 2,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.05,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
};
TESTING("MDC API smoke check");
@@ -2236,14 +2180,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 1 -- bad rpt_fcn_enabled */
@@ -2276,14 +2213,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 2 -- bad open_trace_file */
@@ -2316,14 +2246,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 3 -- bad close_trace_file */
@@ -2356,14 +2279,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 4 -- open_trace_file == TRUE and empty trace_file_name */
@@ -2396,14 +2312,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 5 -- bad set_initial_size */
@@ -2436,14 +2345,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 6 -- max_size too big */
@@ -2476,14 +2378,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 7 -- min_size too small */
@@ -2516,14 +2411,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 8 -- min_size > max_size */
@@ -2556,14 +2444,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 9 -- initial size out of range (too big) */
@@ -2596,14 +2477,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 10 -- initial_size out of range (too small) */
@@ -2636,14 +2510,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 11 -- min_clean_fraction too big */
@@ -2676,14 +2543,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 12 -- min_clean_fraction too small */
@@ -2716,14 +2576,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 13 -- epoch_length too small */
@@ -2756,14 +2609,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 14 -- epoch_length too big */
@@ -2796,14 +2642,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 15 -- invalid incr_mode */
@@ -2836,14 +2675,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 16 -- lower_hr_threshold too small */
@@ -2876,14 +2708,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 17 -- lower_hr_threshold too big */
@@ -2916,14 +2741,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 18 -- increment too small */
@@ -2956,14 +2774,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 19 -- bad apply_max_increment */
@@ -2996,14 +2807,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 20 -- invalid flash_incr_mode */
@@ -3036,14 +2840,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 21 -- flash_multiple too small */
@@ -3076,14 +2873,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 22 -- flash_multiple too big */
@@ -3116,14 +2906,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 23 -- flash_threshold too small */
@@ -3156,14 +2939,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 24 -- flash_threshold too big */
@@ -3196,14 +2972,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 25 -- bad decr_mode */
@@ -3236,14 +3005,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 26 -- upper_hr_threshold too big */
@@ -3276,14 +3038,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 27 -- decrement too small */
@@ -3316,14 +3071,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 28 -- decrement too big */
@@ -3356,14 +3104,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 29 -- epochs_before_eviction too small */
@@ -3396,14 +3137,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 0,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 30 -- epochs_before_eviction too big */
@@ -3436,14 +3170,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ H5C__MAX_EPOCH_MARKERS + 1,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 31 -- invalid apply_empty_reserve */
@@ -3476,14 +3203,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ 2,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 32 -- empty_reserve too small */
@@ -3516,14 +3236,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ -0.0000000001,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 33 -- empty_reserve too big */
@@ -3556,14 +3269,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 1.00000000001,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 34 -- upper_hr_threshold too small */
@@ -3596,14 +3302,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 35 -- upper_hr_threshold too big */
@@ -3636,14 +3335,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 36 -- upper_hr_threshold <= lower_hr_threshold */
@@ -3676,14 +3368,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 37 -- dirty_bytes_threshold too small */
@@ -3716,14 +3401,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (H5C__MIN_MAX_CACHE_SIZE / 2) - 1,
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (H5C__MIN_MAX_CACHE_SIZE / 2) - 1
},
{
/* 38 -- dirty_bytes_threshold too big */
@@ -3756,14 +3434,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (H5C__MAX_MAX_CACHE_SIZE / 4) + 1,
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (H5C__MAX_MAX_CACHE_SIZE / 4) + 1
},
{
/* 39 -- attempt to disable evictions when auto incr enabled */
@@ -3796,14 +3467,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
},
{
/* 40 -- attempt to disable evictions when auto decr enabled */
@@ -3836,14 +3500,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
/* int epochs_before_eviction = */ 3,
/* hbool_t apply_empty_reserve = */ TRUE,
/* double empty_reserve = */ 0.1,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* hbool_t enable_journaling = */ FALSE,
- /* char journal_file_path[] = */ "",
- /* hbool_t journal_recovered = */ FALSE,
- /* size_t jbrb_buf_size = */ (8 * 1024),
- /* int jbrb_num_bufs = */ 2,
- /* hbool_t jbrb_use_aio = */ FALSE,
- /* hbool_t jbrb_human_readable = */ TRUE
+ /* int dirty_bytes_threshold = */ (256 * 1024)
}
};
diff --git a/testpar/t_cache2.c b/testpar/t_cache2.c
index d73e0b5..85b574e 100644
--- a/testpar/t_cache2.c
+++ b/testpar/t_cache2.c
@@ -3375,8 +3375,8 @@ setup_cache_for_test(hid_t * fid_ptr,
config.rpt_fcn_enabled = TRUE;
- if ( H5AC2_set_cache_auto_resize_config(file_ptr,
- H5P_DATASET_XFER_DEFAULT, &config) != SUCCEED ) {
+ if ( H5AC2_set_cache_auto_resize_config(file_ptr, &config)
+ != SUCCEED ) {
HDfprintf(stdout,
"%d:%s: H5AC2_set_cache_auto_resize_config() failed.\n",
@@ -5577,28 +5577,28 @@ trace_file_check(void)
const char * expected_output[] =
{
"### HDF5 metadata cache trace file version 2 ###\n",
- "H5AC2_set_cache_auto_resize_config 1 0 1 0 \"t_cache2_trace.txt\" 1 0 1048576 0.500000 16777216 1048576 50000 1 0.900000 2.000000 1 4194304 1 1.000000 0.250000 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 0 \"\" 0 4096 1 0 0 0\n",
- "H5AC2_set 0x400 2 15 0x0 2 0\n",
- "H5AC2_set 0x402 2 15 0x0 2 0\n",
- "H5AC2_set 0x404 4 15 0x0 4 0\n",
- "H5AC2_set 0x408 6 15 0x0 6 0\n",
- "H5AC2_protect 0x400 2 15 H5AC2_WRITE 2 1\n",
+ "H5AC2_set_cache_auto_resize_config 1 0 1 0 \"t_cache2_trace.txt\" 1 0 1048576 0.500000 16777216 1048576 50000 1 0.900000 2.000000 1 4194304 1 1.000000 0.250000 3 0.999000 0.900000 1 1048576 3 1 0.100000 262144 0\n",
+ "H5AC2_set 0x400 2 16 0x0 2 0\n",
+ "H5AC2_set 0x402 2 16 0x0 2 0\n",
+ "H5AC2_set 0x404 4 16 0x0 4 0\n",
+ "H5AC2_set 0x408 6 16 0x0 6 0\n",
+ "H5AC2_protect 0x400 2 16 H5AC2_WRITE 2 1\n",
"H5AC2_mark_pinned_or_protected_entry_dirty 0x400 0\n",
- "H5AC2_unprotect 0x400 15 2 0 0\n",
- "H5AC2_protect 0x402 2 15 H5AC2_WRITE 2 1\n",
+ "H5AC2_unprotect 0x400 16 2 0 0\n",
+ "H5AC2_protect 0x402 2 16 H5AC2_WRITE 2 1\n",
"H5AC2_pin_protected_entry 0x402 0\n",
- "H5AC2_unprotect 0x402 15 2 0 0\n",
+ "H5AC2_unprotect 0x402 16 2 0 0\n",
"H5AC2_unpin_entry 0x402 0\n",
- "H5AC2_expunge_entry 0x402 15 0\n",
- "H5AC2_protect 0x404 4 15 H5AC2_WRITE 4 1\n",
+ "H5AC2_expunge_entry 0x402 16 0\n",
+ "H5AC2_protect 0x404 4 16 H5AC2_WRITE 4 1\n",
"H5AC2_pin_protected_entry 0x404 0\n",
- "H5AC2_unprotect 0x404 15 4 0 0\n",
+ "H5AC2_unprotect 0x404 16 4 0 0\n",
"H5AC2_mark_pinned_entry_dirty 0x404 0 0 0\n",
"H5AC2_resize_pinned_entry 0x404 2 0\n",
"H5AC2_resize_pinned_entry 0x404 4 0\n",
"H5AC2_unpin_entry 0x404 0\n",
- "H5AC2_rename 0x400 0x8e65 15 0\n",
- "H5AC2_rename 0x8e65 0x400 15 0\n",
+ "H5AC2_rename 0x400 0x8e65 16 0\n",
+ "H5AC2_rename 0x8e65 0x400 16 0\n",
"H5AC2_flush 0x0 0\n",
NULL
};
@@ -5672,8 +5672,8 @@ trace_file_check(void)
config.open_trace_file = TRUE;
strcpy(config.trace_file_name, "t_cache2_trace.txt");
- if ( H5AC2_set_cache_auto_resize_config(file_ptr,
- H5P_DATASET_XFER_DEFAULT, &config) != SUCCEED ) {
+ if ( H5AC2_set_cache_auto_resize_config(file_ptr, &config)
+ != SUCCEED ) {
nerrors++;
HDfprintf(stdout,
@@ -5736,8 +5736,8 @@ trace_file_check(void)
config.close_trace_file = TRUE;
config.trace_file_name[0] = '\0';
- if ( H5AC2_set_cache_auto_resize_config(file_ptr,
- H5P_DATASET_XFER_DEFAULT, &config) != SUCCEED ) {
+ if ( H5AC2_set_cache_auto_resize_config(file_ptr, &config)
+ != SUCCEED ) {
nerrors++;
HDfprintf(stdout,
diff --git a/tools/h5recover/h5recover.c b/tools/h5recover/h5recover.c
index 1ee65ff..692ba8b 100644
--- a/tools/h5recover/h5recover.c
+++ b/tools/h5recover/h5recover.c
@@ -201,7 +201,7 @@ main (int argc, const char *argv[])
char * p; /* pointer */
hbool_t custom_name = 0; /* bool indicating custom backup name */
hbool_t no_copy = 0; /* bool indicating not to make backup */
- H5AC_cache_config_t config; /* cache configuration */
+ H5AC2_jnl_config_t config; /* journaling configuration */
hbool_t check_file = 1; /* boolean indicating whether to check */
uint8_t * compare_buf; /* buffer to read into from hdf5 file */
hid_t status = -1; /* status indicator for retval checking */
@@ -314,7 +314,7 @@ main (int argc, const char *argv[])
config.version = 1; /* should be H5C2__CURR_AUTO_SIZE_CTL_VER */
/* get H5AC_cache_config_t configuration from fapl */
- if ( H5Pget_mdc_config(fapl, &config) == -1) {
+ if ( H5Pget_jnl_config(fapl, &config) == -1) {
error_msg(progname, "Could not get mdc config from FAPL.\n");
leave( EXIT_FAILURE );
@@ -325,9 +325,9 @@ main (int argc, const char *argv[])
config.journal_recovered = TRUE;
/* set H5AC_cache_config_t configuration with file recovered */
- if ( H5Pset_mdc_config(fapl, &config) == -1) {
+ if ( H5Pset_jnl_config(fapl, &config) == -1) {
- error_msg(progname, "Could not set mdc config on FAPL.\n");
+ error_msg(progname, "Could not set jnl config on FAPL.\n");
leave( EXIT_FAILURE );
} /* end if */