summaryrefslogtreecommitdiffstats
path: root/test/cache_common.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-03-24 17:52:17 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-03-24 17:52:17 (GMT)
commit667b34c713318b7a70af5c9b63fccb9ac653a201 (patch)
treeb887d45b649be5e87326786056e046f967bc01bf /test/cache_common.h
parentadf47d11b821bbdd40ec7ebc0a4e6a69781e6ca7 (diff)
downloadhdf5-667b34c713318b7a70af5c9b63fccb9ac653a201.zip
hdf5-667b34c713318b7a70af5c9b63fccb9ac653a201.tar.gz
hdf5-667b34c713318b7a70af5c9b63fccb9ac653a201.tar.bz2
[svn-r16600] Description:
Ensure that metadata cache entries with flush dependencies are written to the file in the correct order (for serial I/O, at least). 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/C++ & FORTRAN, w/threadsafe, in debug 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 Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'test/cache_common.h')
-rw-r--r--test/cache_common.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/cache_common.h b/test/cache_common.h
index fd00db8..1284ea3 100644
--- a/test/cache_common.h
+++ b/test/cache_common.h
@@ -127,7 +127,8 @@
#define FLUSH_OP__DIRTY 1
#define FLUSH_OP__RESIZE 2
#define FLUSH_OP__RENAME 3
-#define FLUSH_OP__MAX_OP 3
+#define FLUSH_OP__ORDER 4
+#define FLUSH_OP__MAX_OP 4
#define MAX_FLUSH_OPS 10 /* Maximum number of flush operations
* that can be associated with a
@@ -144,6 +145,7 @@ typedef struct flush_op
* FLUSH_OP__DIRTY
* FLUSH_OP__RESIZE
* FLUSH_OP__RENAME
+ * FLUSH_OP__ORDER
*/
int type; /* type code of the cache entry that
* is the target of the operation.
@@ -183,6 +185,10 @@ typedef struct flush_op
* FLUSH_OP__RENAME operation.
* Unused elsewhere.
*/
+ unsigned * order_ptr; /* Pointer to outside counter for
+ * recording the order of entries
+ * flushed.
+ */
} flush_op;
typedef struct test_entry_t
@@ -300,6 +306,7 @@ typedef struct test_entry_t
* dependency children
*/
unsigned flush_dep_height; /* flush dependency height of entry */
+ unsigned flush_order; /* Order that entry was flushed in */
} test_entry_t;
/* The following is a cut down copy of the hash table manipulation
@@ -471,6 +478,7 @@ struct expected_entry_status
* dependency children
*/
unsigned flush_dep_height; /* flush dependency height of entry */
+ int flush_order; /* flush order of entry */
};
@@ -602,7 +610,8 @@ void add_flush_op(int target_type,
int type,
int idx,
hbool_t flag,
- size_t size);
+ size_t size,
+ unsigned * order);
void addr_to_type_and_index(haddr_t addr,