diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-07 04:17:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-07 04:17:35 (GMT) |
commit | 9f60f016ab71cf8ce39c859fd9eb61c6fca35d63 (patch) | |
tree | 0ddbcb2f8707b578af22c62748420b9e3c19177b /src/H5FSpkg.h | |
parent | 504c67846e6a4cc5706403bf21a9ae4f07aae7b4 (diff) | |
download | hdf5-9f60f016ab71cf8ce39c859fd9eb61c6fca35d63.zip hdf5-9f60f016ab71cf8ce39c859fd9eb61c6fca35d63.tar.gz hdf5-9f60f016ab71cf8ce39c859fd9eb61c6fca35d63.tar.bz2 |
[svn-r15800] Description:
Bring file free space branch changes through r15795 into trunk, which
includes a fair bit of code cleanup & rearrangement along with a couple of
bug fixes also.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5FSpkg.h')
-rw-r--r-- | src/H5FSpkg.h | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h index 9f3409f..1786b44 100644 --- a/src/H5FSpkg.h +++ b/src/H5FSpkg.h @@ -28,9 +28,15 @@ #ifndef _H5FSpkg_H #define _H5FSpkg_H -/* Uncomment this macro to enable extra sanity checking */ +/* Uncomment this macro to enable debugging output for free space manager */ /* #define H5FS_DEBUG */ +/* Uncomment this macro to enable debugging output for free space sections */ +/* #define H5FS_SINFO_DEBUG */ + +/* Uncomment this macro to enable extra sanity checking */ +/* #define H5FS_DEBUG_ASSERT */ + /* Get package's private header */ #include "H5FSprivate.h" /* File free space */ @@ -110,7 +116,7 @@ typedef struct H5FS_node_t { H5SL_t *sect_list; /* Skip list to hold pointers to actual free list section node */ } H5FS_node_t; -/* Information about sections managed */ +/* Free space section info */ typedef struct H5FS_sinfo_t { /* Information for H5AC cache functions, _must_ be first field in structure */ H5AC_info_t cache_info; @@ -119,6 +125,7 @@ typedef struct H5FS_sinfo_t { H5FS_bin_t *bins; /* Array of lists of lists of free sections */ /* Computed/cached values */ + hbool_t dirty; /* Whether this info in memory is out of sync w/info in file */ unsigned nbins; /* Number of bins */ size_t serial_size; /* Total size of all serializable sections */ size_t tot_size_count; /* Total number of differently sized sections */ @@ -133,7 +140,7 @@ typedef struct H5FS_sinfo_t { H5SL_t *merge_list; /* Skip list to hold sections for detecting merges */ } H5FS_sinfo_t; -/* Main free space info */ +/* Free space header info */ struct H5FS_t { /* Information for H5AC cache functions, _must_ be first field in structure */ H5AC_info_t cache_info; @@ -159,8 +166,17 @@ struct H5FS_t { hsize_t alloc_sect_size; /* Allocated size of the section info in the file */ /* Computed/cached values */ + unsigned rc; /* Count of outstanding references to struct */ haddr_t addr; /* Address of free space header on disk */ H5FS_sinfo_t *sinfo; /* Section information */ + unsigned sinfo_lock_count; /* # of times the section info has been locked */ + hbool_t sinfo_protected; /* Whether the section info was protected when locked */ + hbool_t sinfo_modified; /* Whether the section info has been modified while locked */ + H5AC_protect_t sinfo_accmode; /* Access mode for protecting the section info */ + size_t max_cls_serial_size; /* Max. additional size of serialized form of section */ + hsize_t threshold; /* Threshold for alignment */ + hsize_t alignment; /* Alignment */ + /* Memory data structures (not stored directly) */ H5FS_section_class_t *sect_cls; /* Array of section classes for this free list */ @@ -197,6 +213,9 @@ H5FL_EXTERN(H5FS_t); /* Free space manager header routines */ H5_DLL H5FS_t *H5FS_new(size_t nclasses, const H5FS_section_class_t *classes[], void *cls_init_udata); +H5_DLL herr_t H5FS_incr(H5F_t *f, H5FS_t *fspace); +H5_DLL herr_t H5FS_decr(H5F_t *f, H5FS_t *fspace); +H5_DLL herr_t H5FS_dirty(H5F_t *f, H5FS_t *fspace); /* Free space section routines */ H5_DLL H5FS_sinfo_t *H5FS_sinfo_new(H5F_t *f, H5FS_t *fspace); @@ -211,5 +230,11 @@ H5_DLL herr_t H5FS_assert(const H5FS_t *fspace); H5_DLL herr_t H5FS_sect_assert(const H5FS_t *fspace); #endif /* H5FS_DEBUG */ +/* Testing routines */ +#ifdef H5FS_TESTING +H5_DLL herr_t H5FS_get_cparam_test(const H5FS_t *fh, H5FS_create_t *cparam); +H5_DLL int H5FS_cmp_cparam_test(const H5FS_create_t *cparam1, const H5FS_create_t *cparam2); +#endif /* H5FS_TESTING */ + #endif /* _H5FSpkg_H */ |