diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-05-01 10:24:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-05-01 10:24:56 (GMT) |
commit | a6ce3d4e45faab4691a6181a8ce6197157aea21a (patch) | |
tree | 35fa8c0766f7408609d5d55731c52d8ca84288a9 /src/H5Fio.c | |
parent | ac72823bc2a538be8365854a2d3c6f42cf1d5b62 (diff) | |
download | hdf5-a6ce3d4e45faab4691a6181a8ce6197157aea21a.zip hdf5-a6ce3d4e45faab4691a6181a8ce6197157aea21a.tar.gz hdf5-a6ce3d4e45faab4691a6181a8ce6197157aea21a.tar.bz2 |
[svn-r29850] Description:
Bring H5DOappend(), H5P[s|g]et_object_flush_cb, and H5P[s|g]et_append_flush
from revise_chunks branch to trunk. Brings along updated metadata cache
entry tagging, and the internal object flush routine.
Tested on:
MacOSX/64 10.11.4 (amazon) w/serial, parallel & production
(h5committest forthcoming)
Diffstat (limited to 'src/H5Fio.c')
-rw-r--r-- | src/H5Fio.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/H5Fio.c b/src/H5Fio.c index d001bc0..1fb3459 100644 --- a/src/H5Fio.c +++ b/src/H5Fio.c @@ -199,3 +199,48 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_block_write() */ + +/*------------------------------------------------------------------------- + * Function: H5F_flush_tagged_metadata + * + * Purpose: Flushes metadata with specified tag in the metadata cache + * to disk. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Mike McGreevy + * September 9, 2010 + * + *------------------------------------------------------------------------- + */ +herr_t +H5F_flush_tagged_metadata(H5F_t * f, haddr_t tag, hid_t dxpl_id) +{ + H5F_io_info_t fio_info; /* I/O info for operation */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + /* Use tag to search for and flush associated metadata */ + if(H5AC_flush_tagged_metadata(f, tag, dxpl_id)<0) + HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata") + + /* Set up I/O info for operation */ + fio_info.f = f; + + if(NULL == (fio_info.dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + + + /* Flush and reset the accumulator */ + if(H5F__accum_reset(&fio_info, TRUE) < 0) + HGOTO_ERROR(H5E_IO, H5E_CANTRESET, FAIL, "can't reset accumulator") + + /* Flush file buffers to disk. */ + if(H5FD_flush(f->shared->lf, dxpl_id, FALSE) < 0) + HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed") + +done: + FUNC_LEAVE_NOAPI(ret_value); +} /* end H5F_flush_tagged_metadata */ + |