summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-06 15:39:23 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-06 15:39:23 (GMT)
commitabd749619d15cf7a3e927232ac2ad7ed1c726dd2 (patch)
treec722e8827c02f11e97b1106e2cb016c65b1b6eb5 /src/H5AC.c
parentb95c7d1879120c542490c031c70b88f6e5fa7eaa (diff)
downloadhdf5-abd749619d15cf7a3e927232ac2ad7ed1c726dd2.zip
hdf5-abd749619d15cf7a3e927232ac2ad7ed1c726dd2.tar.gz
hdf5-abd749619d15cf7a3e927232ac2ad7ed1c726dd2.tar.bz2
[svn-r18726] Description:
Bring r18725 from trunk to 1.8 branch: Bring r18724 from metadata journaling 'merging' branch to trunk: Rename H5[A]C_rename to H5[A]C_move_entry. Tested on: FreeBSD/32 6.3 (duty) w/debug (h5committested on trunk)
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c99
1 files changed, 36 insertions, 63 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index e11b23f..bb7bb97 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -91,7 +91,7 @@ H5FL_DEFINE_STATIC(H5AC_aux_t);
*
* addr: file offset of a metadata entry. Entries are added to this
* list (if they aren't there already) when they are marked
- * dirty in an unprotect, inserted, or renamed. They are
+ * dirty in an unprotect, inserted, or moved. They are
* removed when they appear in a clean entries broadcast.
*
****************************************************************************/
@@ -189,7 +189,7 @@ static herr_t H5AC_receive_and_apply_clean_list(H5F_t * f,
hid_t secondary_dxpl_id,
H5AC_t * cache_ptr);
-static herr_t H5AC_log_renamed_entry(const H5F_t * f,
+static herr_t H5AC_log_moved_entry(const H5F_t * f,
haddr_t old_addr,
haddr_t new_addr);
@@ -572,8 +572,8 @@ H5AC_create(const H5F_t *f,
aux_ptr->unprotect_dirty_bytes_updates = 0;
aux_ptr->insert_dirty_bytes = 0;
aux_ptr->insert_dirty_bytes_updates = 0;
- aux_ptr->rename_dirty_bytes = 0;
- aux_ptr->rename_dirty_bytes_updates = 0;
+ aux_ptr->move_dirty_bytes = 0;
+ aux_ptr->move_dirty_bytes_updates = 0;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
aux_ptr->d_slist_ptr = NULL;
aux_ptr->d_slist_len = 0;
@@ -1292,7 +1292,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5AC_rename
+ * Function: H5AC_move_entry
*
* Purpose: Use this function to notify the cache that an object's
* file address changed.
@@ -1303,37 +1303,10 @@ done:
* matzke@llnl.gov
* Jul 9 1997
*
- * Modifications:
- * Robb Matzke, 1999-07-27
- * The OLD_ADDR and NEW_ADDR arguments are passed by value.
- *
- * JRM 5/17/04
- * Complete rewrite for the new meta-data cache.
- *
- * JRM - 6/7/04
- * Abstracted the guts of the function to H5C_rename_entry()
- * in H5C.c, and then re-wrote the function as a wrapper for
- * H5C_rename_entry().
- *
- * JRM - 7/5/05
- * Added code to track dirty byte generation, and to trigger
- * clean entry list propagation when it exceeds a user
- * specified threshold. Note that this code only applies in
- * the PHDF5 case. It should have no effect on either the
- * serial or FPHSD5 cases.
- *
- * Note that this code presumes that the renamed entry will
- * be present in all caches -- which it must be at present.
- * To maintain this invarient, only rename entries immediately
- * after you unprotect them.
- *
- * JRM - 6/6/06
- * Added trace file support.
- *
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_addr)
+H5AC_move_entry(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_addr)
{
herr_t result;
herr_t ret_value=SUCCEED; /* Return value */
@@ -1345,7 +1318,7 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad
FILE * trace_file_ptr = NULL;
#endif /* H5AC__TRACE_FILE_ENABLED */
- FUNC_ENTER_NOAPI(H5AC_rename, FAIL)
+ FUNC_ENTER_NOAPI(H5AC_move_entry, FAIL)
HDassert(f);
HDassert(f->shared->cache);
@@ -1355,7 +1328,7 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad
HDassert(H5F_addr_ne(old_addr, new_addr));
#if H5AC__TRACE_FILE_ENABLED
- /* For the rename call, only the old addr and new addr are really
+ /* For the move call, only the old addr and new addr are really
* necessary in the trace file. Include the type id so we don't have to
* look it up. Also write the result to catch occult errors.
*/
@@ -1365,7 +1338,7 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad
( H5C_get_trace_file_ptr(f->shared->cache, &trace_file_ptr) >= 0) &&
( trace_file_ptr != NULL ) ) {
- sprintf(trace, "H5AC_rename 0x%lx 0x%lx %d",
+ sprintf(trace, "H5AC_move_entry 0x%lx 0x%lx %d",
(unsigned long)old_addr,
(unsigned long)new_addr,
(int)(type->id));
@@ -1374,20 +1347,20 @@ H5AC_rename(H5F_t *f, const H5AC_class_t *type, haddr_t old_addr, haddr_t new_ad
#ifdef H5_HAVE_PARALLEL
if ( NULL != (aux_ptr = f->shared->cache->aux_ptr) ) {
- if(H5AC_log_renamed_entry(f, old_addr, new_addr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log renamed entry")
+ if(H5AC_log_moved_entry(f, old_addr, new_addr) < 0)
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTUNPROTECT, FAIL, "can't log moved entry")
}
#endif /* H5_HAVE_PARALLEL */
- result = H5C_rename_entry(f->shared->cache,
+ result = H5C_move_entry(f->shared->cache,
type,
old_addr,
new_addr);
if ( result < 0 ) {
- HGOTO_ERROR(H5E_CACHE, H5E_CANTRENAME, FAIL, \
- "H5C_rename_entry() failed.")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTMOVE, FAIL, \
+ "H5C_move_entry() failed.")
}
#ifdef H5_HAVE_PARALLEL
@@ -1419,7 +1392,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_rename() */
+} /* H5AC_move_entry() */
/*-------------------------------------------------------------------------
@@ -3781,15 +3754,15 @@ done:
/*-------------------------------------------------------------------------
*
- * Function: H5AC_log_renamed_entry()
+ * Function: H5AC_log_moved_entry()
*
- * Purpose: Update the dirty_bytes count for a renamed entry.
+ * Purpose: Update the dirty_bytes count for a moved entry.
*
* WARNING
*
- * At present, the way that the rename call is used ensures
- * that the renamed entry is present in all caches by
- * renaming in a collective operation and immediately after
+ * At present, the way that the move call is used ensures
+ * that the moved entry is present in all caches by
+ * moving in a collective operation and immediately after
* unprotecting the target entry.
*
* This function uses this invarient, and will cause arcane
@@ -3797,17 +3770,17 @@ done:
* becomes impossible, we will have to rework this function
* extensively, and likely include a bit of IPC for
* synchronization. A better option might be to subsume
- * rename in the unprotect operation.
+ * move in the unprotect operation.
*
* Given that the target entry is in all caches, the function
* proceeds as follows:
*
* For processes with mpi rank other 0, it simply checks to
- * see if the entry was dirty prior to the rename, and adds
+ * see if the entry was dirty prior to the move, and adds
* the entries size to the dirty bytes count.
*
* In the process with mpi rank 0, the function first checks
- * to see if the entry was dirty prior to the rename. If it
+ * to see if the entry was dirty prior to the move. If it
* was, and if the entry doesn't appear in the dirtied list
* under its old address, it adds the entry's size to the
* dirty bytes count.
@@ -3829,7 +3802,7 @@ done:
*/
#ifdef H5_HAVE_PARALLEL
static herr_t
-H5AC_log_renamed_entry(const H5F_t *f,
+H5AC_log_moved_entry(const H5F_t *f,
haddr_t old_addr,
haddr_t new_addr)
{
@@ -3841,7 +3814,7 @@ H5AC_log_renamed_entry(const H5F_t *f,
H5AC_slist_entry_t * slist_entry_ptr = NULL;
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_log_renamed_entry, FAIL)
+ FUNC_ENTER_NOAPI(H5AC_log_moved_entry, FAIL)
HDassert( f );
HDassert( f->shared );
@@ -3946,8 +3919,8 @@ H5AC_log_renamed_entry(const H5F_t *f,
aux_ptr->dirty_bytes += entry_size;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- aux_ptr->rename_dirty_bytes += entry_size;
- aux_ptr->rename_dirty_bytes_updates += 1;
+ aux_ptr->move_dirty_bytes += entry_size;
+ aux_ptr->move_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
}
@@ -3973,8 +3946,8 @@ H5AC_log_renamed_entry(const H5F_t *f,
aux_ptr->dirty_bytes += entry_size;
#if H5AC_DEBUG_DIRTY_BYTES_CREATION
- aux_ptr->rename_dirty_bytes += entry_size;
- aux_ptr->rename_dirty_bytes_updates += 1;
+ aux_ptr->move_dirty_bytes += entry_size;
+ aux_ptr->move_dirty_bytes_updates += 1;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
}
@@ -3982,7 +3955,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_log_renamed_entry() */
+} /* H5AC_log_moved_entry() */
#endif /* H5_HAVE_PARALLEL */
@@ -4090,8 +4063,8 @@ H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
(int)(aux_ptr->unprotect_dirty_bytes_updates),
(int)(aux_ptr->insert_dirty_bytes),
(int)(aux_ptr->insert_dirty_bytes_updates),
- (int)(aux_ptr->rename_dirty_bytes),
- (int)(aux_ptr->rename_dirty_bytes_updates));
+ (int)(aux_ptr->move_dirty_bytes),
+ (int)(aux_ptr->move_dirty_bytes_updates));
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
if ( do_barrier ) {
@@ -4152,8 +4125,8 @@ H5AC_propagate_flushed_and_still_clean_entries_list(H5F_t * f,
aux_ptr->unprotect_dirty_bytes_updates = 0;
aux_ptr->insert_dirty_bytes = 0;
aux_ptr->insert_dirty_bytes_updates = 0;
- aux_ptr->rename_dirty_bytes = 0;
- aux_ptr->rename_dirty_bytes_updates = 0;
+ aux_ptr->move_dirty_bytes = 0;
+ aux_ptr->move_dirty_bytes_updates = 0;
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
done:
@@ -4347,8 +4320,8 @@ H5AC_flush_entries(H5F_t *f)
(int)(aux_ptr->unprotect_dirty_bytes_updates),
(int)(aux_ptr->insert_dirty_bytes),
(int)(aux_ptr->insert_dirty_bytes_updates),
- (int)(aux_ptr->rename_dirty_bytes),
- (int)(aux_ptr->rename_dirty_bytes_updates));
+ (int)(aux_ptr->move_dirty_bytes),
+ (int)(aux_ptr->move_dirty_bytes_updates));
#endif /* H5AC_DEBUG_DIRTY_BYTES_CREATION */
/* to prevent "messages from the future" we must synchronize all