summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-06-04 02:20:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-06-04 02:20:07 (GMT)
commit8ae371469a5441e54c5df3c6a3372bdf6a66fc6b (patch)
tree2e35cfdf61597837f1025502e0f902b8946c916e
parentdbca4a40226186ac4b6185108b917c2489075832 (diff)
downloadhdf5-8ae371469a5441e54c5df3c6a3372bdf6a66fc6b.zip
hdf5-8ae371469a5441e54c5df3c6a3372bdf6a66fc6b.tar.gz
hdf5-8ae371469a5441e54c5df3c6a3372bdf6a66fc6b.tar.bz2
[svn-r5519] Purpose:
Bug Fix Description: The "dirty" flag for symbol table entries and symbol table nodes was not being cleared when they were flushed to the file, causing lots of extra metadata I/O. Solution: Reset the symbol table entry & nodes' flags when thy are flushed to disk. This reduces the number of I/O operations which hit the disk for my test program from 83 to 53 (i.e. from 393 to 53, overall). Platforms tested: Solaris 2.7 (arabica) w/FORTRAN & FreeBSD 4.5 (sleipnir) w/C++
-rw-r--r--release_docs/RELEASE.txt2
-rw-r--r--src/H5Gnode.c12
2 files changed, 13 insertions, 1 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 1ec6ce2..d3b126b 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -36,6 +36,8 @@ Bug Fixes since HDF5-1.4.0
Library
-------
+ * Clear symbol table node "dirty" flag when flushing symbol tables to
+ disk, to reduce I/O calls made & improve performance. QAK - 2002/06/03
* Fixed bug where an object's header could get corrupted in certain obscure
situations where many objects were created in the file. QAK - 2002/05/31
* Fixed bug where read/write intent in file IDs created with H5Freopen
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index eedb8e6..2acd0a4 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -338,7 +338,13 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5G_node_t *sym)
* Look for dirty entries and set the node dirty flag.
*/
for (i=0; i<sym->nsyms; i++) {
- if (sym->entry[i].dirty) sym->dirty = TRUE;
+ if (sym->entry[i].dirty) {
+ /* Set the node's dirty flag */
+ sym->dirty = TRUE;
+
+ /* Reset the entry's dirty flag */
+ sym->entry[i].dirty=FALSE;
+ } /* end if */
}
/*
@@ -376,7 +382,11 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5G_node_t *sym)
"unable to write symbol table node to the file");
if (buf)
H5FL_BLK_FREE(symbol_node,buf);
+
+ /* Reset the node's dirty flag */
+ sym->dirty = FALSE;
}
+
/*
* Destroy the symbol node? This might happen if the node is being
* preempted from the cache.