summaryrefslogtreecommitdiffstats
path: root/src/H5AC.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-06 14:19:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-06 14:19:28 (GMT)
commitb95c7d1879120c542490c031c70b88f6e5fa7eaa (patch)
treea5f2c84b23c43eb342220d811d2b9d4f69fb738b /src/H5AC.c
parent2c38d7ea30aa8829eb7790f7aa25b16dee93fb8f (diff)
downloadhdf5-b95c7d1879120c542490c031c70b88f6e5fa7eaa.zip
hdf5-b95c7d1879120c542490c031c70b88f6e5fa7eaa.tar.gz
hdf5-b95c7d1879120c542490c031c70b88f6e5fa7eaa.tar.bz2
[svn-r18722] Description:
Bring r18721 from trunk to 1.8 branch: Bring r18720 from metadata journaling merging branch to trunk: Bring changes from metadata journaling branch to 'merging' branch: Rename H5[A]C_mark_pinned_or_protected_entry_dirty() to H5[A]C_mark_entry_dirty() and get rid of H5[A]C_mark_pinned_entry_dirty(). Tested on: FreeBSD/32 6.3 (duty) in debug mode (h5committested on trunk)
Diffstat (limited to 'src/H5AC.c')
-rw-r--r--src/H5AC.c90
1 files changed, 5 insertions, 85 deletions
diff --git a/src/H5AC.c b/src/H5AC.c
index f323d2c..e11b23f 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1225,91 +1225,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5AC_mark_pinned_entry_dirty
- *
- * Purpose: Mark a pinned entry as dirty. The target entry MUST be
- * be pinned, and MUST be unprotected.
- *
- * If the entry has changed size, the function updates
- * data structures for the size change.
- *
- * Return: Non-negative on success/Negative on failure
- *
- * Programmer: John Mainzer
- * 4/11/06
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5AC_mark_pinned_entry_dirty(void *thing, hbool_t size_changed, size_t new_size)
-{
-#if H5AC__TRACE_FILE_ENABLED
- char trace[128] = "";
- FILE * trace_file_ptr = NULL;
-#endif /* H5AC__TRACE_FILE_ENABLED */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5AC_mark_pinned_entry_dirty, FAIL)
-
- /* Sanity check */
- HDassert(thing);
-
-#if H5AC__TRACE_FILE_ENABLED
- /* For the mark pinned entry dirty call, only the addr, size_changed,
- * and new_size are really necessary in the trace file. Write the result
- * to catch occult errors.
- */
- if((H5C_get_trace_file_ptr_from_entry(thing, &trace_file_ptr) >= 0) &&
- (NULL != trace_file_ptr))
- sprintf(trace, "%s 0x%lx %d %d", FUNC,
- (unsigned long)(((H5C_cache_entry_t *)thing)->addr),
- (int)size_changed,
- (int)new_size);
-#endif /* H5AC__TRACE_FILE_ENABLED */
-
-#ifdef H5_HAVE_PARALLEL
-{
- H5AC_info_t *entry_ptr = (H5AC_info_t *)thing;
- H5C_t *cache_ptr = entry_ptr->cache_ptr;
-
- HDassert(cache_ptr);
- HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
-
- if((!entry_ptr->is_dirty) && (NULL != cache_ptr->aux_ptr)) {
- /* Check for usage errors */
- if(!entry_ptr->is_pinned)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry isn't pinned??")
- if(entry_ptr->is_protected)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "Entry is protected??")
-
- if(H5AC_log_dirtied_entry(entry_ptr, entry_ptr->addr, size_changed, new_size) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't log dirtied entry")
- } /* end if */
-}
-#endif /* H5_HAVE_PARALLEL */
-
- if(H5C_mark_pinned_entry_dirty(thing, size_changed, new_size) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned entry dirty")
-
-done:
-#if H5AC__TRACE_FILE_ENABLED
- if(trace_file_ptr)
- HDfprintf(trace_file_ptr, "%s %d\n", trace, (int)ret_value);
-#endif /* H5AC__TRACE_FILE_ENABLED */
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_mark_pinned_entry_dirty() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5AC_mark_pinned_or_protected_entry_dirty
+ * Function: H5AC_mark_entry_dirty
*
* Purpose: Mark a pinned or protected entry as dirty. The target
* entry MUST be either pinned, protected, or both.
*
- * Unlike H5AC_mark_pinned_entry_dirty(), this function does
- * not support size changes.
- *
* Return: Non-negative on success/Negative on failure
*
* Programmer: John Mainzer
@@ -1318,7 +1238,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
+H5AC_mark_entry_dirty(void *thing)
{
#if H5AC__TRACE_FILE_ENABLED
char trace[128] = "";
@@ -1326,7 +1246,7 @@ H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
#endif /* H5AC__TRACE_FILE_ENABLED */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5AC_mark_pinned_or_protected_entry_dirty, FAIL)
+ FUNC_ENTER_NOAPI(H5AC_mark_entry_dirty, FAIL)
/* Sanity check */
HDassert(thing);
@@ -1358,7 +1278,7 @@ H5AC_mark_pinned_or_protected_entry_dirty(void *thing)
}
#endif /* H5_HAVE_PARALLEL */
- if(H5C_mark_pinned_or_protected_entry_dirty(thing) < 0)
+ if(H5C_mark_entry_dirty(thing) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTMARKDIRTY, FAIL, "can't mark pinned or protected entry dirty")
done:
@@ -1368,7 +1288,7 @@ done:
#endif /* H5AC__TRACE_FILE_ENABLED */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5AC_mark_pinned_or_protected_entry_dirty() */
+} /* H5AC_mark_entry_dirty() */
/*-------------------------------------------------------------------------