summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-04-14 04:37:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-04-14 04:37:04 (GMT)
commit17937903c47d1db67da1bf0c638304b32c62aba0 (patch)
treec7d152ccbc5ed9795454818b764260f6975c548a /src
parentcfd1db1786ef580951efe1a6ff8e301b30484573 (diff)
downloadhdf5-17937903c47d1db67da1bf0c638304b32c62aba0.zip
hdf5-17937903c47d1db67da1bf0c638304b32c62aba0.tar.gz
hdf5-17937903c47d1db67da1bf0c638304b32c62aba0.tar.bz2
[svn-r6648] Purpose:
New code. Description: Added internal routine to clear the sieve buffer if it overlaps a address- length range in the file. This is used currently to clear the sieve buffer when an object is deleted from the file. Platforms tested: FreeBSD 4.8 (sleipnir) w/C++ Linux 2.4 (burrwhite) w/FORTRAN Solaris 2.7 (arabica) w/FORTRAN IRIX64 6.5 (modi4) w/parallel & FORTRAN (h5committest not run due to my ongoing difficulties with C++ on burrwhite).
Diffstat (limited to 'src')
-rw-r--r--src/H5F.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 8fd0c63..cfa5783 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -20,8 +20,6 @@
* *
****************************************************************************/
-/* $Id$ */
-
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
/* Predefined file drivers */
@@ -2514,6 +2512,9 @@ H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags)
FUNC_ENTER_NOINIT(H5F_flush);
+ /* Sanity check arguments */
+ assert(f);
+
/*
* Nothing to do if the file is read only. This determination is
* made at the shared open(2) flags level, implying that opening a
@@ -4091,6 +4092,44 @@ H5F_addr_pack(H5F_t UNUSED *f, haddr_t *addr_p/*out*/,
/*-------------------------------------------------------------------------
+ * Function: H5F_sieve_overlap_clear
+ *
+ * Purpose: Checks for an address range's overlap with the sieve buffer
+ * and resets the sieve buffer if it overlaps.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Wednesday, March 19, 2003
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_sieve_overlap_clear(H5F_t *f, haddr_t addr, hsize_t size)
+{
+ herr_t ret_value=SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5F_sieve_overlap_clear,FAIL);
+
+ /* Sanity check arguments */
+ assert(f);
+
+ /* Check for the address range overlapping with the sieve buffer */
+ if(H5F_addr_overlap(f->shared->sieve_loc,f->shared->sieve_size,addr,size)) {
+ /* Reset sieve information */
+ f->shared->sieve_loc=HADDR_UNDEF;
+ f->shared->sieve_size=0;
+ f->shared->sieve_dirty=0;
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value);
+} /* H5F_sieve_overlap_clear() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_debug
*
* Purpose: Prints a file header to the specified stream. Each line