diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-07-19 19:27:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-07-19 19:27:09 (GMT) |
commit | 99eee6dff9a38a1bab3d74b4b77dd8169e57409c (patch) | |
tree | 5db3dd6e5ed35a694c655337750dc741e30181fb /src/H5HG.c | |
parent | 814ea8b962fec329f6a440d1f52f6b682de47524 (diff) | |
download | hdf5-99eee6dff9a38a1bab3d74b4b77dd8169e57409c.zip hdf5-99eee6dff9a38a1bab3d74b4b77dd8169e57409c.tar.gz hdf5-99eee6dff9a38a1bab3d74b4b77dd8169e57409c.tar.bz2 |
[svn-r5814] Purpose:
Bug Fix
Description:
It was possible to create corrupted metadata information (either in memory
or in the file or both) with a parallel I/O program because of the way
metadata writes were being handled for writes out of the metadata cache.
Solution:
Added a dataset transfer property called "block before metadata write"
which is used by the MPI-I/O and MPI-posix drivers to sync up all the
processes before attempting a metadata write. This property is currently
only for metadata writes from the metadata cache.
Platforms tested:
IRIX64 6.5 (modi4) w/parallel
Diffstat (limited to 'src/H5HG.c')
-rw-r--r-- | src/H5HG.c | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -56,9 +56,9 @@ struct H5HG_heap_t { }; /* PRIVATE PROTOTYPES */ -static H5HG_heap_t *H5HG_load(H5F_t *f, haddr_t addr, const void *udata1, +static H5HG_heap_t *H5HG_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *udata1, void *udata2); -static herr_t H5HG_flush(H5F_t *f, hbool_t dest, haddr_t addr, +static herr_t H5HG_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, H5HG_heap_t *heap); /* @@ -66,8 +66,8 @@ static herr_t H5HG_flush(H5F_t *f, hbool_t dest, haddr_t addr, */ static const H5AC_class_t H5AC_GHEAP[1] = {{ H5AC_GHEAP_ID, - (void *(*)(H5F_t*, haddr_t, const void*, void*))H5HG_load, - (herr_t (*)(H5F_t*, hbool_t, haddr_t, void*))H5HG_flush, + (H5AC_load_func_t)H5HG_load, + (H5AC_flush_func_t)H5HG_flush, }}; /* Interface initialization */ @@ -221,10 +221,14 @@ H5HG_create (H5F_t *f, size_t size) * Modifications: * Robb Matzke, 1999-07-28 * The ADDR argument is passed by value. + * + * Quincey Koziol, 2002-7-180 + * Added dxpl parameter to allow more control over I/O from metadata + * cache. *------------------------------------------------------------------------- */ static H5HG_heap_t * -H5HG_load (H5F_t *f, haddr_t addr, const void * UNUSED udata1, +H5HG_load (H5F_t *f, hid_t dxpl_id, haddr_t addr, const void * UNUSED udata1, void * UNUSED udata2) { H5HG_heap_t *heap = NULL; @@ -251,7 +255,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, H5FD_MEM_GHEAP, addr, H5HG_MINSIZE, H5P_DATASET_XFER_DEFAULT, + if (H5F_block_read(f, H5FD_MEM_GHEAP, addr, H5HG_MINSIZE, dxpl_id, heap->chunk)<0) { HGOTO_ERROR (H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection"); @@ -288,7 +292,7 @@ H5HG_load (H5F_t *f, haddr_t addr, const void * UNUSED udata1, "memory allocation failed"); } if (H5F_block_read (f, H5FD_MEM_GHEAP, next_addr, (heap->size-H5HG_MINSIZE), - H5P_DATASET_XFER_DEFAULT, heap->chunk+H5HG_MINSIZE)<0) { + dxpl_id, heap->chunk+H5HG_MINSIZE)<0) { HGOTO_ERROR (H5E_HEAP, H5E_READERROR, NULL, "unable to read global heap collection"); } @@ -397,10 +401,14 @@ H5HG_load (H5F_t *f, haddr_t addr, const void * UNUSED udata1, * Modifications: * Robb Matzke, 1999-07-28 * The ADDR argument is passed by value. + * + * Quincey Koziol, 2002-7-180 + * Added dxpl parameter to allow more control over I/O from metadata + * cache. *------------------------------------------------------------------------- */ static herr_t -H5HG_flush (H5F_t *f, hbool_t destroy, haddr_t addr, H5HG_heap_t *heap) +H5HG_flush (H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5HG_heap_t *heap) { int i; @@ -414,7 +422,7 @@ H5HG_flush (H5F_t *f, hbool_t destroy, haddr_t addr, H5HG_heap_t *heap) if (heap->dirty) { if (H5F_block_write (f, H5FD_MEM_GHEAP, addr, heap->size, - H5P_DATASET_XFER_DEFAULT, heap->chunk)<0) { + dxpl_id, heap->chunk)<0) { HRETURN_ERROR (H5E_HEAP, H5E_WRITEERROR, FAIL, "unable to write global heap collection to file"); } |