diff options
author | John Mainzer <mainzer@hdfgroup.org> | 2006-10-18 10:51:26 (GMT) |
---|---|---|
committer | John Mainzer <mainzer@hdfgroup.org> | 2006-10-18 10:51:26 (GMT) |
commit | 2d6bb5932951242d23ccef420a328a033f3b4efa (patch) | |
tree | 3650df339b604f381873f55dcb24af501a83bd0b /src/H5Cprivate.h | |
parent | ce30ee9b28e9b68de817845aa5bc965d35ca8967 (diff) | |
download | hdf5-2d6bb5932951242d23ccef420a328a033f3b4efa.zip hdf5-2d6bb5932951242d23ccef420a328a033f3b4efa.tar.gz hdf5-2d6bb5932951242d23ccef420a328a033f3b4efa.tar.bz2 |
[svn-r12774] Modified flush code in the metadata cache to allow it to
handle flush callbacks which can dirty other entries, and
resize and/or rename the target entry.
This feature is needed by the fractal heap code.
Also added associated test code.
H5Commit tested. Test failed on heping, but the
error appears to be a syntax error in an un-related
file.
Tests on copper & sol passed, along with tests on
phoenix.
Diffstat (limited to 'src/H5Cprivate.h')
-rw-r--r-- | src/H5Cprivate.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index 63393ec..2c97853 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -60,7 +60,7 @@ */ #if H5C_COLLECT_CACHE_STATS -#define H5C_COLLECT_CACHE_ENTRY_STATS 0 +#define H5C_COLLECT_CACHE_ENTRY_STATS 1 #else @@ -116,6 +116,10 @@ typedef struct H5C_t H5C_t; * Note that the space allocated on disk may not be contiguous. */ +#define H5C_CALLBACK__NO_FLAGS_SET 0x0 +#define H5C_CALLBACK__SIZE_CHANGED_FLAG 0x1 +#define H5C_CALLBACK__RENAMED_FLAG 0x2 + typedef void *(*H5C_load_func_t)(H5F_t *f, hid_t dxpl_id, haddr_t addr, @@ -125,7 +129,8 @@ typedef herr_t (*H5C_flush_func_t)(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, - void *thing); + void *thing, + unsigned * flags_ptr); typedef herr_t (*H5C_dest_func_t)(H5F_t *f, void *thing); typedef herr_t (*H5C_clear_func_t)(H5F_t *f, @@ -312,6 +317,13 @@ typedef herr_t (*H5C_log_flush_func_t)(H5C_t * cache_ptr, * the unprotect, the entry's is_dirty flag is reset by flushing * it with the H5C__FLUSH_CLEAR_ONLY_FLAG. * + * flush_in_progress: Boolean flag that is set to true iff the entry + * is in the process of being flushed. This allows the cache + * to detect when a call is the result of a flush callback. + * + * destroy_in_progress: Boolean flag that is set to true iff the entry + * is in the process of being flushed and destroyed. + * * * Fields supporting the hash table: * @@ -425,6 +437,8 @@ typedef struct H5C_cache_entry_t #ifdef H5_HAVE_PARALLEL hbool_t clear_on_unprotect; #endif /* H5_HAVE_PARALLEL */ + hbool_t flush_in_progress; + hbool_t destroy_in_progress; /* fields supporting the hash table: */ |