summaryrefslogtreecommitdiffstats
path: root/src/H5SMpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-27 20:27:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-27 20:27:13 (GMT)
commit9f90e06bd0b400f5b5d9631eb680c00da3199894 (patch)
treea707a89c16689e8dee5eb927ffacd7ec5a7de91d /src/H5SMpkg.h
parent2f5164b1047a705e81fff46f1b8107426cbcc61b (diff)
downloadhdf5-9f90e06bd0b400f5b5d9631eb680c00da3199894.zip
hdf5-9f90e06bd0b400f5b5d9631eb680c00da3199894.tar.gz
hdf5-9f90e06bd0b400f5b5d9631eb680c00da3199894.tar.bz2
[svn-r18917] Description:
Bring r18911 (plus some adaptions to match the code on the trunk) from the metadata journaling "merging" branch to the trunk: More general changes to align trunk with eventual changes from metadata journaling branch. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) 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-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5SMpkg.h')
-rwxr-xr-xsrc/H5SMpkg.h34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/H5SMpkg.h b/src/H5SMpkg.h
index 6594912..84c2bf4 100755
--- a/src/H5SMpkg.h
+++ b/src/H5SMpkg.h
@@ -62,11 +62,6 @@
+ MAX(H5SM_HEAP_LOC_SIZE, H5SM_OH_LOC_SIZE(f)) /* Entry */ \
)
-#define H5SM_TABLE_SIZE(f) ( \
- (unsigned)H5_SIZEOF_MAGIC /* Signature */ \
- + (unsigned)H5SM_SIZEOF_CHECKSUM /* Checksum */ \
- )
-
#define H5SM_INDEX_HEADER_SIZE(f) ( \
(unsigned)1 /* Whether index is a list or B-tree */ \
+ (unsigned)1 /* Version of index format */ \
@@ -77,10 +72,26 @@
+ H5F_SIZEOF_ADDR(f) /* Address of heap */ \
)
+/* Format overhead for all SOHM tree metadata in the file */
+#define H5SM_METADATA_PREFIX_SIZE ( \
+ H5_SIZEOF_MAGIC /* Signature */ \
+ + H5SM_SIZEOF_CHECKSUM /* Checksum */ \
+ )
+
+#define H5SM_TABLE_SIZE(f) ( \
+ /* General metadata fields */ \
+ H5SM_METADATA_PREFIX_SIZE \
+ \
+ /* Indices */ \
+ + ((f)->shared->sohm_nindexes * H5SM_INDEX_HEADER_SIZE(f)) \
+ )
+
#define H5SM_LIST_SIZE(f, num_mesg) ( \
- (unsigned) H5_SIZEOF_MAGIC /* Signature */ \
- + (H5SM_SOHM_ENTRY_SIZE(f) * num_mesg) /* Message entries */ \
- + (unsigned)H5SM_SIZEOF_CHECKSUM /* Checksum */ \
+ /* General metadata fields */ \
+ H5SM_METADATA_PREFIX_SIZE \
+ \
+ /* Message entries */ \
+ + (H5SM_SOHM_ENTRY_SIZE(f) * num_mesg) \
)
#define H5SM_B2_NODE_SIZE 512
@@ -154,6 +165,7 @@ typedef enum {
/* Typedef for a SOHM index header */
typedef struct {
+/* Stored */
unsigned mesg_types; /* Bit flag vector of message types */
size_t min_mesg_size; /* number of messages being tracked */
size_t list_max; /* >= this many messages, index with a B-tree */
@@ -162,6 +174,9 @@ typedef struct {
H5SM_index_type_t index_type; /* Is the index a list or a B-tree? */
haddr_t index_addr; /* Address of the actual index (list or B-tree) */
haddr_t heap_addr; /* Address of the fheap used to store shared messages */
+
+/* Not stored */
+ size_t list_size; /* Size of list index on disk */
} H5SM_index_header_t;
/* Typedef for a SOHM list */
@@ -173,12 +188,12 @@ typedef struct {
H5SM_sohm_t *messages; /* Actual list, stored as an array */
} H5SM_list_t;
-
/* Typedef for shared object header message master table */
struct H5SM_master_table_t {
/* Information for H5AC cache functions, _must_ be first field in structure */
H5AC_info_t cache_info;
+ size_t table_size; /* Size of table on disk */
unsigned num_indexes; /* Number of indexes */
H5SM_index_header_t *indexes; /* Array of num_indexes indexes */
};
@@ -222,7 +237,6 @@ typedef struct H5SM_bt2_ctx_t {
/* Callback info for loading a shared message table index into the cache */
typedef struct H5SM_table_cache_ud_t {
H5F_t *f; /* File that shared message index stored as a table is in */
- size_t table_size; /* Size of SOHM master table in file */
} H5SM_table_cache_ud_t;
/* Callback info for loading a shared message list index into the cache */