summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-06 14:24:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-06 14:24:08 (GMT)
commit772d09112253a0d86f93a551299c2601aebddcca (patch)
treead90ff73b4ea7f5f9d9b490094eb4d77f1789b6e /src/H5AC.c
parent62199d8ca155f98543548e896c8dada2225db3dd (diff)
downloadhdf5-772d09112253a0d86f93a551299c2601aebddcca.zip
hdf5-772d09112253a0d86f93a551299c2601aebddcca.tar.gz
hdf5-772d09112253a0d86f93a551299c2601aebddcca.tar.bz2
[svn-r18723] Description:
Rename H5[A]C_rename to H5[A]C_move_entry. Tested on: Mac OS X/32 10.6.3 (amazon) w/debug & production Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c105
1 files changed, 37 insertions, 68 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index 577dc33..be16126 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -93,7 +93,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.
*
****************************************************************************/
@@ -191,7 +191,7 @@ static herr_t H5AC_receive_and_apply_clean_list(H5F_t * f,
hid_t 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);
#endif /* H5_HAVE_PARALLEL */
@@ -587,8 +587,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;
@@ -1453,7 +1453,7 @@ done:
* The type and addr parameters are retained to avoid source
* code changed, but values other than NULL and HADDR_UNDEF
* respectively are errors. If all goes well, they should
- * be removed, and the function renamed to something more
+ * be removed, and the function moved to something more
* descriptive -- perhaps H5AC_flush_cache.
*
* If the cache contains protected entries, the function will
@@ -1561,8 +1561,8 @@ H5AC_flush(H5F_t *f, hid_t dxpl_id, unsigned flags)
(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
@@ -1981,7 +1981,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5AC_rename
+ * Function: H5AC_move_entry
*
* Purpose: Use this function to notify the cache that an object's
* file address changed.
@@ -1992,41 +1992,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.
- *
- * JRM - 10/18/07
- * Modified code in support of revised cache API needed
- * to permit journaling.
- *
*-------------------------------------------------------------------------
*/
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 */
@@ -2038,7 +2007,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);
@@ -2048,7 +2017,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.
*/
@@ -2058,7 +2027,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));
@@ -2067,20 +2036,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
@@ -2110,7 +2079,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_rename() */
+} /* H5AC_move_entry() */
/*-------------------------------------------------------------------------
@@ -5015,15 +4984,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
@@ -5031,17 +5000,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.
@@ -5063,7 +5032,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)
{
@@ -5075,7 +5044,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 );
@@ -5180,8 +5149,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 */
}
@@ -5207,8 +5176,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 */
}
@@ -5216,7 +5185,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_log_renamed_entry() */
+} /* H5AC_log_moved_entry() */
#endif /* H5_HAVE_PARALLEL */
@@ -5324,8 +5293,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 ) {
@@ -5385,8 +5354,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: