summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-04-26 13:33:38 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-04-26 13:33:38 (GMT)
commite987b73f58ecea72d034ae39a70ad5d5c3bec9ab (patch)
tree49d8cd6b0bb10d435d1836bc974fe28f34929e34 /src
parent53da2a393f542b046faccba5171689f6f34d89cf (diff)
downloadhdf5-e987b73f58ecea72d034ae39a70ad5d5c3bec9ab.zip
hdf5-e987b73f58ecea72d034ae39a70ad5d5c3bec9ab.tar.gz
hdf5-e987b73f58ecea72d034ae39a70ad5d5c3bec9ab.tar.bz2
[svn-r1216] Changes since 19990423
---------------------- ./src/H5B.c ./src/H5D.c ./src/H5F.c ./src/H5Farray.c ./src/H5Fcore.c ./src/H5Ffamily.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5Fmpio.c ./src/H5Fprivate.h ./src/H5Fsec2.c ./src/H5Fsplit.c ./src/H5Fstdio.c ./src/H5Gnode.c ./src/H5HG.c ./src/H5HL.c ./src/H5O.c Changed H5F_block_read/write() to take a file transfer property list instead of just a parallel I/O mode. This will allow us to pass additional parameters to the I/O functions without having so many arguments to worry about. This fixes a bug I introduced last Friday for parallel HDF5 ./src/H5B.c Fixed decoding of B-tree keys when iterating through the leaves of the B-tree. This fixes a bug for applications that are adding new entries to groups and also listing the groups.
Diffstat (limited to 'src')
-rw-r--r--src/H5B.c26
-rw-r--r--src/H5D.c18
-rw-r--r--src/H5Distore.c6
-rw-r--r--src/H5F.c17
-rw-r--r--src/H5Farray.c6
-rw-r--r--src/H5Fcore.c17
-rw-r--r--src/H5Ffamily.c25
-rw-r--r--src/H5Fistore.c6
-rw-r--r--src/H5Flow.c17
-rw-r--r--src/H5Fmpio.c26
-rw-r--r--src/H5Fprivate.h49
-rw-r--r--src/H5Fsec2.c18
-rw-r--r--src/H5Fsplit.c26
-rw-r--r--src/H5Fstdio.c15
-rw-r--r--src/H5Gnode.c4
-rw-r--r--src/H5HG.c8
-rw-r--r--src/H5HL.c10
-rw-r--r--src/H5O.c10
-rw-r--r--src/H5P.c3
-rw-r--r--src/H5Smpio.c4
20 files changed, 160 insertions, 151 deletions
diff --git a/src/H5B.c b/src/H5B.c
index ffc829e..a27a444 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -312,7 +312,7 @@ H5B_load(H5F_t *f, const haddr_t *addr, const void *_type, void *udata)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
- if (H5F_block_read(f, addr, (hsize_t)size, H5D_XFER_DFLT, bt->page) < 0) {
+ if (H5F_block_read(f, addr, (hsize_t)size, &H5F_xfer_dflt, bt->page) < 0) {
HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL,
"can't read B-tree node");
}
@@ -457,7 +457,7 @@ H5B_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5B_t *bt)
#ifdef HAVE_PARALLEL
H5F_mpio_tas_allsame(f->shared->lf, TRUE); /* only p0 will write */
#endif /* HAVE_PARALLEL */
- if (H5F_block_write(f, addr, (hsize_t)size, H5D_XFER_DFLT,
+ if (H5F_block_write(f, addr, (hsize_t)size, &H5F_xfer_dflt,
bt->page) < 0) {
HRETURN_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL,
"unable to save B-tree node to disk");
@@ -747,7 +747,9 @@ H5B_split(H5F_t *f, const H5B_class_t *type, H5B_t *old_bt,
/*-------------------------------------------------------------------------
* Function: H5B_decode_key
*
- * Purpose: Decode the specified key into native format.
+ * Purpose: Decode the specified key into native format. Do not call
+ * this function if the key is already decoded since it my
+ * decode a stale raw key into the native key.
*
* Return: Non-negative on success/Negative on failure
*
@@ -920,11 +922,11 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
HGOTO_ERROR(H5E_BTREE, H5E_CANTFLUSH, FAIL,
"unable to flush B-tree root node");
}
- if (H5F_block_read(f, addr, (hsize_t)size, H5D_XFER_DFLT, buf) < 0) {
+ if (H5F_block_read(f, addr, (hsize_t)size, &H5F_xfer_dflt, buf) < 0) {
HGOTO_ERROR(H5E_BTREE, H5E_READERROR, FAIL,
"unable to read B-tree root node");
}
- if (H5F_block_write(f, &old_root, (hsize_t)size, H5D_XFER_DFLT, buf) < 0) {
+ if (H5F_block_write(f, &old_root, (hsize_t)size, &H5F_xfer_dflt, buf)<0) {
HGOTO_ERROR(H5E_BTREE, H5E_WRITEERROR, FAIL,
"unable to move B-tree root node");
}
@@ -1516,11 +1518,9 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
}
if (bt->level > 0) {
/* Keep following the left-most child until we reach a leaf node. */
- if (H5B_iterate(f, type, bt->child + 0, udata) < 0) {
+ if ((ret_value=H5B_iterate(f, type, bt->child+0, udata))<0) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTLIST, FAIL,
"unable to list B-tree node");
- } else {
- HRETURN(SUCCEED);
}
} else {
/*
@@ -1548,7 +1548,7 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
child[i] = bt->child[i];
}
for (i=0; i<bt->nchildren+1; i++) {
- H5B_decode_key(f, bt, i);
+ if (!bt->key[i].nkey) H5B_decode_key(f, bt, i);
memcpy(key+i*type->sizeof_nkey, bt->key[i].nkey,
type->sizeof_nkey);
}
@@ -1564,13 +1564,17 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
ret_value = (type->list)(f, key+i*type->sizeof_nkey,
child+i, key+(i+1)*type->sizeof_nkey,
udata);
+ if (ret_value<0) {
+ HGOTO_ERROR(H5E_BTREE, H5E_INTERNAL, FAIL,
+ "iterator function failed");
+ }
}
}
- H5MM_xfree(child);
- H5MM_xfree(key);
}
done:
+ H5MM_xfree(child);
+ H5MM_xfree(key);
FUNC_LEAVE(ret_value);
}
diff --git a/src/H5D.c b/src/H5D.c
index fb9228c..9f6c253 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1442,7 +1442,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
H5T_path_t *tpath = NULL; /*type conversion info */
hid_t src_id = -1, dst_id = -1;/*temporary type atoms */
H5S_conv_t *sconv=NULL; /*space conversion funcs*/
- H5S_sel_iter_t mem_iter; /* mem selection iteration info*/
+ H5S_sel_iter_t mem_iter; /*mem selection iteration info*/
H5S_sel_iter_t bkg_iter; /*background iteration info*/
H5S_sel_iter_t file_iter; /*file selection iter info*/
herr_t ret_value = FAIL; /*return value */
@@ -1451,10 +1451,10 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
size_t dst_type_size; /*size of destination type*/
size_t target_size; /*desired buffer size */
size_t request_nelmts; /*requested strip mine */
- size_t min_elem_out=1; /* Minimum # of elements to output */
+ size_t min_elem_out=1;/*Minimum # of elements to output*/
H5T_bkg_t need_bkg; /*type of background buf*/
H5S_t *free_this_space=NULL; /*data space to free */
- hbool_t must_convert; /*have to xfer the slow way */
+ hbool_t must_convert; /*have to xfer the slow way*/
#if defined(H5S_DEBUG) || defined(H5T_DEBUG)
H5_timer_t timer;
#endif
@@ -1814,7 +1814,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
size_t dst_type_size; /*size of destination type*/
size_t target_size; /*desired buffer size */
size_t request_nelmts; /*requested strip mine */
- size_t min_elem_out=1; /* Minimum # of elements to output */
+ size_t min_elem_out=1;/*Minimum # of elements to output*/
H5T_bkg_t need_bkg; /*type of background buf*/
H5S_t *free_this_space=NULL; /*data space to free */
hbool_t must_convert; /*have to xfer the slow way*/
@@ -2066,7 +2066,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
if (H5T_BKG_YES==need_bkg) {
#ifdef H5S_DEBUG
- H5_timer_begin(&timer);
+ H5_timer_begin(&timer);
#endif
n = (sconv->f->gath)(dataset->ent.file, &(dataset->layout),
&(dataset->create_parms->pline),
@@ -2075,9 +2075,9 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
file_space, &bkg_iter, smine_nelmts,
xfer_parms, bkg_buf/*out*/);
#ifdef H5S_DEBUG
- H5_timer_end(&(sconv->stats[0].bkg_timer), &timer);
- sconv->stats[0].bkg_nbytes += n * dst_type_size;
- sconv->stats[0].bkg_ncalls++;
+ H5_timer_end(&(sconv->stats[0].bkg_timer), &timer);
+ sconv->stats[0].bkg_nbytes += n * dst_type_size;
+ sconv->stats[0].bkg_ncalls++;
#endif
if (n!=smine_nelmts) {
HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL,
@@ -2387,7 +2387,7 @@ H5D_init_storage(H5D_t *dset, const H5S_t *space)
}
} else {
if (H5F_block_write(dset->ent.file, &addr, size,
- H5D_XFER_DFLT, buf)<0) {
+ &H5F_xfer_dflt, buf)<0) {
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL,
"unable to write fill value to dataset");
}
diff --git a/src/H5Distore.c b/src/H5Distore.c
index d3435a9..904caf8 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -872,8 +872,8 @@ H5F_istore_flush_entry (H5F_t *f, H5F_rdcc_ent_t *ent, hbool_t reset)
HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL,
"unable to allocate chunk");
}
- if (H5F_block_write (f, &(udata.addr), udata.key.nbytes, H5D_XFER_DFLT,
- buf)<0) {
+ if (H5F_block_write (f, &(udata.addr), udata.key.nbytes,
+ &H5F_xfer_dflt, buf)<0) {
HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL,
"unable to write raw data to file");
}
@@ -1287,7 +1287,7 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout,
* The chunk exists on disk.
*/
if (H5F_block_read (f, &(udata.addr), udata.key.nbytes,
- H5D_XFER_DFLT, chunk)<0) {
+ &H5F_xfer_dflt, chunk)<0) {
HGOTO_ERROR (H5E_IO, H5E_READERROR, NULL,
"unable to read raw data chunk");
}
diff --git a/src/H5F.c b/src/H5F.c
index f74745a..0b30f27 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -553,7 +553,7 @@ H5F_locate_signature(H5F_low_t *f_handle, const H5F_access_t *access_parms,
H5F_low_size(f_handle, &max_addr);
H5F_addr_reset(addr);
while (H5F_addr_lt(addr, &max_addr)) {
- if (H5F_low_read(f_handle, access_parms, H5D_XFER_DFLT, addr,
+ if (H5F_low_read(f_handle, access_parms, &H5F_xfer_dflt, addr,
H5F_SIGNATURE_LEN, buf) < 0) {
HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read file");
}
@@ -1107,7 +1107,7 @@ H5F_open(const char *name, uintn flags,
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, NULL,
"unable to find signature");
}
- if (H5F_low_read(f->shared->lf, access_parms, H5D_XFER_DFLT,
+ if (H5F_low_read(f->shared->lf, access_parms, &H5F_xfer_dflt,
&(f->shared->boot_addr), fixed_size, buf) < 0) {
HGOTO_ERROR(H5E_IO, H5E_READERROR, NULL,
"unable to read boot block");
@@ -1188,7 +1188,7 @@ H5F_open(const char *name, uintn flags,
assert(variable_size <= sizeof buf);
addr1 = f->shared->boot_addr;
H5F_addr_inc(&addr1, (hsize_t)fixed_size);
- if (H5F_low_read(f->shared->lf, access_parms, H5D_XFER_DFLT,
+ if (H5F_low_read(f->shared->lf, access_parms, &H5F_xfer_dflt,
&addr1, variable_size, buf) < 0) {
HGOTO_ERROR(H5E_FILE, H5E_NOTHDF5, NULL,
"unable to read boot block");
@@ -1684,8 +1684,7 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate)
#ifdef HAVE_PARALLEL
H5F_mpio_tas_allsame(f->shared->lf, TRUE); /* only p0 will write */
#endif
- if (H5F_low_write(f->shared->lf, f->shared->access_parms,
- H5D_XFER_DFLT,
+ if (H5F_low_write(f->shared->lf, f->shared->access_parms, &H5F_xfer_dflt,
&(f->shared->boot_addr), (size_t)(p-buf), buf)<0) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "unable to write header");
}
@@ -2358,7 +2357,7 @@ H5Freopen(hid_t file_id)
*/
herr_t
H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size,
- const H5D_transfer_t xfer_mode, void *buf)
+ const H5F_xfer_t *xfer_parms, void *buf)
{
haddr_t abs_addr;
@@ -2371,7 +2370,7 @@ H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size,
H5F_addr_add(&abs_addr, addr);
/* Read the data */
- if (H5F_low_read(f->shared->lf, f->shared->access_parms, xfer_mode,
+ if (H5F_low_read(f->shared->lf, f->shared->access_parms, xfer_parms,
&abs_addr, (size_t)size, buf) < 0) {
HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "low-level read failed");
}
@@ -2403,7 +2402,7 @@ H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size,
*/
herr_t
H5F_block_write(H5F_t *f, const haddr_t *addr, hsize_t size,
- const H5D_transfer_t xfer_mode, const void *buf)
+ const H5F_xfer_t *xfer_parms, const void *buf)
{
haddr_t abs_addr;
@@ -2420,7 +2419,7 @@ H5F_block_write(H5F_t *f, const haddr_t *addr, hsize_t size,
H5F_addr_add(&abs_addr, addr);
/* Write the data */
- if (H5F_low_write(f->shared->lf, f->shared->access_parms, xfer_mode,
+ if (H5F_low_write(f->shared->lf, f->shared->access_parms, xfer_parms,
&abs_addr, (size_t)size, buf)) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low-level write failed");
}
diff --git a/src/H5Farray.c b/src/H5Farray.c
index 3141007..00446b6 100644
--- a/src/H5Farray.c
+++ b/src/H5Farray.c
@@ -254,8 +254,7 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer,
HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL,
"external data read failed");
}
- } else if (H5F_block_read (f, &addr, elmt_size, xfer->xfer_mode,
- buf)<0) {
+ } else if (H5F_block_read (f, &addr, elmt_size, xfer, buf)<0) {
HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL,
"block read failed");
}
@@ -482,8 +481,7 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer,
HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL,
"external data write failed");
}
- } else if (H5F_block_write(f, &addr, elmt_size, xfer->xfer_mode,
- buf)<0) {
+ } else if (H5F_block_write(f, &addr, elmt_size, xfer, buf)<0) {
HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL,
"block write failed");
}
diff --git a/src/H5Fcore.c b/src/H5Fcore.c
index f50429a..85378b2 100644
--- a/src/H5Fcore.c
+++ b/src/H5Fcore.c
@@ -33,12 +33,11 @@ static H5F_low_t *H5F_core_open(const char *name,
H5F_search_t *key/*out*/);
static herr_t H5F_core_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_core_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf);
static herr_t H5F_core_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size,
- const uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf);
const H5F_low_class_t H5F_LOW_CORE_g[1] = {{
H5F_core_access, /*access method */
@@ -184,8 +183,8 @@ H5F_core_close(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms)
*/
static herr_t
H5F_core_read(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
- const H5D_transfer_t UNUSED xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf)
+ const H5F_xfer_t UNUSED *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf)
{
size_t n;
size_t eof;
@@ -232,8 +231,8 @@ H5F_core_read(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
*/
static herr_t
H5F_core_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t UNUSED xfer_mode,
- const haddr_t *addr, size_t size, const uint8_t *buf)
+ const H5F_xfer_t UNUSED *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf)
{
size_t need_more, na;
size_t increment = 1;
diff --git a/src/H5Ffamily.c b/src/H5Ffamily.c
index 46f9b6a..f2fa689 100644
--- a/src/H5Ffamily.c
+++ b/src/H5Ffamily.c
@@ -43,12 +43,11 @@ static H5F_low_t *H5F_fam_open(const char *name,
H5F_search_t *key/*out*/);
static herr_t H5F_fam_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf);
static herr_t H5F_fam_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size,
- const uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf);
static herr_t H5F_fam_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
const H5F_low_class_t H5F_LOW_FAMILY_g[1] = {{
@@ -313,8 +312,8 @@ H5F_fam_close(H5F_low_t *lf, const H5F_access_t *access_parms)
*/
static herr_t
H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf)
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf)
{
size_t nbytes;
haddr_t cur_addr;
@@ -341,7 +340,7 @@ H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
nbytes = MIN(size, member_size.offset-offset.offset);
cur_addr = offset;
if (H5F_low_read(lf->u.fam.memb[membno],
- access_parms->u.fam.memb_access, xfer_mode,
+ access_parms->u.fam.memb_access, xfer_parms,
&cur_addr, nbytes, buf) < 0) {
HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL,
"can't read from family member");
@@ -378,8 +377,8 @@ H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
*/
static herr_t
H5F_fam_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8_t *buf)
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf)
{
size_t nbytes;
haddr_t cur_addr, max_addr;
@@ -464,7 +463,7 @@ H5F_fam_write(H5F_low_t *lf, const H5F_access_t *access_parms,
/* Write the data to the member */
if (H5F_low_write(lf->u.fam.memb[membno],
- access_parms->u.fam.memb_access, xfer_mode,
+ access_parms->u.fam.memb_access, xfer_parms,
&cur_addr, nbytes, buf) < 0) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
"can't write to family member");
@@ -521,12 +520,12 @@ H5F_fam_flush(H5F_low_t *lf, const H5F_access_t *access_parms)
H5F_addr_inc(&addr3, (hsize_t)1);
H5F_low_seteof(lf->u.fam.memb[0], &addr3); /*prevent a warning */
if (H5F_low_read(lf->u.fam.memb[0], access_parms->u.fam.memb_access,
- H5D_XFER_DFLT, &addr1, 1, buf) < 0) {
+ &H5F_xfer_dflt, &addr1, 1, buf) < 0) {
HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL,
"can't read from first family member");
}
if (H5F_low_write(lf->u.fam.memb[0], access_parms->u.fam.memb_access,
- H5D_XFER_DFLT, &addr1, 1, buf) < 0) {
+ &H5F_xfer_dflt, &addr1, 1, buf) < 0) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,
"can't write to first family member");
}
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index d3435a9..904caf8 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -872,8 +872,8 @@ H5F_istore_flush_entry (H5F_t *f, H5F_rdcc_ent_t *ent, hbool_t reset)
HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL,
"unable to allocate chunk");
}
- if (H5F_block_write (f, &(udata.addr), udata.key.nbytes, H5D_XFER_DFLT,
- buf)<0) {
+ if (H5F_block_write (f, &(udata.addr), udata.key.nbytes,
+ &H5F_xfer_dflt, buf)<0) {
HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL,
"unable to write raw data to file");
}
@@ -1287,7 +1287,7 @@ H5F_istore_lock (H5F_t *f, const H5O_layout_t *layout,
* The chunk exists on disk.
*/
if (H5F_block_read (f, &(udata.addr), udata.key.nbytes,
- H5D_XFER_DFLT, chunk)<0) {
+ &H5F_xfer_dflt, chunk)<0) {
HGOTO_ERROR (H5E_IO, H5E_READERROR, NULL,
"unable to read raw data chunk");
}
diff --git a/src/H5Flow.c b/src/H5Flow.c
index 48c6168..caeb8a5 100644
--- a/src/H5Flow.c
+++ b/src/H5Flow.c
@@ -216,8 +216,8 @@ H5F_low_close(H5F_low_t *lf, const H5F_access_t *access_parms)
*/
herr_t
H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf/*out*/)
{
herr_t ret_value = FAIL;
@@ -228,7 +228,7 @@ H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
assert(buf);
if (lf->type->read) {
- if ((ret_value = (lf->type->read) (lf, access_parms, xfer_mode,
+ if ((ret_value = (lf->type->read) (lf, access_parms, xfer_parms,
addr, size, buf)) < 0) {
HRETURN_ERROR(H5E_IO, H5E_READERROR, ret_value, "read failed");
}
@@ -271,8 +271,8 @@ H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
*/
herr_t
H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8_t *buf)
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf)
{
herr_t ret_value = FAIL;
haddr_t tmp_addr;
@@ -320,7 +320,7 @@ H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
/* Write the data */
if (lf->type->write) {
- if ((ret_value = (lf->type->write) (lf, access_parms, xfer_mode,
+ if ((ret_value = (lf->type->write) (lf, access_parms, xfer_parms,
addr, size, buf)) < 0) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, ret_value, "write failed");
}
@@ -372,12 +372,13 @@ H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms)
if (addr_defined(&(lf->eof)) && H5F_addr_gt(&(lf->eof), &last_byte)) {
last_byte = lf->eof;
last_byte.offset -= 1;
- if (H5F_low_read(lf, access_parms, H5D_XFER_DFLT, &last_byte,
+ if (H5F_low_read(lf, access_parms, &H5F_xfer_dflt, &last_byte,
1, buf) >= 0) {
#ifdef HAVE_PARALLEL
H5F_mpio_tas_allsame( lf, TRUE ); /* only p0 will write */
#endif /* HAVE_PARALLEL */
- H5F_low_write(lf, access_parms, H5D_XFER_DFLT, &last_byte, 1, buf);
+ H5F_low_write(lf, access_parms, &H5F_xfer_dflt, &last_byte,
+ 1, buf);
}
}
/* Invoke the subclass the flush method */
diff --git a/src/H5Fmpio.c b/src/H5Fmpio.c
index 7966c3b..753d6ca 100644
--- a/src/H5Fmpio.c
+++ b/src/H5Fmpio.c
@@ -106,11 +106,11 @@ static H5F_low_t *H5F_mpio_open(const char *name,
H5F_search_t *key/*out*/);
static herr_t H5F_mpio_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode, const haddr_t *addr,
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
size_t size, uint8_t *buf/*out*/);
htri_t H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval );
static herr_t H5F_mpio_write(H5F_low_t *lf, H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode, const haddr_t *addr,
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
size_t size, const uint8_t *buf);
static herr_t H5F_mpio_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_MPIOff_to_haddr(MPI_Offset mpi_off, haddr_t *addr/*out*/);
@@ -126,14 +126,18 @@ const H5F_low_class_t H5F_LOW_MPIO_g[1] = {{
* this is ugly, but removing the const modifier from access_parms
* in the parameter list of the write function in H5F_low_class_t
* would propagate to a lot of functions that don't change that param */
- (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, uint8_t *buf))
+ (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf))
H5F_mpio_read, /*read method */
/* rky 980816
* this is ugly, but removing the const modifier from access_parms
* in the parameter list of the write function in H5F_low_class_t
* would propagate to a lot of functions that don't change that param */
- (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, const uint8_t *buf))
+ (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf))
H5F_mpio_write, /*write method */
H5F_mpio_flush, /*flush method */
@@ -496,11 +500,14 @@ H5F_mpio_close(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms)
* The guts of H5F_mpio_read and H5F_mpio_write
* should be replaced by a single dual-purpose routine.
*
+ * Robb Matzke, 19990421
+ * Changed xfer_mode to xfer_parms for all H5F_*_read() callbacks.
+ *
*-------------------------------------------------------------------------
*/
static herr_t
H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
+ const H5F_xfer_t *xfer_parms,
const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
MPI_Offset mpi_off, mpi_disp;
@@ -576,7 +583,7 @@ H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms,
access_parms->u.mpio.use_types = 0;
/* Read the data. */
- switch (xfer_mode){
+ switch (xfer_parms->xfer_mode){
case H5D_XFER_INDEPENDENT:
case H5D_XFER_DFLT:
mpierr = MPI_File_read_at ( lf->u.mpio.f, mpi_off, (void*) buf,
@@ -744,11 +751,14 @@ H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval )
* rky, 980828
* Added allsame parameter to make all but proc 0 skip the actual write.
*
+ * Robb Matzke, 19990421
+ * Changed xfer_mode to xfer_parms for all H5F_*_write() callbacks.
+ *
*-------------------------------------------------------------------------
*/
static herr_t
H5F_mpio_write(H5F_low_t *lf, H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
+ const H5F_xfer_t *xfer_parms,
const haddr_t *addr, size_t size, const uint8_t *buf)
{
MPI_Offset mpi_off, mpi_disp;
@@ -846,7 +856,7 @@ H5F_mpio_write(H5F_low_t *lf, H5F_access_t *access_parms,
access_parms->u.mpio.use_types = 0;
/* Write the data. */
- switch (xfer_mode){
+ switch (xfer_parms->xfer_mode){
case H5D_XFER_INDEPENDENT:
case H5D_XFER_DFLT:
mpierr = MPI_File_write_at ( lf->u.mpio.f, mpi_off, (void*) buf,
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 0d46f07..e8ab1de 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -320,6 +320,18 @@ typedef struct H5MF_free_t {
hsize_t size; /*size of free area */
} H5MF_free_t;
+/* Dataset transfer property list */
+typedef struct H5F_xfer_t {
+ size_t buf_size; /*max temp buffer size */
+ void *tconv_buf; /*type conversion buffer or null */
+ void *bkg_buf; /*background buffer or null */
+ H5T_bkg_t need_bkg; /*type of background buffer needed */
+ double split_ratios[3];/*B-tree node splitting ratios */
+ uintn cache_hyper; /*cache hyperslab blocks during I/O? */
+ uintn block_limit; /*largest hyperslab block to cache */
+ H5D_transfer_t xfer_mode; /*independent or collective transfer */
+} H5F_xfer_t;
+
/*
* Define the low-level file interface.
*/
@@ -332,11 +344,12 @@ typedef struct H5F_low_class_t {
herr_t (*close)(struct H5F_low_t *lf,
const H5F_access_t *access_parms);
herr_t (*read)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf);
- herr_t (*write)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf);
+ herr_t (*write)(struct H5F_low_t *lf,
+ const H5F_access_t *access_parms,
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf);
herr_t (*flush)(struct H5F_low_t *lf,
const H5F_access_t *access_parms);
herr_t (*extend)(struct H5F_low_t *lf,
@@ -512,18 +525,6 @@ typedef struct H5F_t {
H5F_mtab_t mtab; /* File mount table */
} H5F_t;
-/* Dataset transfer property list */
-typedef struct H5F_xfer_t {
- size_t buf_size; /*max temp buffer size */
- void *tconv_buf; /*type conversion buffer or null */
- void *bkg_buf; /*background buffer or null */
- H5T_bkg_t need_bkg; /*type of background buffer needed */
- double split_ratios[3];/*B-tree node splitting ratios */
- uintn cache_hyper; /*cache hyperslab blocks during I/O? */
- uintn block_limit; /*largest hyperslab block to cache */
- H5D_transfer_t xfer_mode; /*independent or collective transfer */
-} H5F_xfer_t;
-
#ifdef NOT_YET
#define H5F_ENCODE_OFFSET(f,p,o) (H5F_SIZEOF_ADDR(f)==4 ? UINT32ENCODE(p,o) \
: H5F_SIZEOF_ADDR(f)==8 ? UINT64ENCODE(p,o) \
@@ -649,10 +650,9 @@ __DLL__ herr_t H5F_istore_allocate (H5F_t *f,
/* Functions that operate on contiguous storage wrt boot block */
__DLL__ herr_t H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size,
- const H5D_transfer_t xfer_mode, void *buf);
+ const H5F_xfer_t *xfer_parms, void *buf);
__DLL__ herr_t H5F_block_write(H5F_t *f, const haddr_t *addr, hsize_t size,
- const H5D_transfer_t xfer_mode,
- const void *buf);
+ const H5F_xfer_t *xfer_parms, const void *buf);
/* Functions that operate directly on low-level files */
__DLL__ const H5F_low_class_t *H5F_low_class (H5F_driver_t driver);
@@ -672,12 +672,11 @@ __DLL__ H5F_low_t *H5F_low_close(H5F_low_t *lf,
const H5F_access_t *access_parms);
__DLL__ hsize_t H5F_low_size(H5F_low_t *lf, haddr_t *addr);
__DLL__ herr_t H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf);
__DLL__ herr_t H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size,
- const uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf);
__DLL__ herr_t H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
/* Functions that operate on addresses */
diff --git a/src/H5Fsec2.c b/src/H5Fsec2.c
index 07781c1..476d292 100644
--- a/src/H5Fsec2.c
+++ b/src/H5Fsec2.c
@@ -28,13 +28,11 @@ static H5F_low_t *H5F_sec2_open(const char *name,
H5F_search_t *key/*out*/);
static herr_t H5F_sec2_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_sec2_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size,
- uint8_t *buf/*out*/);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf/*out*/);
static herr_t H5F_sec2_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size,
- const uint8_t *buf);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf);
const H5F_low_class_t H5F_LOW_SEC2_g[1] = {{
NULL, /* access method */
@@ -192,8 +190,8 @@ H5F_sec2_close(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms)
*/
static herr_t
H5F_sec2_read(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
- const H5D_transfer_t UNUSED xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf)
+ const H5F_xfer_t UNUSED *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf)
{
ssize_t n;
uint64_t mask;
@@ -297,8 +295,8 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
*/
static herr_t
H5F_sec2_write(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
- const H5D_transfer_t UNUSED xfer_mode,
- const haddr_t *addr, size_t size, const uint8_t *buf)
+ const H5F_xfer_t UNUSED *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf)
{
uint64_t mask;
ssize_t n;
diff --git a/src/H5Fsplit.c b/src/H5Fsplit.c
index e719129..13dcc06 100644
--- a/src/H5Fsplit.c
+++ b/src/H5Fsplit.c
@@ -33,11 +33,10 @@ static H5F_low_t *H5F_split_open(const char *name,
H5F_search_t *key/*out*/);
static herr_t H5F_split_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size,
- uint8_t *buf/*out*/);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf/*out*/);
static herr_t H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
+ const H5F_xfer_t *xfer_parms,
const haddr_t *addr, size_t size,
const uint8_t *buf);
static herr_t H5F_split_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
@@ -212,8 +211,8 @@ H5F_split_close(H5F_low_t *lf, const H5F_access_t *access_parms)
*/
static herr_t
H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf/*out*/)
{
haddr_t tmp_addr;
H5F_low_t *sub = NULL;
@@ -225,7 +224,8 @@ H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
assert(lf);
assert(addr && H5F_addr_defined(addr));
assert(buf);
- assert(xfer_mode != H5D_XFER_COLLECTIVE); /* no collective support */
+ /* no collective support */
+ assert(xfer_parms->xfer_mode != H5D_XFER_COLLECTIVE);
/* Which file to we actually read from? */
if (addr->offset & lf->u.split.mask) {
@@ -239,7 +239,8 @@ H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
}
/* Read the data */
- status = H5F_low_read(sub, sub_parms, xfer_mode, &tmp_addr, size, buf/*out*/);
+ status = H5F_low_read(sub, sub_parms, xfer_parms, &tmp_addr, size,
+ buf/*out*/);
FUNC_LEAVE(status);
}
@@ -262,8 +263,8 @@ H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
*/
static herr_t
H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8_t *buf)
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf)
{
haddr_t tmp_addr;
H5F_low_t *sub = NULL;
@@ -275,7 +276,8 @@ H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
assert(lf);
assert(addr && H5F_addr_defined(addr));
assert(buf);
- assert(xfer_mode != H5D_XFER_COLLECTIVE); /* no collective support */
+ /* no collective support */
+ assert(xfer_parms->xfer_mode != H5D_XFER_COLLECTIVE);
/* Which file to we actually write to? */
if (addr->offset & lf->u.split.mask) {
@@ -289,7 +291,7 @@ H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
}
/* Write the data */
- status = H5F_low_write(sub, sub_parms, xfer_mode, &tmp_addr, size, buf);
+ status = H5F_low_write(sub, sub_parms, xfer_parms, &tmp_addr, size, buf);
FUNC_LEAVE(status);
}
diff --git a/src/H5Fstdio.c b/src/H5Fstdio.c
index 1683dec..6f3e059 100644
--- a/src/H5Fstdio.c
+++ b/src/H5Fstdio.c
@@ -22,11 +22,10 @@ static H5F_low_t *H5F_stdio_open(const char *name,
H5F_search_t *key/*out*/);
static herr_t H5F_stdio_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_stdio_read(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size,
- uint8_t *buf/*out*/);
+ const H5F_xfer_t *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf/*out*/);
static herr_t H5F_stdio_write(H5F_low_t *lf, const H5F_access_t *access_parms,
- const H5D_transfer_t xfer_mode,
+ const H5F_xfer_t *xfer_parms,
const haddr_t *addr, size_t size,
const uint8_t *buf);
static herr_t H5F_stdio_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
@@ -183,8 +182,8 @@ H5F_stdio_close(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms)
*/
static herr_t
H5F_stdio_read(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
- const H5D_transfer_t UNUSED xfer_mode,
- const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
+ const H5F_xfer_t UNUSED *xfer_parms, const haddr_t *addr,
+ size_t size, uint8_t *buf/*out*/)
{
size_t n;
uint64_t mask;
@@ -292,8 +291,8 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
*/
static herr_t
H5F_stdio_write(H5F_low_t *lf, const H5F_access_t UNUSED *access_parms,
- const H5D_transfer_t UNUSED xfer_mode,
- const haddr_t *addr, size_t size, const uint8_t *buf)
+ const H5F_xfer_t UNUSED *xfer_parms, const haddr_t *addr,
+ size_t size, const uint8_t *buf)
{
uint64_t mask;
#ifdef HAVE_FSEEK64
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 09cc40c..091dfe3 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -355,7 +355,7 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr,
#ifdef HAVE_PARALLEL
H5F_mpio_tas_allsame(f->shared->lf, TRUE); /* only p0 will write */
#endif /* HAVE_PARALLEL */
- status = H5F_block_write(f, addr, (hsize_t)size, H5D_XFER_DFLT, buf);
+ status = H5F_block_write(f, addr, (hsize_t)size, &H5F_xfer_dflt, buf);
buf = H5MM_xfree(buf);
if (status < 0)
HRETURN_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL,
@@ -423,7 +423,7 @@ H5G_node_load(H5F_t *f, const haddr_t *addr, const void UNUSED *_udata1,
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
- if (H5F_block_read(f, addr, (hsize_t)size, H5D_XFER_DFLT, buf) < 0) {
+ if (H5F_block_read(f, addr, (hsize_t)size, &H5F_xfer_dflt, buf) < 0) {
HGOTO_ERROR(H5E_SYM, H5E_READERROR, NULL,
"unabel to read symbol table node");
}
diff --git a/src/H5HG.c b/src/H5HG.c
index ac4f8c7..afd6230 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -233,8 +233,8 @@ H5HG_load (H5F_t *f, const haddr_t *addr, const void UNUSED *udata1,
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
- if (H5F_block_read (f, addr, (hsize_t)H5HG_MINSIZE,
- H5D_XFER_DFLT, heap->chunk)<0) {
+ if (H5F_block_read (f, addr, (hsize_t)H5HG_MINSIZE, &H5F_xfer_dflt,
+ heap->chunk)<0) {
HGOTO_ERROR (H5E_HEAP, H5E_READERROR, NULL,
"unable to read global heap collection");
}
@@ -271,7 +271,7 @@ H5HG_load (H5F_t *f, const haddr_t *addr, const void UNUSED *udata1,
"memory allocation failed");
}
if (H5F_block_read (f, &next_addr, (hsize_t)(heap->size-H5HG_MINSIZE),
- H5D_XFER_DFLT, heap->chunk+H5HG_MINSIZE)<0) {
+ &H5F_xfer_dflt, heap->chunk+H5HG_MINSIZE)<0) {
HGOTO_ERROR (H5E_HEAP, H5E_READERROR, NULL,
"unable to read global heap collection");
}
@@ -395,7 +395,7 @@ H5HG_flush (H5F_t *f, hbool_t destroy, const haddr_t *addr, H5HG_heap_t *heap)
if (heap->dirty) {
if (H5F_block_write (f, addr, (hsize_t)(heap->size),
- H5D_XFER_DFLT, heap->chunk)<0) {
+ &H5F_xfer_dflt, heap->chunk)<0) {
HRETURN_ERROR (H5E_HEAP, H5E_WRITEERROR, FAIL,
"unable to write global heap collection to file");
}
diff --git a/src/H5HL.c b/src/H5HL.c
index 9a63846..5d29678 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -205,7 +205,7 @@ H5HL_load(H5F_t *f, const haddr_t *addr, const void UNUSED *udata1,
assert(!udata2);
if (H5F_block_read(f, addr, (hsize_t)H5HL_SIZEOF_HDR(f),
- H5D_XFER_DFLT, hdr) < 0) {
+ &H5F_xfer_dflt, hdr) < 0) {
HRETURN_ERROR(H5E_HEAP, H5E_READERROR, NULL,
"unable to read heap header");
}
@@ -245,7 +245,7 @@ H5HL_load(H5F_t *f, const haddr_t *addr, const void UNUSED *udata1,
}
if (heap->disk_alloc &&
H5F_block_read(f, &(heap->addr), (hsize_t)(heap->disk_alloc),
- H5D_XFER_DFLT, heap->chunk + H5HL_SIZEOF_HDR(f)) < 0) {
+ &H5F_xfer_dflt, heap->chunk + H5HL_SIZEOF_HDR(f)) < 0) {
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL,
"unable to read heap data");
}
@@ -381,7 +381,7 @@ H5HL_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5HL_t *heap)
#endif /* HAVE_PARALLEL */
if (H5F_block_write(f, addr,
(hsize_t)(H5HL_SIZEOF_HDR(f)+heap->disk_alloc),
- H5D_XFER_DFLT, heap->chunk) < 0) {
+ &H5F_xfer_dflt, heap->chunk) < 0) {
HRETURN_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL,
"unable to write heap header and data to file");
}
@@ -390,7 +390,7 @@ H5HL_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5HL_t *heap)
H5F_mpio_tas_allsame( f->shared->lf, TRUE ); /* only p0 writes */
#endif /* HAVE_PARALLEL */
if (H5F_block_write(f, addr, (hsize_t)H5HL_SIZEOF_HDR(f),
- H5D_XFER_DFLT, heap->chunk)<0) {
+ &H5F_xfer_dflt, heap->chunk)<0) {
HRETURN_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL,
"unable to write heap header to file");
}
@@ -398,7 +398,7 @@ H5HL_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5HL_t *heap)
H5F_mpio_tas_allsame( f->shared->lf, TRUE ); /* only p0 writes */
#endif /* HAVE_PARALLEL */
if (H5F_block_write(f, &(heap->addr), (hsize_t)(heap->disk_alloc),
- H5D_XFER_DFLT,
+ &H5F_xfer_dflt,
heap->chunk + H5HL_SIZEOF_HDR(f)) < 0) {
HRETURN_ERROR(H5E_HEAP, H5E_WRITEERROR, FAIL,
"unable to write heap data to file");
diff --git a/src/H5O.c b/src/H5O.c
index 0cb15a9..f70803a 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -352,7 +352,7 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void UNUSED *_udata1,
/* read fixed-lenth part of object header */
hdr_size = H5O_SIZEOF_HDR(f);
- if (H5F_block_read(f, addr, (hsize_t)hdr_size, H5D_XFER_DFLT, buf) < 0) {
+ if (H5F_block_read(f, addr, (hsize_t)hdr_size, &H5F_xfer_dflt, buf) < 0) {
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL,
"unable to read object header");
}
@@ -410,7 +410,7 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void UNUSED *_udata1,
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
- if (H5F_block_read(f, &chunk_addr, (hsize_t)chunk_size, H5D_XFER_DFLT,
+ if (H5F_block_read(f, &chunk_addr, (hsize_t)chunk_size, &H5F_xfer_dflt,
oh->chunk[chunkno].image) < 0) {
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL,
"unable to read object header data");
@@ -553,7 +553,7 @@ H5O_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5O_t *oh)
H5F_mpio_tas_allsame( f->shared->lf, TRUE ); /* only p0 will write */
#endif /* HAVE_PARALLEL */
if (H5F_block_write(f, addr, (hsize_t)H5O_SIZEOF_HDR(f),
- H5D_XFER_DFLT, buf) < 0) {
+ &H5F_xfer_dflt, buf) < 0) {
HRETURN_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL,
"unable to write object header hdr to disk");
}
@@ -628,8 +628,8 @@ H5O_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5O_t *oh)
H5F_mpio_tas_allsame( f->shared->lf, TRUE ); /* only p0 write */
#endif /* HAVE_PARALLEL */
if (H5F_block_write(f, &(oh->chunk[i].addr),
- (hsize_t)(oh->chunk[i].size), H5D_XFER_DFLT,
- oh->chunk[i].image) < 0) {
+ (hsize_t)(oh->chunk[i].size),
+ &H5F_xfer_dflt, oh->chunk[i].image) < 0) {
HRETURN_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL,
"unable to write object header data to disk");
}
diff --git a/src/H5P.c b/src/H5P.c
index e6b871e..3a7f221 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -273,7 +273,8 @@ H5Pclose(hid_t plist_id)
/* Check arguments */
if (plist_id==H5P_DEFAULT)
- HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't close predefined object");
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL,
+ "unable to close predefined object");
if ((type=H5P_get_class (plist_id))<0 || NULL==(plist=H5I_object (plist_id))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
}
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 19cbbbf..1f538db 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -525,13 +525,13 @@ H5S_mpio_spaces_xfer (H5F_t *f, const struct H5O_layout_t *layout,
HRETURN_ERROR(H5E_DATASPACE, H5E_BADTYPE, FAIL,"transfer size overflows size_t");
if (do_write) {
err = H5F_low_write( f->shared->lf, f->shared->access_parms,
- xfer_parms->xfer_mode, &addr, mpi_count, buf );
+ xfer_parms, &addr, mpi_count, buf );
if (err) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL,"MPI write failed");
}
} else {
err = H5F_low_read ( f->shared->lf, f->shared->access_parms,
- xfer_parms->xfer_mode, &addr, mpi_count, buf );
+ xfer_parms, &addr, mpi_count, buf );
if (err) {
HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL,"MPI read failed");
}