summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
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 /src/H5Gnode.c
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++
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r--src/H5Gnode.c12
1 files changed, 11 insertions, 1 deletions
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.