diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-10-24 18:18:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-10-24 18:18:09 (GMT) |
commit | 6aa0dd16204aa1f4f0ea5d15ba8b2d7e6a381278 (patch) | |
tree | b8207a413721b6fee5b2592a7be09091d421dcc7 | |
parent | ad0bc2660401e7334e9bb8fe12d6946f655a5135 (diff) | |
download | hdf5-6aa0dd16204aa1f4f0ea5d15ba8b2d7e6a381278.zip hdf5-6aa0dd16204aa1f4f0ea5d15ba8b2d7e6a381278.tar.gz hdf5-6aa0dd16204aa1f4f0ea5d15ba8b2d7e6a381278.tar.bz2 |
[svn-r2722] Purpose:
Feature symmetry
Description:
A while ago I needed to get the 'type' of data being accessed during writes
to the VFL driver, so I put in code to get the information down there.
Albert asked for the same information during reads, so I've added that in.
Tested:
FreeBSD 4.1.1 (hawkwind)
-rw-r--r-- | src/H5B.c | 2 | ||||
-rw-r--r-- | src/H5Dcontig.c | 16 | ||||
-rw-r--r-- | src/H5Distore.c | 2 | ||||
-rw-r--r-- | src/H5Dseq.c | 2 | ||||
-rw-r--r-- | src/H5F.c | 14 | ||||
-rw-r--r-- | src/H5FD.c | 17 | ||||
-rw-r--r-- | src/H5FDcore.c | 4 | ||||
-rw-r--r-- | src/H5FDdpss.c | 4 | ||||
-rw-r--r-- | src/H5FDfamily.c | 6 | ||||
-rw-r--r-- | src/H5FDgass.c | 4 | ||||
-rw-r--r-- | src/H5FDlog.c | 4 | ||||
-rw-r--r-- | src/H5FDmpio.c | 4 | ||||
-rw-r--r-- | src/H5FDmulti.c | 9 | ||||
-rw-r--r-- | src/H5FDprivate.h | 2 | ||||
-rw-r--r-- | src/H5FDpublic.h | 4 | ||||
-rw-r--r-- | src/H5FDsec2.c | 4 | ||||
-rw-r--r-- | src/H5FDsrb.c | 6 | ||||
-rw-r--r-- | src/H5FDstdio.c | 5 | ||||
-rw-r--r-- | src/H5FDstream.c | 3 | ||||
-rw-r--r-- | src/H5Farray.c | 2 | ||||
-rw-r--r-- | src/H5Fcontig.c | 16 | ||||
-rw-r--r-- | src/H5Fistore.c | 2 | ||||
-rw-r--r-- | src/H5Fpkg.h | 2 | ||||
-rw-r--r-- | src/H5Fprivate.h | 2 | ||||
-rw-r--r-- | src/H5Fseq.c | 2 | ||||
-rw-r--r-- | src/H5Gnode.c | 2 | ||||
-rw-r--r-- | src/H5HG.c | 4 | ||||
-rw-r--r-- | src/H5HL.c | 4 | ||||
-rw-r--r-- | src/H5O.c | 4 | ||||
-rw-r--r-- | tools/h5debug.c | 2 |
30 files changed, 81 insertions, 73 deletions
@@ -336,7 +336,7 @@ H5B_load(H5F_t *f, 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, H5P_DEFAULT, bt->page)<0) { + if (H5F_block_read(f, H5FD_MEM_BTREE, addr, (hsize_t)size, H5P_DEFAULT, bt->page)<0) { HGOTO_ERROR(H5E_BTREE, H5E_READERROR, NULL, "can't read B-tree node"); } diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index b4f4ab1..fa01acd 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -43,7 +43,7 @@ static intn interface_initialize_g = 0; *------------------------------------------------------------------------- */ herr_t -H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, +H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, void *_buf/*out*/) { uint8_t *buf = (uint8_t*)_buf; /*cast for arithmetic */ @@ -87,7 +87,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, } /* end if */ /* Read directly into the user's buffer */ - if (H5F_block_read(f, addr, size, dxpl_id, buf)<0) { + if (H5F_block_read(f, type, addr, size, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -117,7 +117,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -134,7 +134,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, else { /* Check if we can actually hold the I/O request in the sieve buffer */ if(size>f->shared->sieve_buf_size) { - if (H5F_block_read(f, addr, size, dxpl_id, buf)<0) { + if (H5F_block_read(f, type, addr, size, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -157,7 +157,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -171,7 +171,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, } /* end else */ } /* end if */ else { - if (H5F_block_read(f, addr, size, dxpl_id, buf)<0) { + if (H5F_block_read(f, type, addr, size, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -278,7 +278,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -319,7 +319,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } diff --git a/src/H5Distore.c b/src/H5Distore.c index 42c6aad..890ea58 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -1418,7 +1418,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, /* * The chunk exists on disk. */ - if (H5F_block_read(f, udata.addr, udata.key.nbytes, H5P_DEFAULT, + if (H5F_block_read(f, H5FD_MEM_DRAW, udata.addr, udata.key.nbytes, H5P_DEFAULT, chunk)<0) { HGOTO_ERROR (H5E_IO, H5E_READERROR, NULL, "unable to read raw data chunk"); diff --git a/src/H5Dseq.c b/src/H5Dseq.c index db1a8c2..4181823 100644 --- a/src/H5Dseq.c +++ b/src/H5Dseq.c @@ -162,7 +162,7 @@ H5F_seq_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, "external data read failed"); } } else { - if (H5F_contig_read(f, addr, seq_len, dxpl_id, buf)<0) { + if (H5F_contig_read(f, H5FD_MEM_DRAW, addr, seq_len, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -600,7 +600,7 @@ H5F_locate_signature(H5FD_t *file) HRETURN_ERROR(H5E_IO, H5E_CANTINIT, HADDR_UNDEF, "unable to set EOA value for file signature"); } - if (H5FD_read(file, H5P_DEFAULT, addr, H5F_SIGNATURE_LEN, buf)<0) { + if (H5FD_read(file, H5FD_MEM_SUPER, H5P_DEFAULT, addr, H5F_SIGNATURE_LEN, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_CANTINIT, HADDR_UNDEF, "unable to read file signature"); } @@ -1108,7 +1108,7 @@ H5F_open(const char *name, uintn flags, hid_t fcpl_id, hid_t fapl_id) "unable to find file signature"); } if (H5FD_set_eoa(lf, shared->boot_addr+fixed_size)<0 || - H5FD_read(lf, H5P_DEFAULT, shared->boot_addr, fixed_size, buf)<0) { + H5FD_read(lf, H5FD_MEM_SUPER, H5P_DEFAULT, shared->boot_addr, fixed_size, buf)<0) { HGOTO_ERROR(H5E_FILE, H5E_READERROR, NULL, "unable to read superblock"); } @@ -1196,7 +1196,7 @@ H5F_open(const char *name, uintn flags, hid_t fcpl_id, hid_t fapl_id) H5G_SIZEOF_ENTRY(file); /*root group ptr*/ assert(variable_size<=sizeof buf); if (H5FD_set_eoa(lf, shared->boot_addr+fixed_size+variable_size)<0 || - H5FD_read(lf, H5P_DEFAULT, shared->boot_addr+fixed_size, + H5FD_read(lf, H5FD_MEM_SUPER, H5P_DEFAULT, shared->boot_addr+fixed_size, variable_size, buf)<0) { HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read superblock"); @@ -1215,7 +1215,7 @@ H5F_open(const char *name, uintn flags, hid_t fcpl_id, hid_t fapl_id) if (H5F_addr_defined(shared->driver_addr)) { haddr_t drv_addr = shared->base_addr + shared->driver_addr; if (H5FD_set_eoa(lf, drv_addr+16)<0 || - H5FD_read(lf, H5P_DEFAULT, drv_addr, 16, buf)<0) { + H5FD_read(lf, H5FD_MEM_SUPER, H5P_DEFAULT, drv_addr, 16, buf)<0) { HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read driver information block"); } @@ -1239,7 +1239,7 @@ H5F_open(const char *name, uintn flags, hid_t fcpl_id, hid_t fapl_id) /* Read driver information and decode */ if (H5FD_set_eoa(lf, drv_addr+16+driver_size)<0 || - H5FD_read(lf, H5P_DEFAULT, drv_addr+16, driver_size, buf)<0) { + H5FD_read(lf, H5FD_MEM_SUPER, H5P_DEFAULT, drv_addr+16, driver_size, buf)<0) { HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to read file driver information"); } @@ -2563,7 +2563,7 @@ H5F_get_driver_id(H5F_t *f) *------------------------------------------------------------------------- */ herr_t -H5F_block_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, +H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, void *buf/*out*/) { haddr_t abs_addr; @@ -2576,7 +2576,7 @@ H5F_block_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, abs_addr = f->shared->base_addr + addr; /* Read the data */ - if (H5FD_read(f->shared->lf, dxpl_id, abs_addr, size, buf)<0) { + if (H5FD_read(f->shared->lf, type, dxpl_id, abs_addr, size, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "file read failed"); } @@ -1521,7 +1521,7 @@ H5FD_realloc(H5FD_t *file, H5FD_mem_t type, haddr_t old_addr, hsize_t old_size, HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, HADDR_UNDEF, "memory allocation failed"); } - if (H5FDread(file, H5P_DEFAULT, old_addr, old_size, buf)<0 || + if (H5FDread(file, type, H5P_DEFAULT, old_addr, old_size, buf)<0 || H5FDwrite(file, type, H5P_DEFAULT, new_addr, old_size, buf)) { H5FDfree(file, type, new_addr, new_size); H5MM_xfree(buf); @@ -1808,7 +1808,7 @@ H5FD_get_eof(H5FD_t *file) *------------------------------------------------------------------------- */ herr_t -H5FDread(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, +H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { FUNC_ENTER(H5FDread, FAIL); @@ -1829,7 +1829,7 @@ H5FDread(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, } /* Do the real work */ - if (H5FD_read(file, dxpl_id, addr, size, buf)<0) { + if (H5FD_read(file, type, dxpl_id, addr, size, buf)<0) { HRETURN_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "file read request failed"); } @@ -1854,7 +1854,7 @@ H5FDread(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, *------------------------------------------------------------------------- */ herr_t -H5FD_read(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, +H5FD_read(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { FUNC_ENTER(H5FD_read, FAIL); @@ -1876,13 +1876,16 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, hsize_t amount_read; /* Amount to read at a time */ hsize_t read_off; /* Offset to read from */ + /* Double check that we aren't reading raw data */ + assert(type!=H5FD_MEM_DRAW); + /* Read the part before the metadata accumulator */ if(addr<file->accum_loc) { /* Set the amount to read */ amount_read=file->accum_loc-addr; /* Dispatch to driver */ - if ((file->cls->read)(file, dxpl_id, addr, amount_read, read_buf)<0) + if ((file->cls->read)(file, type, dxpl_id, addr, amount_read, read_buf)<0) HRETURN_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver read request failed"); /* Adjust the buffer, address & size */ @@ -1911,7 +1914,7 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, /* Read the part after the metadata accumulator */ if(size>0 && addr>=(file->accum_loc+file->accum_size)) { /* Dispatch to driver */ - if ((file->cls->read)(file, dxpl_id, addr, size, read_buf)<0) + if ((file->cls->read)(file, type, dxpl_id, addr, size, read_buf)<0) HRETURN_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver read request failed"); /* Adjust the buffer, address & size */ @@ -1925,7 +1928,7 @@ H5FD_read(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, } /* end if */ else { /* Dispatch to driver */ - if ((file->cls->read)(file, dxpl_id, addr, size, buf)<0) + if ((file->cls->read)(file, type, dxpl_id, addr, size, buf)<0) HRETURN_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "driver read request failed"); } /* end else */ diff --git a/src/H5FDcore.c b/src/H5FDcore.c index e551d46..60717ad 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -83,7 +83,7 @@ static int H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2); static haddr_t H5FD_core_get_eoa(H5FD_t *_file); static herr_t H5FD_core_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_core_get_eof(H5FD_t *_file); -static herr_t H5FD_core_read(H5FD_t *_file, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_core_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); @@ -573,7 +573,7 @@ H5FD_core_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_core_read(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr, +H5FD_core_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { H5FD_core_t *file = (H5FD_core_t*)_file; diff --git a/src/H5FDdpss.c b/src/H5FDdpss.c index e01c95b..c469f5d 100644 --- a/src/H5FDdpss.c +++ b/src/H5FDdpss.c @@ -117,7 +117,7 @@ static herr_t H5FD_dpss_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_dpss_get_eoa (H5FD_t *_file); static herr_t H5FD_dpss_set_eoa (H5FD_t *_file, haddr_t addr); static haddr_t H5FD_dpss_get_eof (H5FD_t *_file); -static herr_t H5FD_dpss_read (H5FD_t *_file, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_dpss_read (H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_dpss_write (H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED fapl_id,haddr_t addr, hsize_t size, const void *buf); @@ -530,7 +530,7 @@ H5FD_dpss_get_eof (H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_dpss_read (H5FD_t *_file, hid_t dxpl_id, haddr_t addr, +H5FD_dpss_read (H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { H5FD_dpss_t *file = (H5FD_dpss_t *) _file; diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index 7f4b160..b9bc734 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -76,7 +76,7 @@ static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_family_get_eoa(H5FD_t *_file); static herr_t H5FD_family_set_eoa(H5FD_t *_file, haddr_t eoa); static haddr_t H5FD_family_get_eof(H5FD_t *_file); -static herr_t H5FD_family_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, +static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *_buf/*out*/); static herr_t H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, const void *_buf); @@ -812,7 +812,7 @@ H5FD_family_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_family_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, +H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *_buf/*out*/) { H5FD_family_t *file = (H5FD_family_t*)_file; @@ -843,7 +843,7 @@ H5FD_family_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, req = MIN(size, file->memb_size-sub); assert(i<file->nmembs); - if (H5FDread(file->memb[i], memb_dxpl_id, sub, req, buf)<0) + if (H5FDread(file->memb[i], type, memb_dxpl_id, sub, req, buf)<0) HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "member file read failed"); diff --git a/src/H5FDgass.c b/src/H5FDgass.c index a9ca657..8d77ae8 100644 --- a/src/H5FDgass.c +++ b/src/H5FDgass.c @@ -105,7 +105,7 @@ static herr_t H5FD_gass_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_gass_get_eoa(H5FD_t *_file); static herr_t H5FD_gass_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_gass_get_eof(H5FD_t *_file); -static herr_t H5FD_gass_read(H5FD_t *_file, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_gass_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_gass_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); @@ -575,7 +575,7 @@ H5FD_gass_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_gass_read(H5FD_t *_file, hid_t dxpl_id/*unused*/, haddr_t addr, +H5FD_gass_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id/*unused*/, haddr_t addr, hsize_t size, void *buf/*out*/) { H5FD_gass_t *file = (H5FD_gass_t*)_file; diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 63f6bdd..b55571d 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -159,7 +159,7 @@ static haddr_t H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hsize_t size); static haddr_t H5FD_log_get_eoa(H5FD_t *_file); static herr_t H5FD_log_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_log_get_eof(H5FD_t *_file); -static herr_t H5FD_log_read(H5FD_t *_file, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); @@ -805,7 +805,7 @@ H5FD_log_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_log_read(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr, +H5FD_log_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { H5FD_log_t *file = (H5FD_log_t*)_file; diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index f48d881..1e9bd8f 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -76,7 +76,7 @@ static herr_t H5FD_mpio_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_mpio_get_eoa(H5FD_t *_file); static herr_t H5FD_mpio_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_mpio_get_eof(H5FD_t *_file); -static herr_t H5FD_mpio_read(H5FD_t *_file, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); @@ -1041,7 +1041,7 @@ H5FD_mpio_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_mpio_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, +H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { H5FD_mpio_t *file = (H5FD_mpio_t*)_file; diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 68fa26a..08a8a5c 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -122,7 +122,7 @@ static haddr_t H5FD_multi_get_eof(H5FD_t *_file); static haddr_t H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hsize_t size); static herr_t H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, haddr_t addr, hsize_t size); -static herr_t H5FD_multi_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, +static herr_t H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *_buf/*out*/); static herr_t H5FD_multi_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, const void *_buf); @@ -1320,6 +1320,9 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2) static herr_t H5FD_multi_query(const H5FD_t *_f, unsigned long *flags /* out */) { + /* Shut compiler up */ + _f=_f; + /* Set the VFL feature flags that this driver supports */ if(flags) { *flags|=H5FD_FEAT_DATA_SIEVE; /* OK to perform data sieving for faster raw data reads & writes */ @@ -1563,7 +1566,7 @@ H5FD_multi_free(H5FD_t *_file, H5FD_mem_t type, haddr_t addr, hsize_t size) *------------------------------------------------------------------------- */ static herr_t -H5FD_multi_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, +H5FD_multi_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *_buf/*out*/) { H5FD_multi_t *file = (H5FD_multi_t*)_file; @@ -1594,7 +1597,7 @@ H5FD_multi_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, assert(hi>0); /* Read from that member */ - return H5FDread(file->memb[hi], dx?dx->memb_dxpl[hi]:H5P_DEFAULT, + return H5FDread(file->memb[hi], type, dx?dx->memb_dxpl[hi]:H5P_DEFAULT, addr-start_addr, size, _buf); } diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index 9f7a6de..af097d8 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -34,7 +34,7 @@ __DLL__ haddr_t H5FD_realloc(H5FD_t *file, H5FD_mem_t type, haddr_t old_addr, __DLL__ haddr_t H5FD_get_eoa(H5FD_t *file); __DLL__ herr_t H5FD_set_eoa(H5FD_t *file, haddr_t addr); __DLL__ haddr_t H5FD_get_eof(H5FD_t *file); -__DLL__ herr_t H5FD_read(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, +__DLL__ herr_t H5FD_read(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/); __DLL__ herr_t H5FD_write(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, const void *buf); diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index b1185fa..80c7291 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -127,7 +127,7 @@ typedef struct H5FD_class_t { haddr_t (*get_eoa)(H5FD_t *file); herr_t (*set_eoa)(H5FD_t *file, haddr_t addr); haddr_t (*get_eof)(H5FD_t *file); - herr_t (*read)(H5FD_t *file, hid_t dxpl, haddr_t addr, hsize_t size, + herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, void *buffer); herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, hsize_t size, const void *buffer); @@ -188,7 +188,7 @@ __DLL__ haddr_t H5FDrealloc(H5FD_t *file, H5FD_mem_t type, haddr_t addr, __DLL__ haddr_t H5FDget_eoa(H5FD_t *file); __DLL__ herr_t H5FDset_eoa(H5FD_t *file, haddr_t eof); __DLL__ haddr_t H5FDget_eof(H5FD_t *file); -__DLL__ herr_t H5FDread(H5FD_t *file, hid_t dxpl_id, haddr_t addr, hsize_t size, +__DLL__ herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/); __DLL__ herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, const void *buf); diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index bfb76ce..150a995 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -127,7 +127,7 @@ static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_sec2_get_eoa(H5FD_t *_file); static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_sec2_get_eof(H5FD_t *_file); -static herr_t H5FD_sec2_read(H5FD_t *_file, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); @@ -535,7 +535,7 @@ H5FD_sec2_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_sec2_read(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr, +H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { H5FD_sec2_t *file = (H5FD_sec2_t*)_file; diff --git a/src/H5FDsrb.c b/src/H5FDsrb.c index 4c19372..e3d3e1c 100644 --- a/src/H5FDsrb.c +++ b/src/H5FDsrb.c @@ -61,7 +61,7 @@ static herr_t H5FD_srb_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_srb_get_eoa(H5FD_t *_file); static herr_t H5FD_srb_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_srb_get_eof(H5FD_t *_file); -static herr_t H5FD_srb_read(H5FD_t *_file, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_srb_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_srb_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); @@ -487,7 +487,7 @@ H5FD_srb_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_srb_read(H5FD_t *_file, hid_t dxpl_id/*unused*/, haddr_t addr, +H5FD_srb_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, hsize_t size, void *buf) { H5FD_srb_t *file = (H5FD_srb_t*)_file; @@ -557,7 +557,7 @@ H5FD_srb_read(H5FD_t *_file, hid_t dxpl_id/*unused*/, haddr_t addr, *------------------------------------------------------------------------- */ static herr_t -H5FD_srb_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id/*unused*/, haddr_t addr, +H5FD_srb_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, hsize_t size, const void *buf) { H5FD_srb_t *file = (H5FD_srb_t*)_file; diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 28b32a7..0686277 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -115,7 +115,7 @@ static herr_t H5FD_stdio_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_stdio_get_eoa(H5FD_t *_file); static herr_t H5FD_stdio_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_stdio_get_eof(H5FD_t *_file); -static herr_t H5FD_stdio_read(H5FD_t *lf, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_stdio_read(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_stdio_write(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); @@ -566,7 +566,7 @@ H5FD_stdio_get_eof(H5FD_t *_file) *------------------------------------------------------------------------- */ static herr_t -H5FD_stdio_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, +H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, void *buf/*out*/) { size_t n; @@ -574,6 +574,7 @@ H5FD_stdio_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, static const char *func="H5FD_stdio_read"; /* Function Name for error reporting */ /* Shut compiler up */ + type=type; dxpl_id=dxpl_id; /* Clear the error stack */ diff --git a/src/H5FDstream.c b/src/H5FDstream.c index 0b2255b..469e43c 100644 --- a/src/H5FDstream.c +++ b/src/H5FDstream.c @@ -117,7 +117,7 @@ static herr_t H5FD_stream_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_stream_get_eoa (H5FD_t *_stream); static herr_t H5FD_stream_set_eoa (H5FD_t *_stream, haddr_t addr); static haddr_t H5FD_stream_get_eof (H5FD_t *_stream); -static herr_t H5FD_stream_read (H5FD_t *_stream, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_stream_read (H5FD_t *_stream, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); static herr_t H5FD_stream_write (H5FD_t *_stream, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, @@ -904,6 +904,7 @@ static haddr_t H5FD_stream_get_eof (H5FD_t *_stream) *------------------------------------------------------------------------- */ static herr_t H5FD_stream_read (H5FD_t *_stream, + H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr, hsize_t size, diff --git a/src/H5Farray.c b/src/H5Farray.c index aeb4c03..6faa42f 100644 --- a/src/H5Farray.c +++ b/src/H5Farray.c @@ -311,7 +311,7 @@ printf("%s: feature_flags=%lx\n",FUNC,(unsigned long)f->shared->lf->feature_flag "external data read failed"); } } else { - if (H5F_contig_read(f, addr, elmt_size, dxpl_id, buf)<0) { + if (H5F_contig_read(f, H5FD_MEM_DRAW, addr, elmt_size, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c index b4f4ab1..fa01acd 100644 --- a/src/H5Fcontig.c +++ b/src/H5Fcontig.c @@ -43,7 +43,7 @@ static intn interface_initialize_g = 0; *------------------------------------------------------------------------- */ herr_t -H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, +H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, void *_buf/*out*/) { uint8_t *buf = (uint8_t*)_buf; /*cast for arithmetic */ @@ -87,7 +87,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, } /* end if */ /* Read directly into the user's buffer */ - if (H5F_block_read(f, addr, size, dxpl_id, buf)<0) { + if (H5F_block_read(f, type, addr, size, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -117,7 +117,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -134,7 +134,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, else { /* Check if we can actually hold the I/O request in the sieve buffer */ if(size>f->shared->sieve_buf_size) { - if (H5F_block_read(f, addr, size, dxpl_id, buf)<0) { + if (H5F_block_read(f, type, addr, size, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -157,7 +157,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -171,7 +171,7 @@ H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, hid_t dxpl_id, } /* end else */ } /* end if */ else { - if (H5F_block_read(f, addr, size, dxpl_id, buf)<0) { + if (H5F_block_read(f, type, addr, size, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -278,7 +278,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } @@ -319,7 +319,7 @@ H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, f->shared->sieve_size=MIN(eoa-addr,f->shared->sieve_buf_size); /* Read the new sieve buffer */ - if (H5F_block_read(f, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { + if (H5F_block_read(f, type, f->shared->sieve_loc, f->shared->sieve_size, dxpl_id, f->shared->sieve_buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } diff --git a/src/H5Fistore.c b/src/H5Fistore.c index 42c6aad..890ea58 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -1418,7 +1418,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, /* * The chunk exists on disk. */ - if (H5F_block_read(f, udata.addr, udata.key.nbytes, H5P_DEFAULT, + if (H5F_block_read(f, H5FD_MEM_DRAW, udata.addr, udata.key.nbytes, H5P_DEFAULT, chunk)<0) { HGOTO_ERROR (H5E_IO, H5E_READERROR, NULL, "unable to read raw data chunk"); diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 6abd9cf..707b546 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -199,7 +199,7 @@ __DLL__ herr_t H5F_istore_allocate (H5F_t *f, hid_t dxpl_id, const struct H5O_fill_t *fill); /* Functions that operate on contiguous storage wrt boot block */ -__DLL__ herr_t H5F_contig_read(H5F_t *f, haddr_t addr, hsize_t size, +__DLL__ herr_t H5F_contig_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, void *_buf/*out*/); __DLL__ herr_t H5F_contig_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, const void *buf); diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index d007614..da19bd6 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -332,7 +332,7 @@ __DLL__ herr_t H5F_arr_write (H5F_t *f, hid_t dxpl_id, const hssize_t file_offset[], const void *_buf); /* Functions that operate on blocks of bytes wrt boot block */ -__DLL__ herr_t H5F_block_read(H5F_t *f, haddr_t addr, hsize_t size, +__DLL__ herr_t H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, void *buf/*out*/); __DLL__ herr_t H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, hsize_t size, hid_t dxpl_id, const void *buf); diff --git a/src/H5Fseq.c b/src/H5Fseq.c index db1a8c2..4181823 100644 --- a/src/H5Fseq.c +++ b/src/H5Fseq.c @@ -162,7 +162,7 @@ H5F_seq_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, "external data read failed"); } } else { - if (H5F_contig_read(f, addr, seq_len, dxpl_id, buf)<0) { + if (H5F_contig_read(f, H5FD_MEM_DRAW, addr, seq_len, dxpl_id, buf)<0) { HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "block read failed"); } diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 3523a94..4df2142 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -443,7 +443,7 @@ H5G_node_load(H5F_t *f, 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, H5P_DEFAULT, buf) < 0) { + if (H5F_block_read(f, H5FD_MEM_BTREE, addr, (hsize_t)size, H5P_DEFAULT, buf) < 0) { HGOTO_ERROR(H5E_SYM, H5E_READERROR, NULL, "unabel to read symbol table node"); } @@ -256,7 +256,7 @@ H5HG_load (H5F_t *f, 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, H5P_DEFAULT, + if (H5F_block_read(f, H5FD_MEM_GHEAP, addr, (hsize_t)H5HG_MINSIZE, H5P_DEFAULT, heap->chunk)<0) { HGOTO_ERROR (H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection"); @@ -292,7 +292,7 @@ H5HG_load (H5F_t *f, haddr_t addr, const void UNUSED *udata1, HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } - if (H5F_block_read (f, next_addr, (hsize_t)(heap->size-H5HG_MINSIZE), + if (H5F_block_read (f, H5FD_MEM_GHEAP, next_addr, (hsize_t)(heap->size-H5HG_MINSIZE), H5P_DEFAULT, heap->chunk+H5HG_MINSIZE)<0) { HGOTO_ERROR (H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection"); @@ -219,7 +219,7 @@ H5HL_load(H5F_t *f, haddr_t addr, const void UNUSED *udata1, assert(!udata1); assert(!udata2); - if (H5F_block_read(f, addr, (hsize_t)H5HL_SIZEOF_HDR(f), H5P_DEFAULT, + if (H5F_block_read(f, H5FD_MEM_LHEAP, addr, (hsize_t)H5HL_SIZEOF_HDR(f), H5P_DEFAULT, hdr) < 0) { HRETURN_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read heap header"); @@ -259,7 +259,7 @@ H5HL_load(H5F_t *f, haddr_t addr, const void UNUSED *udata1, "memory allocation failed"); } if (heap->disk_alloc && - H5F_block_read(f, heap->addr, (hsize_t)(heap->disk_alloc), + H5F_block_read(f, H5FD_MEM_LHEAP, heap->addr, (hsize_t)(heap->disk_alloc), H5P_DEFAULT, heap->chunk + H5HL_SIZEOF_HDR(f)) < 0) { HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unable to read heap data"); @@ -376,7 +376,7 @@ H5O_load(H5F_t *f, 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, hdr_size, H5P_DEFAULT, buf) < 0) { + if (H5F_block_read(f, H5FD_MEM_OHDR, addr, hdr_size, H5P_DEFAULT, buf) < 0) { HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header"); } @@ -433,7 +433,7 @@ H5O_load(H5F_t *f, haddr_t addr, const void UNUSED *_udata1, HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } - if (H5F_block_read(f, chunk_addr, chunk_size, H5P_DEFAULT, + if (H5F_block_read(f, H5FD_MEM_OHDR, chunk_addr, chunk_size, H5P_DEFAULT, oh->chunk[chunkno].image) < 0) { HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read object header data"); diff --git a/tools/h5debug.c b/tools/h5debug.c index 07ff6b4..7f4e91a 100644 --- a/tools/h5debug.c +++ b/tools/h5debug.c @@ -96,7 +96,7 @@ main(int argc, char *argv[]) * Read the signature at the specified file position. */ HDfprintf(stdout, "Reading signature at address %a (rel)\n", addr); - if (H5F_block_read(f, addr, (hsize_t)sizeof(sig), H5P_DEFAULT, sig)<0) { + if (H5F_block_read(f, H5FD_MEM_SUPER, addr, (hsize_t)sizeof(sig), H5P_DEFAULT, sig)<0) { fprintf(stderr, "cannot read signature\n"); HDexit(3); } |