summaryrefslogtreecommitdiffstats
path: root/src/H5Fistore.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-09-28 14:20:21 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-09-28 14:20:21 (GMT)
commitc0941f01e38812435e8dd2052d3d7b5deab045dc (patch)
tree0d8a314e12f0f26ebb1cb1326ed5169fa09fab53 /src/H5Fistore.c
parentb1df4a74cd6a4e620a7f73cedce611988ca151d8 (diff)
downloadhdf5-c0941f01e38812435e8dd2052d3d7b5deab045dc.zip
hdf5-c0941f01e38812435e8dd2052d3d7b5deab045dc.tar.gz
hdf5-c0941f01e38812435e8dd2052d3d7b5deab045dc.tar.bz2
[svn-r726] Changes since 19980924
---------------------- ./MANIFEST ./src/H5B.c ./src/H5Bprivate.h ./src/H5G.c ./src/H5Gnode.c ./src/H5Gprivate.h ./test/Makefile.in ./test/unlink.c [NEW] Finished H5Gunlink() and H5Grename(). ./src/H5F.c ./src/H5Fistore.c ./src/H5Fprivate.h Removed the last memcpy() from the chunk cache. ./src/H5Fistore.c The offset of a chunk within a dataset is an 8-byte quantity per dimension instead of 4 bytes. ./src/H5HL.c Fixed infinite loops in H5HL_remove().
Diffstat (limited to 'src/H5Fistore.c')
-rw-r--r--src/H5Fistore.c92
1 files changed, 50 insertions, 42 deletions
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 278bca9..31f1ec8 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -188,7 +188,7 @@ H5F_istore_sizeof_rkey(H5F_t __unused__ *f, const void *_udata)
nbytes = 4 + /*storage size */
4 + /*filter mask */
- udata->mesg.ndims * 4; /*dimension indices */
+ udata->mesg.ndims*8; /*dimension indices */
return nbytes;
}
@@ -230,7 +230,7 @@ H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
UINT32DECODE(raw, key->nbytes);
UINT32DECODE(raw, key->filter_mask);
for (i = 0; i < ndims; i++) {
- UINT32DECODE(raw, key->offset[i]);
+ UINT64DECODE(raw, key->offset[i]);
}
FUNC_LEAVE(SUCCEED);
@@ -273,7 +273,7 @@ H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
UINT32ENCODE(raw, key->nbytes);
UINT32ENCODE(raw, key->filter_mask);
for (i = 0; i < ndims; i++) {
- UINT32ENCODE(raw, key->offset[i]);
+ UINT64ENCODE(raw, key->offset[i]);
}
FUNC_LEAVE(SUCCEED);
@@ -870,45 +870,6 @@ H5F_istore_flush_entry (H5F_t *f, H5F_rdcc_ent_t *ent, hbool_t reset)
FUNC_LEAVE (ret_value);
}
-
-/*-------------------------------------------------------------------------
- * Function: H5F_istore_flush
- *
- * Purpose: Writes all dirty chunks to disk but does not remove them from
- * the cache.
- *
- * Return: Success: SUCCEED
- *
- * Failure: FAIL
- *
- * Programmer: Robb Matzke
- * Thursday, May 21, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5F_istore_flush (H5F_t *f)
-{
- H5F_rdcc_t *rdcc = &(f->shared->rdcc);
- intn nerrors=0;
- H5F_rdcc_ent_t *ent=NULL;
-
- FUNC_ENTER (H5F_istore_flush, FAIL);
-
- for (ent=rdcc->head; ent; ent=ent->next) {
- if (H5F_istore_flush_entry(f, ent, FALSE)<0) {
- nerrors++;
- }
- }
- if (nerrors) {
- HRETURN_ERROR (H5E_IO, H5E_CANTFLUSH, FAIL,
- "unable to flush one or more raw data chunks");
- }
- FUNC_LEAVE (SUCCEED);
-}
-
/*-------------------------------------------------------------------------
* Function: H5F_istore_preempt
*
@@ -968,6 +929,53 @@ H5F_istore_preempt (H5F_t *f, H5F_rdcc_ent_t *ent)
/*-------------------------------------------------------------------------
+ * Function: H5F_istore_flush
+ *
+ * Purpose: Writes all dirty chunks to disk and optionally preempts them
+ * from the cache.
+ *
+ * Return: Success: SUCCEED
+ *
+ * Failure: FAIL
+ *
+ * Programmer: Robb Matzke
+ * Thursday, May 21, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_istore_flush (H5F_t *f, hbool_t preempt)
+{
+ H5F_rdcc_t *rdcc = &(f->shared->rdcc);
+ intn nerrors=0;
+ H5F_rdcc_ent_t *ent=NULL, *next=NULL;
+
+ FUNC_ENTER (H5F_istore_flush, FAIL);
+
+ for (ent=rdcc->head; ent; ent=next) {
+ next = ent->next;
+ if (preempt) {
+ if (H5F_istore_preempt(f, ent)<0) {
+ nerrors++;
+ }
+ } else {
+ if (H5F_istore_flush_entry(f, ent, FALSE)<0) {
+ nerrors++;
+ }
+ }
+ }
+
+ if (nerrors) {
+ HRETURN_ERROR (H5E_IO, H5E_CANTFLUSH, FAIL,
+ "unable to flush one or more raw data chunks");
+ }
+ FUNC_LEAVE (SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_istore_dest
*
* Purpose: Destroy the entire chunk cache by flushing dirty entries,