diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-09-05 22:59:46 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-09-05 22:59:46 (GMT) |
commit | 263d13a4c760c61c293ae9840aaf2f4ce76d541a (patch) | |
tree | 1ce486654076344c450fe882e6710a3523cfa7ff /src | |
parent | 0c35d06692ac03b49a76a60b761ee8f848325825 (diff) | |
download | hdf5-263d13a4c760c61c293ae9840aaf2f4ce76d541a.zip hdf5-263d13a4c760c61c293ae9840aaf2f4ce76d541a.tar.gz hdf5-263d13a4c760c61c293ae9840aaf2f4ce76d541a.tar.bz2 |
[svn-r24102] add trans and read context operations:
add small test to verify correct function shipping
usage of transaction in other operations is still missing.
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/H5.c | 3 | ||||
-rw-r--r-- | src/H5FF.c | 159 | ||||
-rw-r--r-- | src/H5FFpublic.h | 100 | ||||
-rw-r--r-- | src/H5M.c | 44 | ||||
-rw-r--r-- | src/H5Mpublic.h | 16 | ||||
-rw-r--r-- | src/H5Pdxpl.c | 6 | ||||
-rw-r--r-- | src/H5Pint.c | 19 | ||||
-rw-r--r-- | src/H5Prcapl.c | 2 | ||||
-rw-r--r-- | src/H5Ptrfpl.c | 131 | ||||
-rw-r--r-- | src/H5Ptrspl.c | 2 | ||||
-rw-r--r-- | src/H5RC.c | 222 | ||||
-rw-r--r-- | src/H5RCprivate.h | 12 | ||||
-rw-r--r-- | src/H5RCpublic.h | 17 | ||||
-rw-r--r-- | src/H5TR.c | 192 | ||||
-rw-r--r-- | src/H5TRprivate.h | 19 | ||||
-rw-r--r-- | src/H5TRpublic.h | 8 | ||||
-rw-r--r-- | src/H5VLiod.c | 594 | ||||
-rw-r--r-- | src/H5VLiod_client.c | 98 | ||||
-rw-r--r-- | src/H5VLiod_client.h | 53 | ||||
-rw-r--r-- | src/H5VLiod_common.h | 26 | ||||
-rw-r--r-- | src/H5VLiod_encdec.c | 3 | ||||
-rw-r--r-- | src/H5VLiod_server.c | 497 | ||||
-rw-r--r-- | src/H5VLiod_server.h | 46 | ||||
-rw-r--r-- | src/H5VLiod_trans.c | 536 | ||||
-rw-r--r-- | src/H5private.h | 2 | ||||
-rw-r--r-- | src/Makefile.am | 11 | ||||
-rw-r--r-- | src/Makefile.in | 64 |
28 files changed, 2572 insertions, 318 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fdb93c3..57e898a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -469,6 +469,9 @@ SET (H5P_SRCS ${HDF5_SRC_DIR}/H5Pocpl.c ${HDF5_SRC_DIR}/H5Pocpypl.c ${HDF5_SRC_DIR}/H5Pstrcpl.c + ${HDF5_SRC_DIR}/H5Prcapl.c + ${HDF5_SRC_DIR}/H5Ptrspl.c + ${HDF5_SRC_DIR}/H5Ptrfpl.c ${HDF5_SRC_DIR}/H5Ptest.c ) @@ -629,11 +632,15 @@ IF (HDF5_ENABLE_EFF) ${HDF5_SRC_DIR}/H5FF.c ${HDF5_SRC_DIR}/H5M.c ${HDF5_SRC_DIR}/H5EQ.c + ${HDF5_SRC_DIR}/H5RC.c + ${HDF5_SRC_DIR}/H5TR.c ) SET (H5FF_HDRS ${HDF5_SRC_DIR}/H5FFpublic.h ${HDF5_SRC_DIR}/H5Mpublic.h ${HDF5_SRC_DIR}/H5EQpublic.h + ${HDF5_SRC_DIR}/H5RCpublic.h + ${HDF5_SRC_DIR}/H5TRpublic.h ) IDE_GENERATED_PROPERTIES ("H5FF" "${H5FF_HDRS}" "${H5FF_SRCS}" ) SET (H5VL_SRCS @@ -650,6 +657,7 @@ IF (HDF5_ENABLE_EFF) ${HDF5_SRC_DIR}/H5VLiod_link.c ${HDF5_SRC_DIR}/H5VLiod_obj.c ${HDF5_SRC_DIR}/H5VLiod_map.c + ${HDF5_SRC_DIR}/H5VLiod_trans.c ${HDF5_SRC_DIR}/H5VLiod_encdec.c ) SET (H5VL_HDRS @@ -259,7 +259,10 @@ H5_term_library(void) pending += DOWN(A); pending += DOWN(S); pending += DOWN(T); + pending += DOWN(TR); + pending += DOWN(RC); pending += DOWN(EQ); + /* Don't shut down the file code until objects in files are shut down */ if(pending == 0) pending += DOWN(F); @@ -343,7 +343,7 @@ done: */ hid_t H5Gcreate_ff(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id, - uint64_t trans, hid_t eq_id) + hid_t trans_id, hid_t eq_id) { void *grp = NULL; /* dset token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -353,6 +353,8 @@ H5Gcreate_ff(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE7("i", "i*siiiii", loc_id, name, lcpl_id, gcpl_id, gapl_id, trans_id, + eq_id); /* Check arguments */ if(!name || !*name) @@ -432,7 +434,7 @@ done: */ hid_t H5Gopen_ff(hid_t loc_id, const char *name, hid_t gapl_id, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { void *grp = NULL; /* dset token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -441,6 +443,7 @@ H5Gopen_ff(hid_t loc_id, const char *name, hid_t gapl_id, hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("i", "i*siii", loc_id, name, gapl_id, rcxt_id, eq_id); /* Check args */ if(!name || !*name) @@ -541,7 +544,7 @@ done: */ hid_t H5Dcreate_ff(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, - hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id, uint64_t trans, hid_t eq_id) + hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id, hid_t trans_id, hid_t eq_id) { void *dset = NULL; /* dset token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -551,6 +554,8 @@ H5Dcreate_ff(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE9("i", "i*siiiiiii", loc_id, name, type_id, space_id, lcpl_id, dcpl_id, + dapl_id, trans_id, eq_id); if(!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") @@ -633,7 +638,7 @@ done: *------------------------------------------------------------------------- */ hid_t -H5Dopen_ff(hid_t loc_id, const char *name, hid_t dapl_id, uint64_t trans, hid_t eq_id) +H5Dopen_ff(hid_t loc_id, const char *name, hid_t dapl_id, hid_t rcxt_id, hid_t eq_id) { void *dset = NULL; /* dset token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -642,6 +647,7 @@ H5Dopen_ff(hid_t loc_id, const char *name, hid_t dapl_id, uint64_t trans, hid_t hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("i", "i*siii", loc_id, name, dapl_id, rcxt_id, eq_id); /* Check args */ if(!name || !*name) @@ -699,13 +705,15 @@ done: herr_t H5Dwrite_ff(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, const void *buf, - uint64_t trans, hid_t eq_id) + hid_t trans_id, hid_t eq_id) { H5VL_t *vol_plugin; void *dset; herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "iiiii*xii", dset_id, mem_type_id, mem_space_id, file_space_id, + dxpl_id, buf, trans_id, eq_id); /* check arguments */ if(!dset_id) @@ -751,13 +759,15 @@ done: herr_t H5Dread_ff(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, void *buf/*out*/, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { H5VL_t *vol_plugin; void *dset; herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "iiiiixii", dset_id, mem_type_id, mem_space_id, file_space_id, + dxpl_id, buf, rcxt_id, eq_id); if(mem_space_id < 0 || file_space_id < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space") @@ -800,14 +810,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Dset_extent_ff(hid_t dset_id, const hsize_t size[], uint64_t trans, hid_t eq_id) +H5Dset_extent_ff(hid_t dset_id, const hsize_t size[], hid_t trans_id, hid_t eq_id) { H5VL_t *vol_plugin; void *dset; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE3("e", "i*hi", dset_id, size, eq_id); + H5TRACE4("e", "i*hii", dset_id, size, trans_id, eq_id); if(!size) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified") @@ -893,7 +903,7 @@ done: */ herr_t H5Tcommit_ff(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, - hid_t tcpl_id, hid_t tapl_id, uint64_t trans, hid_t eq_id) + hid_t tcpl_id, hid_t tapl_id, hid_t trans_id, hid_t eq_id) { void *dt = NULL; H5T_t *type = NULL; @@ -903,6 +913,8 @@ H5Tcommit_ff(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "i*siiiiii", loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id, + trans_id, eq_id); /* Check arguments */ if (H5Tcommitted(type_id)) @@ -978,7 +990,7 @@ done: *------------------------------------------------------------------------- */ hid_t -H5Topen_ff(hid_t loc_id, const char *name, hid_t tapl_id, uint64_t trans, hid_t eq_id) +H5Topen_ff(hid_t loc_id, const char *name, hid_t tapl_id, hid_t rcxt_id, hid_t eq_id) { void *vol_dt = NULL; /* datatype token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -988,6 +1000,7 @@ H5Topen_ff(hid_t loc_id, const char *name, hid_t tapl_id, uint64_t trans, hid_t hid_t ret_value = FAIL; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("i", "i*siii", loc_id, name, tapl_id, rcxt_id, eq_id); /* Check args */ if(!name || !*name) @@ -1085,7 +1098,7 @@ done: --------------------------------------------------------------------------*/ hid_t H5Acreate_ff(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, - hid_t acpl_id, hid_t aapl_id, uint64_t trans, hid_t eq_id) + hid_t acpl_id, hid_t aapl_id, hid_t trans_id, hid_t eq_id) { void *attr = NULL; /* attr token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -1095,6 +1108,8 @@ H5Acreate_ff(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("i", "i*siiiiii", loc_id, attr_name, type_id, space_id, acpl_id, + aapl_id, trans_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1154,7 +1169,7 @@ done: hid_t H5Acreate_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, - hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lapl_id, hid_t trans_id, hid_t eq_id) { void *attr = NULL; /* attr token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -1164,6 +1179,8 @@ H5Acreate_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE10("i", "i*s*siiiiiii", loc_id, obj_name, attr_name, type_id, space_id, + acpl_id, aapl_id, lapl_id, trans_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1227,7 +1244,7 @@ done: --------------------------------------------------------------------------*/ hid_t H5Aopen_ff(hid_t loc_id, const char *attr_name, hid_t aapl_id, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { void *attr = NULL; /* attr token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -1236,6 +1253,7 @@ H5Aopen_ff(hid_t loc_id, const char *attr_name, hid_t aapl_id, hid_t ret_value; FUNC_ENTER_API(FAIL) + H5TRACE5("i", "i*siii", loc_id, attr_name, aapl_id, rcxt_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1280,7 +1298,7 @@ done: --------------------------------------------------------------------------*/ hid_t H5Aopen_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, - hid_t aapl_id, hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t aapl_id, hid_t lapl_id, hid_t rcxt_id, hid_t eq_id) { void *attr = NULL; /* attr token from VOL plugin */ void *obj = NULL; /* object token of loc_id */ @@ -1289,6 +1307,8 @@ H5Aopen_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t ret_value; FUNC_ENTER_API(FAIL) + H5TRACE7("i", "i*s*siiii", loc_id, obj_name, attr_name, aapl_id, lapl_id, + rcxt_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1341,13 +1361,14 @@ done: Non-negative on success/Negative on failure --------------------------------------------------------------------------*/ herr_t -H5Awrite_ff(hid_t attr_id, hid_t dtype_id, const void *buf, uint64_t trans, hid_t eq_id) +H5Awrite_ff(hid_t attr_id, hid_t dtype_id, const void *buf, hid_t trans_id, hid_t eq_id) { H5VL_t *vol_plugin; void *attr; herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "ii*xii", attr_id, dtype_id, buf, trans_id, eq_id); /* check arguments */ if(NULL == buf) @@ -1378,13 +1399,14 @@ done: Non-negative on success/Negative on failure --------------------------------------------------------------------------*/ herr_t -H5Aread_ff(hid_t attr_id, hid_t dtype_id, void *buf, uint64_t trans, hid_t eq_id) +H5Aread_ff(hid_t attr_id, hid_t dtype_id, void *buf, hid_t rcxt_id, hid_t eq_id) { H5VL_t *vol_plugin; void *attr; herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "ii*xii", attr_id, dtype_id, buf, rcxt_id, eq_id); /* check arguments */ if(NULL == buf) @@ -1421,11 +1443,12 @@ done: */ herr_t H5Arename_ff(hid_t loc_id, const char *old_name, const char *new_name, - uint64_t trans, hid_t eq_id) + hid_t trans_id, hid_t eq_id) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "i*s*sii", loc_id, old_name, new_name, trans_id, eq_id); /* check arguments */ if(!old_name || !new_name) @@ -1474,11 +1497,13 @@ done: */ herr_t H5Arename_by_name_ff(hid_t loc_id, const char *obj_name, const char *old_attr_name, - const char *new_attr_name, hid_t lapl_id, uint64_t trans, hid_t eq_id) + const char *new_attr_name, hid_t lapl_id, hid_t trans_id, hid_t eq_id) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE7("e", "i*s*s*siii", loc_id, obj_name, old_attr_name, new_attr_name, + lapl_id, trans_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1533,7 +1558,7 @@ done: Non-negative on success/Negative on failure --------------------------------------------------------------------------*/ herr_t -H5Adelete_ff(hid_t loc_id, const char *name, uint64_t trans, hid_t eq_id) +H5Adelete_ff(hid_t loc_id, const char *name, hid_t trans_id, hid_t eq_id) { H5VL_t *vol_plugin; void *obj; @@ -1541,6 +1566,7 @@ H5Adelete_ff(hid_t loc_id, const char *name, uint64_t trans, hid_t eq_id) herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE4("e", "i*sii", loc_id, name, trans_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1579,7 +1605,7 @@ done: --------------------------------------------------------------------------*/ herr_t H5Adelete_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, - hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lapl_id, hid_t trans_id, hid_t eq_id) { H5VL_t *vol_plugin; void *obj; @@ -1587,6 +1613,7 @@ H5Adelete_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE6("e", "i*s*siii", loc_id, obj_name, attr_name, lapl_id, trans_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1637,7 +1664,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Aexists_ff(hid_t obj_id, const char *attr_name, htri_t *ret, uint64_t trans, hid_t eq_id) +H5Aexists_ff(hid_t obj_id, const char *attr_name, htri_t *ret, hid_t rcxt_id, hid_t eq_id) { H5VL_t *vol_plugin; void *obj; @@ -1645,6 +1672,7 @@ H5Aexists_ff(hid_t obj_id, const char *attr_name, htri_t *ret, uint64_t trans, h herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "i*s*tii", obj_id, attr_name, ret, rcxt_id, eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(obj_id)) @@ -1687,7 +1715,7 @@ done: */ herr_t H5Aexists_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, - hid_t lapl_id, htri_t *ret, uint64_t trans, hid_t eq_id) + hid_t lapl_id, htri_t *ret, hid_t rcxt_id, hid_t eq_id) { H5VL_t *vol_plugin; void *obj; @@ -1695,6 +1723,8 @@ H5Aexists_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE7("e", "i*s*si*tii", loc_id, obj_name, attr_name, lapl_id, ret, rcxt_id, + eq_id); /* check arguments */ if(H5I_ATTR == H5I_get_type(loc_id)) @@ -1791,7 +1821,7 @@ done: */ herr_t H5Lmove_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, - const char *dst_name, hid_t lcpl_id, hid_t lapl_id, uint64_t trans, hid_t eq_id) + const char *dst_name, hid_t lcpl_id, hid_t lapl_id, hid_t trans_id, hid_t eq_id) { void *obj1 = NULL; /* object token of src_id */ H5VL_t *vol_plugin1; /* VOL plugin information */ @@ -1802,6 +1832,8 @@ H5Lmove_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "i*si*siiii", src_loc_id, src_name, dst_loc_id, dst_name, + lcpl_id, lapl_id, trans_id, eq_id); /* Check arguments */ if(src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC) @@ -1880,7 +1912,7 @@ done: */ herr_t H5Lcopy_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, - const char *dst_name, hid_t lcpl_id, hid_t lapl_id, uint64_t trans, hid_t eq_id) + const char *dst_name, hid_t lcpl_id, hid_t lapl_id, hid_t trans_id, hid_t eq_id) { void *obj1 = NULL; /* object token of src_id */ H5VL_t *vol_plugin1; /* VOL plugin information */ @@ -1891,6 +1923,8 @@ H5Lcopy_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "i*si*siiii", src_loc_id, src_name, dst_loc_id, dst_name, + lcpl_id, lapl_id, trans_id, eq_id); /* Check arguments */ if(src_loc_id == H5L_SAME_LOC && dst_loc_id == H5L_SAME_LOC) @@ -1972,7 +2006,7 @@ done: */ herr_t H5Lcreate_soft_ff(const char *link_target, hid_t link_loc_id, const char *link_name, - hid_t lcpl_id, hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lcpl_id, hid_t lapl_id, hid_t trans_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -1981,6 +2015,8 @@ H5Lcreate_soft_ff(const char *link_target, hid_t link_loc_id, const char *link_n herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE7("e", "*si*siiii", link_target, link_loc_id, link_name, lcpl_id, + lapl_id, trans_id, eq_id); /* Check arguments */ if(link_loc_id == H5L_SAME_LOC) @@ -2048,7 +2084,7 @@ done: herr_t H5Lcreate_hard_ff(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id, - uint64_t trans, hid_t eq_id) + hid_t trans_id, hid_t eq_id) { void *obj1 = NULL; /* object token of loc_id */ void *obj2 = NULL; /* object token of loc_id */ @@ -2060,6 +2096,8 @@ H5Lcreate_hard_ff(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "i*si*siiii", cur_loc_id, cur_name, new_loc_id, new_name, + lcpl_id, lapl_id, trans_id, eq_id); /* Check arguments */ if(cur_loc_id == H5L_SAME_LOC && new_loc_id == H5L_SAME_LOC) @@ -2149,7 +2187,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Ldelete_ff(hid_t loc_id, const char *name, hid_t lapl_id, uint64_t trans, hid_t eq_id) +H5Ldelete_ff(hid_t loc_id, const char *name, hid_t lapl_id, hid_t trans_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2157,6 +2195,7 @@ H5Ldelete_ff(hid_t loc_id, const char *name, hid_t lapl_id, uint64_t trans, hid_ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "i*siii", loc_id, name, lapl_id, trans_id, eq_id); /* Check arguments */ if(!name || !*name) @@ -2199,7 +2238,7 @@ done: */ herr_t H5Lexists_ff(hid_t loc_id, const char *name, hid_t lapl_id, htri_t *ret, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2207,6 +2246,7 @@ H5Lexists_ff(hid_t loc_id, const char *name, hid_t lapl_id, htri_t *ret, herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) + H5TRACE6("e", "i*si*tii", loc_id, name, lapl_id, ret, rcxt_id, eq_id); /* Check arguments */ if(!name || !*name) @@ -2254,7 +2294,7 @@ done: */ herr_t H5Lget_info_ff(hid_t loc_id, const char *name, H5L_ff_info_t *linfo /*out*/, - hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lapl_id, hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2262,7 +2302,7 @@ H5Lget_info_ff(hid_t loc_id, const char *name, H5L_ff_info_t *linfo /*out*/, herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) - H5TRACE4("e", "i*sxi", loc_id, name, linfo, lapl_id); + H5TRACE6("e", "i*sxiii", loc_id, name, linfo, lapl_id, rcxt_id, eq_id); if(!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") @@ -2315,7 +2355,7 @@ done: */ herr_t H5Lget_val_ff(hid_t loc_id, const char *name, void *buf/*out*/, size_t size, - hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lapl_id, hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2323,7 +2363,7 @@ H5Lget_val_ff(hid_t loc_id, const char *name, void *buf/*out*/, size_t size, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE5("e", "i*sxzi", loc_id, name, buf, size, lapl_id); + H5TRACE7("e", "i*sxziii", loc_id, name, buf, size, lapl_id, rcxt_id, eq_id); /* Check arguments */ if(!name || !*name) @@ -2380,7 +2420,7 @@ done: *------------------------------------------------------------------------- */ hid_t -H5Oopen_ff(hid_t loc_id, const char *name, hid_t lapl_id, uint64_t trans, hid_t eq_id) +H5Oopen_ff(hid_t loc_id, const char *name, hid_t lapl_id, hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2390,6 +2430,7 @@ H5Oopen_ff(hid_t loc_id, const char *name, hid_t lapl_id, uint64_t trans, hid_t hid_t ret_value = FAIL; FUNC_ENTER_API(FAIL) + H5TRACE5("i", "i*siii", loc_id, name, lapl_id, rcxt_id, eq_id); if(!name || !*name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name") @@ -2439,7 +2480,7 @@ done: */ hid_t H5Oopen_by_addr_ff(hid_t loc_id, haddr_ff_t addr, H5O_type_t type, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2506,7 +2547,7 @@ done: */ herr_t H5Olink_ff(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, - hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lapl_id, hid_t trans_id, hid_t eq_id) { void *obj1 = NULL; /* object token of loc_id */ void *obj2 = NULL; /* object token of loc_id */ @@ -2518,6 +2559,8 @@ H5Olink_ff(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE7("e", "ii*siiii", obj_id, new_loc_id, new_name, lcpl_id, lapl_id, + trans_id, eq_id); /* Check arguments */ if(new_loc_id == H5L_SAME_LOC) @@ -2602,7 +2645,7 @@ done: */ herr_t H5Oexists_by_name_ff(hid_t loc_id, const char *name, htri_t *ret, hid_t lapl_id, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2610,6 +2653,7 @@ H5Oexists_by_name_ff(hid_t loc_id, const char *name, htri_t *ret, hid_t lapl_id, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE6("e", "i*s*tiii", loc_id, name, ret, lapl_id, rcxt_id, eq_id); /* Check args */ if(!name || !*name) @@ -2660,7 +2704,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Oset_comment_ff(hid_t obj_id, const char *comment, uint64_t trans, hid_t eq_id) +H5Oset_comment_ff(hid_t obj_id, const char *comment, hid_t trans_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2668,6 +2712,7 @@ H5Oset_comment_ff(hid_t obj_id, const char *comment, uint64_t trans, hid_t eq_id herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE4("e", "i*sii", obj_id, comment, trans_id, eq_id); loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(obj_id); @@ -2708,7 +2753,7 @@ done: */ herr_t H5Oset_comment_by_name_ff(hid_t loc_id, const char *name, const char *comment, - hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lapl_id, hid_t trans_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2716,6 +2761,7 @@ H5Oset_comment_by_name_ff(hid_t loc_id, const char *name, const char *comment, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE6("e", "i*s*siii", loc_id, name, comment, lapl_id, trans_id, eq_id); /* Check args */ if(!name || !*name) @@ -2762,7 +2808,7 @@ done: */ herr_t H5Oget_comment_ff(hid_t loc_id, char *comment, size_t bufsize, ssize_t *ret, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2770,6 +2816,7 @@ H5Oget_comment_ff(hid_t loc_id, char *comment, size_t bufsize, ssize_t *ret, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE6("e", "i*sz*Zsii", loc_id, comment, bufsize, ret, rcxt_id, eq_id); loc_params.type = H5VL_OBJECT_BY_SELF; loc_params.obj_type = H5I_get_type(loc_id); @@ -2804,7 +2851,7 @@ done: */ herr_t H5Oget_comment_by_name_ff(hid_t loc_id, const char *name, char *comment, size_t bufsize, - ssize_t *ret, hid_t lapl_id, uint64_t trans, hid_t eq_id) + ssize_t *ret, hid_t lapl_id, hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2812,6 +2859,8 @@ H5Oget_comment_by_name_ff(hid_t loc_id, const char *name, char *comment, size_t herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "i*s*sz*Zsiii", loc_id, name, comment, bufsize, ret, lapl_id, + rcxt_id, eq_id); /* Check args */ if(!name || !*name) @@ -2862,7 +2911,7 @@ done: herr_t H5Ocopy_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, - uint64_t trans, hid_t eq_id) + hid_t trans_id, hid_t eq_id) { void *obj1 = NULL; /* object token of src_id */ H5VL_t *vol_plugin1; /* VOL plugin information */ @@ -2873,6 +2922,8 @@ H5Ocopy_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "i*si*siiii", src_loc_id, src_name, dst_loc_id, dst_name, + ocpypl_id, lcpl_id, trans_id, eq_id); /* Get correct property lists */ if(H5P_DEFAULT == lcpl_id) @@ -2930,7 +2981,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Oget_info_ff(hid_t loc_id, H5O_ff_info_t *oinfo, uint64_t trans, hid_t eq_id) +H5Oget_info_ff(hid_t loc_id, H5O_ff_info_t *oinfo, hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -2979,7 +3030,7 @@ done: */ herr_t H5Oget_info_by_name_ff(hid_t loc_id, const char *name, H5O_ff_info_t *oinfo, - hid_t lapl_id, uint64_t trans, hid_t eq_id) + hid_t lapl_id, hid_t rcxt_id, hid_t eq_id) { void *obj = NULL; /* object token of loc_id */ H5VL_t *vol_plugin; /* VOL plugin information */ @@ -3078,6 +3129,8 @@ H5Oclose_ff(hid_t object_id, hid_t eq_id) case H5I_VFL: case H5I_VOL: case H5I_EQ: + case H5I_RC: + case H5I_TR: case H5I_GENPROP_CLS: case H5I_GENPROP_LST: case H5I_ERROR_CLASS: @@ -3370,7 +3423,7 @@ done: herr_t H5DOappend_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, - hid_t memtype, const void *buf, uint64_t trans, hid_t eq_id) + hid_t memtype, const void *buf, hid_t trans_id, hid_t eq_id) { hsize_t size[H5S_MAX_RANK]; hsize_t start[H5S_MAX_RANK]; @@ -3421,7 +3474,7 @@ herr_t H5DOappend_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extensi HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "extend size is smaller than current size of axis"); /* set the extent of the dataset to the new dimension */ - if(H5Dset_extent_ff(dset_id, size, trans, eq_id) < 0) + if(H5Dset_extent_ff(dset_id, size, trans_id, eq_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set extent of dataset"); /* get the new dataspace of the dataset */ @@ -3448,7 +3501,7 @@ herr_t H5DOappend_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extensi mem_space_id = H5Screate_simple(1, &nelmts, NULL); /* Write the data */ - if(H5Dwrite_ff(dset_id, memtype, mem_space_id, new_space_id, dxpl_id, buf, trans, eq_id) < 0) + if(H5Dwrite_ff(dset_id, memtype, mem_space_id, new_space_id, dxpl_id, buf, trans_id, eq_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") done: @@ -3469,7 +3522,7 @@ done: herr_t H5DOsequence_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, - size_t sequence, hid_t memtype, void *buf, uint64_t trans, hid_t eq_id) + size_t sequence, hid_t memtype, void *buf, hid_t rcxt_id, hid_t eq_id) { hsize_t size[H5S_MAX_RANK]; hsize_t start[H5S_MAX_RANK]; @@ -3483,6 +3536,8 @@ H5DOsequence_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) + H5TRACE9("e", "iiIuhzi*xii", dset_id, dxpl_id, axis, start_off, sequence, + memtype, buf, rcxt_id, eq_id); /* check arguments */ if(!dset_id) @@ -3530,7 +3585,7 @@ H5DOsequence_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, mem_space_id = H5Screate_simple(1, &nelmts, NULL); /* Read the data */ - if(H5Dread_ff(dset_id, memtype, mem_space_id, space_id, dxpl_id, buf, trans, eq_id) < 0) + if(H5Dread_ff(dset_id, memtype, mem_space_id, space_id, dxpl_id, buf, rcxt_id, eq_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") done: @@ -3546,7 +3601,7 @@ done: }/* end H5DOsequence_ff */ herr_t H5DOset_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], - hid_t memtype, const void *buf, uint64_t trans, hid_t eq_id) + hid_t memtype, const void *buf, hid_t trans_id, hid_t eq_id) { hid_t space_id = FAIL; /* old File space */ hid_t mem_space_id = FAIL; /* memory space for data buffer */ @@ -3577,7 +3632,7 @@ herr_t H5DOset_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], mem_space_id = H5Screate_simple(1, &nelmts, NULL); /* Write the data */ - if(H5Dwrite_ff(dset_id, memtype, mem_space_id, space_id, dxpl_id, buf, trans, eq_id) < 0) + if(H5Dwrite_ff(dset_id, memtype, mem_space_id, space_id, dxpl_id, buf, trans_id, eq_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") done: @@ -3593,7 +3648,7 @@ done: }/* end H5DOset_ff */ herr_t H5DOget_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], - hid_t memtype, void *buf, uint64_t trans, hid_t eq_id) + hid_t memtype, void *buf, hid_t rcxt_id, hid_t eq_id) { hid_t space_id = FAIL; /* old File space */ hid_t mem_space_id = FAIL; /* memory space for data buffer */ @@ -3624,7 +3679,7 @@ herr_t H5DOget_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], mem_space_id = H5Screate_simple(1, &nelmts, NULL); /* Write the data */ - if(H5Dread_ff(dset_id, memtype, mem_space_id, space_id, dxpl_id, buf, trans, eq_id) < 0) + if(H5Dread_ff(dset_id, memtype, mem_space_id, space_id, dxpl_id, buf, rcxt_id, eq_id) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data") done: diff --git a/src/H5FFpublic.h b/src/H5FFpublic.h index 71be7ae..8e06882 100644 --- a/src/H5FFpublic.h +++ b/src/H5FFpublic.h @@ -73,132 +73,118 @@ H5_DLL herr_t H5Fflush_ff(hid_t object_id, H5F_scope_t scope, hid_t eq_id); H5_DLL herr_t H5Fclose_ff(hid_t file_id, hid_t eq_id); H5_DLL hid_t H5Gcreate_ff(hid_t loc_id, const char *name, hid_t lcpl_id, - hid_t gcpl_id, hid_t gapl_id, - uint64_t trans, hid_t eq_id); + hid_t gcpl_id, hid_t gapl_id, hid_t trans_id, hid_t eq_id); H5_DLL hid_t H5Gopen_ff(hid_t loc_id, const char *name, hid_t gapl_id, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Gclose_ff(hid_t group_id, hid_t eq_id); H5_DLL hid_t H5Dcreate_ff(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL hid_t H5Dopen_ff(hid_t loc_id, const char *name, hid_t dapl_id, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Dwrite_ff(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, const void *buf, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Dread_ff(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t dxpl_id, void *buf/*out*/, - uint64_t trans, hid_t eq_id); -H5_DLL herr_t H5Dset_extent_ff(hid_t dset_id, const hsize_t size[], uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); +H5_DLL herr_t H5Dset_extent_ff(hid_t dset_id, const hsize_t size[], hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Dclose_ff(hid_t dset_id, hid_t eq_id); H5_DLL herr_t H5Tcommit_ff(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, - hid_t tcpl_id, hid_t tapl_id, uint64_t trans, hid_t eq_id); + hid_t tcpl_id, hid_t tapl_id, hid_t trans_id, hid_t eq_id); H5_DLL hid_t H5Topen_ff(hid_t loc_id, const char *name, hid_t tapl_id, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Tclose_ff(hid_t type_id, hid_t eq_id); H5_DLL hid_t H5Acreate_ff(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, - hid_t acpl_id, hid_t aapl_id, uint64_t trans, hid_t eq_id); + hid_t acpl_id, hid_t aapl_id, hid_t trans_id, hid_t eq_id); H5_DLL hid_t H5Acreate_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, - hid_t lapl_id, uint64_t trans, hid_t eq_id); + hid_t lapl_id, hid_t trans_id, hid_t eq_id); H5_DLL hid_t H5Aopen_ff(hid_t loc_id, const char *attr_name, hid_t aapl_id, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL hid_t H5Aopen_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, - hid_t aapl_id, hid_t lapl_id, uint64_t trans, hid_t eq_id); + hid_t aapl_id, hid_t lapl_id, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Awrite_ff(hid_t attr_id, hid_t dtype_id, const void *buf, - uint64_t trans, hid_t eq_id); -H5_DLL herr_t H5Aread_ff(hid_t attr_id, hid_t dtype_id, void *buf, uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); +H5_DLL herr_t H5Aread_ff(hid_t attr_id, hid_t dtype_id, void *buf, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Arename_ff(hid_t loc_id, const char *old_name, const char *new_name, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Arename_by_name_ff(hid_t loc_id, const char *obj_name, const char *old_attr_name, const char *new_attr_name, hid_t lapl_id, - uint64_t trans, hid_t eq_id); -H5_DLL herr_t H5Adelete_ff(hid_t loc_id, const char *name, uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); +H5_DLL herr_t H5Adelete_ff(hid_t loc_id, const char *name, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Adelete_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, - hid_t lapl_id, uint64_t trans, hid_t eq_id); + hid_t lapl_id, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Aexists_by_name_ff(hid_t loc_id, const char *obj_name, const char *attr_name, - hid_t lapl_id, htri_t *ret, uint64_t trans, hid_t eq_id); + hid_t lapl_id, htri_t *ret, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Aexists_ff(hid_t obj_id, const char *attr_name, htri_t *ret, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Aclose_ff(hid_t attr_id, hid_t eq_id); H5_DLL herr_t H5Lmove_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t lcpl_id, hid_t lapl_id, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Lcopy_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t lcpl_id, hid_t lapl_id, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Lcreate_soft_ff(const char *link_target, hid_t link_loc_id, const char *link_name, - hid_t lcpl_id, hid_t lapl_id, uint64_t trans, hid_t eq_id); + hid_t lcpl_id, hid_t lapl_id, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Lcreate_hard_ff(hid_t cur_loc_id, const char *cur_name, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Ldelete_ff(hid_t loc_id, const char *name, hid_t lapl_id, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Lexists_ff(hid_t loc_id, const char *name, hid_t lapl_id, htri_t *ret, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Lget_info_ff(hid_t link_loc_id, const char *link_name, H5L_ff_info_t *link_buff, - hid_t lapl_id, uint64_t trans, hid_t eq_id); + hid_t lapl_id, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Lget_val_ff(hid_t link_loc_id, const char *link_name, void *linkval_buff, - size_t size, hid_t lapl_id, uint64_t trans, hid_t eq_id); + size_t size, hid_t lapl_id, hid_t rcxt_id, hid_t eq_id); H5_DLL hid_t H5Oopen_by_addr_ff(hid_t loc_id, haddr_ff_t addr, H5O_type_t type, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Olink_ff(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, - hid_t lapl_id, uint64_t trans, hid_t eq_id); + hid_t lapl_id, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Oexists_by_name_ff(hid_t loc_id, const char *name, htri_t *ret, - hid_t lapl_id, uint64_t trans, hid_t eq_id); -H5_DLL herr_t H5Oset_comment_ff(hid_t obj_id, const char *comment, uint64_t trans, hid_t eq_id); + hid_t lapl_id, hid_t rcxt_id, hid_t eq_id); +H5_DLL herr_t H5Oset_comment_ff(hid_t obj_id, const char *comment, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Oset_comment_by_name_ff(hid_t loc_id, const char *name, const char *comment, - hid_t lapl_id, uint64_t trans, hid_t eq_id); + hid_t lapl_id, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Oget_comment_ff(hid_t loc_id, char *comment, size_t bufsize, ssize_t *ret, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Oget_comment_by_name_ff(hid_t loc_id, const char *name, char *comment, size_t bufsize, - ssize_t *ret, hid_t lapl_id, uint64_t trans, hid_t eq_id); + ssize_t *ret, hid_t lapl_id, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Ocopy_ff(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Oget_info_ff(hid_t object_id, H5O_ff_info_t *object_info, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Oget_info_by_name_ff(hid_t loc_id, const char *object_name, H5O_ff_info_t *object_info, hid_t lapl_id, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Oclose_ff(hid_t object_id, hid_t eq_id); /* New Routines for Dynamic Data Structures Use Case (ACG) */ H5_DLL herr_t H5DOappend(hid_t dataset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t memtype, const void *buffer); H5_DLL herr_t H5DOappend_ff(hid_t dataset_id, hid_t dxpl_id, unsigned axis, size_t extension, - hid_t memtype, const void *buffer, uint64_t trans, + hid_t memtype, const void *buffer, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5DOsequence(hid_t dataset_id, hid_t dxpl_id, unsigned axis, hsize_t start, size_t sequence, hid_t memtype, void *buffer); H5_DLL herr_t H5DOsequence_ff(hid_t dataset_id, hid_t dxpl_id, unsigned axis, hsize_t start, size_t sequence, hid_t memtype, void *buffer, - uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5DOset(hid_t dataset_id, hid_t dxpl_id, const hsize_t coord[], hid_t memtype, const void *buffer); H5_DLL herr_t H5DOset_ff(hid_t dataset_id, hid_t dxpl_id, const hsize_t coord[],hid_t memtype, - const void *buffer, uint64_t trans, hid_t eq_id); + const void *buffer, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5DOget(hid_t dataset_id, hid_t dxpl_id, const hsize_t coord[],hid_t memtype, void *buffer); H5_DLL herr_t H5DOget_ff(hid_t dataset_id, hid_t dxpl_id, const hsize_t coord[],hid_t memtype, - void *buffer, uint64_t trans, hid_t eq_id); - -#if 0 -H5_DLL hid_t H5TRcreate(hid_t file_id, uint64_t trans_num); -H5_DLL herr_t H5TRstart(hid_t trans_id, hid_t tripl_id, hid_t eq_id); -H5_DLL herr_t H5TRend(hid_t trans_id, hid_t eq_id); -H5_DLL herr_t H5TRclose(hid_t trans_id); -H5_DLL herr_t H5TRabort(hid_t trans_id, hid_t eq_id); - -H5_DLL hid_t H5RVcreate(hid_t file_id, uint64_t rv_num); -H5_DLL hid_t H5RVacquire(hid_t file_id, /*IN/OUT*/ uint64_t *rv_num, hid_t rvipl_id, hid_t eq_id); - H5_DLL herr_t H5RVrelease(hid_t rv_id, hid_t eq_id); -H5_DLL herr_t H5RVclose(hid_t rv_id); -#endif + void *buffer, hid_t rcxt_id, hid_t eq_id); #endif /* H5_HAVE_EFF */ @@ -195,7 +195,7 @@ H5M_term_interface(void) */ hid_t H5Mcreate_ff(hid_t loc_id, const char *name, hid_t keytype, hid_t valtype, - hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id, uint64_t trans, hid_t eq_id) + hid_t lcpl_id, hid_t mcpl_id, hid_t mapl_id, hid_t trans_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -206,6 +206,8 @@ H5Mcreate_ff(hid_t loc_id, const char *name, hid_t keytype, hid_t valtype, hid_t ret_value; FUNC_ENTER_API(FAIL) + H5TRACE9("i", "i*siiiiiii", loc_id, name, keytype, valtype, lcpl_id, mcpl_id, + mapl_id, trans_id, eq_id); /* Check arguments */ if(!name || !*name) @@ -257,11 +259,12 @@ H5Mcreate_ff(hid_t loc_id, const char *name, hid_t keytype, hid_t valtype, /* call the IOD specific private routine to create a map object */ if(NULL == (map = H5VL_iod_map_create(obj, loc_params, name, keytype, valtype, - lcpl_id, mcpl_id, mapl_id, trans, req))) + lcpl_id, mcpl_id, mapl_id, trans_id, req))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create map") /* increment the ref count on the VOL plugin */ vol_plugin->nrefs ++; + if(request && *req) { H5EQ_t *eq = NULL; /* event queue token */ @@ -304,7 +307,7 @@ done: *------------------------------------------------------------------------- */ hid_t -H5Mopen_ff(hid_t loc_id, const char *name, hid_t mapl_id, uint64_t trans, hid_t eq_id) +H5Mopen_ff(hid_t loc_id, const char *name, hid_t mapl_id, hid_t rcxt_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -315,6 +318,7 @@ H5Mopen_ff(hid_t loc_id, const char *name, hid_t mapl_id, uint64_t trans, hid_t hid_t ret_value; FUNC_ENTER_API(FAIL) + H5TRACE5("i", "i*siii", loc_id, name, mapl_id, rcxt_id, eq_id); /* Check arguments */ if(!name || !*name) @@ -351,7 +355,7 @@ H5Mopen_ff(hid_t loc_id, const char *name, hid_t mapl_id, uint64_t trans, hid_t } /* call the IOD specific private routine to create a map object */ - if(NULL == (map = H5VL_iod_map_open(obj, loc_params, name, mapl_id, trans, req))) + if(NULL == (map = H5VL_iod_map_open(obj, loc_params, name, mapl_id, rcxt_id, req))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create map") /* increment the ref count on the VOL plugin */ @@ -395,7 +399,7 @@ done: */ herr_t H5Mset_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, - const void *value, hid_t dxpl_id, uint64_t trans, hid_t eq_id) + const void *value, hid_t dxpl_id, hid_t trans_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -404,6 +408,8 @@ H5Mset_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_ty herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "ii*xi*xiii", map_id, key_mem_type_id, key, val_mem_type_id, + value, dxpl_id, trans_id, eq_id); /* check arguments */ if(!map_id) @@ -435,7 +441,7 @@ H5Mset_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_ty /* Set the data through the IOD VOL */ if((ret_value = H5VL_iod_map_set(map, key_mem_type_id, key, val_mem_type_id, value, - dxpl_id, trans, req)) < 0) + dxpl_id, trans_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set map KV pair") if(request && *req) { @@ -470,7 +476,7 @@ done: */ herr_t H5Mget_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, - void *value, hid_t dxpl_id, uint64_t trans, hid_t eq_id) + void *value, hid_t dxpl_id, hid_t rcxt_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -479,6 +485,8 @@ H5Mget_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_ty herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE8("e", "ii*xi*xiii", map_id, key_mem_type_id, key, val_mem_type_id, + value, dxpl_id, rcxt_id, eq_id); /* check arguments */ if(!map_id) @@ -510,7 +518,7 @@ H5Mget_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_ty /* Get the data through the IOD VOL */ if((ret_value = H5VL_iod_map_get(map, key_mem_type_id, key, val_mem_type_id, value, - dxpl_id, trans, req)) < 0) + dxpl_id, rcxt_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get map value") if(request && *req) { @@ -546,7 +554,7 @@ done: */ herr_t H5Mget_types_ff(hid_t map_id, hid_t *key_type_id, hid_t *val_type_id, - uint64_t trans, hid_t eq_id) + hid_t rcxt_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -555,6 +563,7 @@ H5Mget_types_ff(hid_t map_id, hid_t *key_type_id, hid_t *val_type_id, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "i*i*iii", map_id, key_type_id, val_type_id, rcxt_id, eq_id); /* check arguments */ if(!map_id) @@ -578,7 +587,7 @@ H5Mget_types_ff(hid_t map_id, hid_t *key_type_id, hid_t *val_type_id, } /* Get the data through the IOD VOL */ - if((ret_value = H5VL_iod_map_get_types(map, key_type_id, val_type_id, trans, req)) < 0) + if((ret_value = H5VL_iod_map_get_types(map, key_type_id, val_type_id, rcxt_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get map value") if(request && *req) { @@ -609,7 +618,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Mget_count_ff(hid_t map_id, hsize_t *count, uint64_t trans, hid_t eq_id) +H5Mget_count_ff(hid_t map_id, hsize_t *count, hid_t rcxt_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -618,6 +627,7 @@ H5Mget_count_ff(hid_t map_id, hsize_t *count, uint64_t trans, hid_t eq_id) herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE4("e", "i*hii", map_id, count, rcxt_id, eq_id); /* check arguments */ if(!map_id) @@ -641,7 +651,7 @@ H5Mget_count_ff(hid_t map_id, hsize_t *count, uint64_t trans, hid_t eq_id) } /* Get the data through the IOD VOL */ - if((ret_value = H5VL_iod_map_get_count(map, count, trans, req)) < 0) + if((ret_value = H5VL_iod_map_get_count(map, count, rcxt_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get map value") if(request && *req) { @@ -675,7 +685,7 @@ done: */ herr_t H5Mexists_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, - htri_t *exists, uint64_t trans, hid_t eq_id) + htri_t *exists, hid_t rcxt_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -684,6 +694,7 @@ H5Mexists_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE6("e", "ii*x*tii", map_id, key_mem_type_id, key, exists, rcxt_id, eq_id); /* check arguments */ if(!map_id) @@ -707,7 +718,7 @@ H5Mexists_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, } /* Get the data through the IOD VOL */ - if((ret_value = H5VL_iod_map_exists(map, key_mem_type_id, key, exists, trans, req)) < 0) + if((ret_value = H5VL_iod_map_exists(map, key_mem_type_id, key, exists, rcxt_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get map value") if(request && *req) { @@ -784,7 +795,7 @@ done: */ herr_t H5Mdelete_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, - uint64_t trans, hid_t eq_id) + hid_t trans_id, hid_t eq_id) { H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ @@ -793,6 +804,7 @@ H5Mdelete_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "ii*xii", map_id, key_mem_type_id, key, trans_id, eq_id); /* check arguments */ if(!map_id) @@ -816,7 +828,7 @@ H5Mdelete_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, } /* delete the key pair through the IOD VOL */ - if((ret_value = H5VL_iod_map_delete(map, key_mem_type_id, key, trans, req)) < 0) + if((ret_value = H5VL_iod_map_delete(map, key_mem_type_id, key, trans_id, req)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get map value") if(request && *req) { diff --git a/src/H5Mpublic.h b/src/H5Mpublic.h index 78b2fdf..22e416b 100644 --- a/src/H5Mpublic.h +++ b/src/H5Mpublic.h @@ -51,21 +51,21 @@ typedef herr_t (*H5M_iterate_func_t)(const void *key, const void *value, void *c /* API wrappers */ H5_DLL hid_t H5Mcreate_ff(hid_t loc_id, const char *name, hid_t keytype, hid_t valtype, hid_t lcpl_id, - hid_t mcpl_id, hid_t mapl_id, uint64_t trans, hid_t eq_id); -H5_DLL hid_t H5Mopen_ff(hid_t loc_id, const char *name, hid_t mapl_id, uint64_t trans, hid_t eq_id); + hid_t mcpl_id, hid_t mapl_id, hid_t trans_id, hid_t eq_id); +H5_DLL hid_t H5Mopen_ff(hid_t loc_id, const char *name, hid_t mapl_id, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Mset_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, - const void *value, hid_t dxpl_id, uint64_t trans, hid_t eq_id); + const void *value, hid_t dxpl_id, hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Mget_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, - void *value, hid_t dxpl_id, uint64_t trans, hid_t eq_id); + void *value, hid_t dxpl_id, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Mget_types_ff(hid_t map_id, hid_t *key_type_id, hid_t *val_type_id, - uint64_t trans, hid_t eq_id); -H5_DLL herr_t H5Mget_count_ff(hid_t map_id, hsize_t *count, uint64_t trans, hid_t eq_id); + hid_t rcxt_id, hid_t eq_id); +H5_DLL herr_t H5Mget_count_ff(hid_t map_id, hsize_t *count, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Mexists_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, - htri_t *exists, uint64_t trans, hid_t eq_id); + htri_t *exists, hid_t rcxt_id, hid_t eq_id); H5_DLL herr_t H5Miterate(hid_t map_id, hid_t key_mem_type_id, hid_t value_mem_type_id, H5M_iterate_func_t callback_func, void *context); H5_DLL herr_t H5Mdelete_ff(hid_t map_id, hid_t key_mem_type_id, const void *key, - uint64_t trans, hid_t eq_id); + hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5Mclose_ff(hid_t map_id, hid_t eq_id); #ifdef __cplusplus diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index cb03c52..7ece9c6 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -50,9 +50,9 @@ #ifdef H5_HAVE_EFF #define H5D_XFER_INJECT_CORRUPTION_SIZE sizeof(hbool_t) -#define H5D_XFER_INJECT_CORRUPTION_DEF FALSE -#define H5D_XFER_INJECT_CORRUPTION_ENC H5P__encode_hbool_t -#define H5D_XFER_INJECT_CORRUPTION_DEC H5P__decode_hbool_t +#define H5D_XFER_INJECT_CORRUPTION_DEF FALSE +#define H5D_XFER_INJECT_CORRUPTION_ENC H5P__encode_hbool_t +#define H5D_XFER_INJECT_CORRUPTION_DEC H5P__decode_hbool_t #define H5D_XFER_CHECKSUM_SIZE sizeof(unsigned) #define H5D_XFER_CHECKSUM_DEF 0 diff --git a/src/H5Pint.c b/src/H5Pint.c index 64d283c..d6732fa 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -216,23 +216,6 @@ const H5P_libclass_t H5P_CLS_TACC[1] = {{ NULL /* Class close callback info */ }}; -/* Transaction finish property list class library initialization object */ -/* (move to proper source code file when used for real) */ -const H5P_libclass_t H5P_CLS_TRFCC[1] = {{ - "transaction finish", /* Class name for debugging */ - H5P_TYPE_TRANSACTION_FINISH, /* Class type */ - &H5P_CLS_ROOT_g, /* Parent class ID */ - &H5P_CLS_TRANSACTION_FINISH_g, /* Pointer to class ID */ - &H5P_LST_TRANSACTION_FINISH_g, /* Pointer to default property list ID */ - NULL, /* Default property registration routine */ - NULL, /* Class creation callback */ - NULL, /* Class creation callback info */ - NULL, /* Class copy callback */ - NULL, /* Class copy callback info */ - NULL, /* Class close callback */ - NULL /* Class close callback info */ -}}; - /* Library property list classes defined in other code modules */ H5_DLLVAR const H5P_libclass_t H5P_CLS_OCRT[1]; /* Object creation */ H5_DLLVAR const H5P_libclass_t H5P_CLS_STRCRT[1]; /* String create */ @@ -249,7 +232,7 @@ H5_DLLVAR const H5P_libclass_t H5P_CLS_ACRT[1]; /* Attribute creation */ H5_DLLVAR const H5P_libclass_t H5P_CLS_LCRT[1]; /* Link creation */ H5_DLLVAR const H5P_libclass_t H5P_CLS_RCACC[1]; /* Read Context acquire */ H5_DLLVAR const H5P_libclass_t H5P_CLS_TRSCC[1]; /* Transaction start */ -//H5_DLLVAR const H5P_libclass_t H5P_CLS_TRFCC[1]; /* Transaction finish */ +H5_DLLVAR const H5P_libclass_t H5P_CLS_TRFCC[1]; /* Transaction finish */ /*****************************/ /* Library Private Variables */ diff --git a/src/H5Prcapl.c b/src/H5Prcapl.c index 590d9b5..a858ef9 100644 --- a/src/H5Prcapl.c +++ b/src/H5Prcapl.c @@ -128,4 +128,4 @@ H5P__rcacc_reg_prop(H5P_genclass_t *pclass) done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P__trscc_reg_prop() */ +} /* end H5P__rcacc_reg_prop() */ diff --git a/src/H5Ptrfpl.c b/src/H5Ptrfpl.c new file mode 100644 index 0000000..d072eb5 --- /dev/null +++ b/src/H5Ptrfpl.c @@ -0,0 +1,131 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*------------------------------------------------------------------------- + * + * Created: H5Ptrspl.c + * August 2013 + * Mohamad Chaarawi <chaarawi@hdfgroup.org> + * + * Purpose: Transaction Finish property list class routines + * + *------------------------------------------------------------------------- + */ + +/****************/ +/* Module Setup */ +/****************/ +#define H5P_PACKAGE /*suppress error about including H5Ppkg */ + + +/***********/ +/* Headers */ +/***********/ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5Ppkg.h" /* Property lists */ +#include "H5TRprivate.h" /* Transactions */ + +/****************/ +/* Local Macros */ +/****************/ + +/* ========= Read Context properties ============ */ +/* Definitions for Transaction being finished */ +#define H5TR_FINISH_ACQUIRE_SIZE sizeof(hbool_t) +#define H5TR_FINISH_ACQUIRE_DEF FALSE +#define H5TR_FINISH_ACQUIRE_ENC H5P__encode_hbool_t +#define H5TR_FINISH_ACQUIRE_DEC H5P__decode_hbool_t + +/******************/ +/* Local Typedefs */ +/******************/ + + +/********************/ +/* Package Typedefs */ +/********************/ + + +/********************/ +/* Local Prototypes */ +/********************/ + +/* Property class callbacks */ +static herr_t H5P__trfcc_reg_prop(H5P_genclass_t *pclass); + + +/*********************/ +/* Package Variables */ +/*********************/ + +/* Transaction finish property list class library initialization object */ +const H5P_libclass_t H5P_CLS_TRFCC[1] = {{ + "transaction finish", /* Class name for debugging */ + H5P_TYPE_TRANSACTION_FINISH, /* Class type */ + &H5P_CLS_ROOT_g, /* Parent class ID */ + &H5P_CLS_TRANSACTION_FINISH_g, /* Pointer to class ID */ + &H5P_LST_TRANSACTION_FINISH_g, /* Pointer to default property list ID */ + H5P__trfcc_reg_prop, /* Default property registration routine */ + NULL, /* Class creation callback */ + NULL, /* Class creation callback info */ + NULL, /* Class copy callback */ + NULL, /* Class copy callback info */ + NULL, /* Class close callback */ + NULL /* Class close callback info */ +}}; + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + + +/*******************/ +/* Local Variables */ +/*******************/ + + + +/*------------------------------------------------------------------------- + * Function: H5P__trfcc_reg_prop + * + * Purpose: Register the transaction finish property list class's + * properties + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Mohamad Chaarawi + * August 2013 + *------------------------------------------------------------------------- + */ +static herr_t +H5P__trfcc_reg_prop(H5P_genclass_t *pclass) +{ + hbool_t acquire = H5TR_FINISH_ACQUIRE_DEF; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_STATIC + + /* Register the size of raw data chunk cache (elements) */ + if(H5P_register_real(pclass, H5TR_FINISH_ACQUIRE_NAME, H5TR_FINISH_ACQUIRE_SIZE, &acquire, + NULL, NULL, NULL, H5TR_FINISH_ACQUIRE_ENC, H5TR_FINISH_ACQUIRE_DEC, + NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5P__trfcc_reg_prop() */ diff --git a/src/H5Ptrspl.c b/src/H5Ptrspl.c index aba5b3c..c75c761 100644 --- a/src/H5Ptrspl.c +++ b/src/H5Ptrspl.c @@ -37,7 +37,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Iprivate.h" /* IDs */ #include "H5Ppkg.h" /* Property lists */ -#include "H5TRprivate.h" /* Read Context */ +#include "H5TRprivate.h" /* Transactions */ /****************/ /* Local Macros */ @@ -39,7 +39,9 @@ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5VLprivate.h" /* VOL plugins */ +#include "H5VLiod_client.h" /* IOD VOL plugin */ +#ifdef H5_HAVE_EFF /****************/ /* Local Macros */ @@ -79,8 +81,8 @@ static const H5I_class_t H5I_RC_CLS[1] = {{ 0, /* Class flags */ 64, /* Minimum hash size for class */ 2, /* # of reserved IDs for class */ - NULL, /* Callback routine for closing objects of this class */ - (H5I_free2_t)H5RC_close /* Callback routine for closing auxilary objects of this class */ + (H5I_free_t)H5RC_close, /* Callback routine for closing objects of this class */ + NULL /* Callback routine for closing auxilary objects of this class */ }}; @@ -204,7 +206,7 @@ H5Pset_rcapl_version_request(hid_t rcapl_id, H5RC_request_t acquire_req) FUNC_ENTER_API(FAIL) - if(H5RC_EXACT > acquire_req || H5RC_LAST < acquire_req) + if(H5RC_LAST < acquire_req) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "Acquire request can be either H5RC_EXACT, H5RC_NEXT, or H5RC_LAST"); /* Get the plist structure */ @@ -221,6 +223,41 @@ done: /*------------------------------------------------------------------------- + * Function: H5Pget_rcapl_version_request + * + * Purpose: Get the request type for acquring the container version, + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pget_rcapl_version_request(hid_t rcapl_id, H5RC_request_t *acquire_req) +{ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* return value */ + + FUNC_ENTER_API(FAIL) + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(rcapl_id, H5P_RC_ACQUIRE))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + + if(acquire_req) { + /* Get property */ + if(H5P_get(plist, H5RC_ACQUIRE_CV_REQUEST_NAME, acquire_req) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET,FAIL, "can't get acquire request"); + } + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pset_rcapl_version_request() */ + + +/*------------------------------------------------------------------------- * Function: H5RCcreate * * Purpose: Wraps an hid_t around a container version and a file ID. @@ -281,8 +318,6 @@ done: H5RC_t * H5RC_create(void *file, uint64_t c_version) { - void *file = NULL; - H5VL_t *vol_plugin = NULL; H5RC_t *rc = NULL; H5RC_t *ret_value = NULL; /* Return value */ @@ -292,7 +327,7 @@ H5RC_create(void *file, uint64_t c_version) if(NULL == (rc = H5FL_CALLOC(H5RC_t))) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't allocate top read context structure") - rc->file = file; + rc->file = (H5VL_iod_file_t *)file; rc->c_version = c_version; /* set return value */ @@ -302,9 +337,26 @@ done: if(!ret_value && rc) rc = H5FL_FREE(H5RC_t, rc); - FUNC_LEAVE_API(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5RC_create() */ + +/*------------------------------------------------------------------------- + * Function: H5RCacquire + * + * Purpose: Acquires a read context from a container for a container + * version c_version. The user can specify options to + * what container version to get if the one being asked for + * is not available. + * + * Return: Success: RC ID + * Failure: NULL + * + * Programmer: Mohamad Chaarawi + * August 2013 + * + *------------------------------------------------------------------------- + */ hid_t H5RCacquire(hid_t file_id, /*IN/OUT*/ uint64_t *c_version, hid_t rcapl_id, hid_t eq_id) @@ -313,8 +365,8 @@ H5RCacquire(hid_t file_id, /*IN/OUT*/ uint64_t *c_version, H5VL_t *vol_plugin = NULL; H5RC_t *rc = NULL; H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ - void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ - hid_t ret_value; + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ + hid_t ret_value = FAIL; FUNC_ENTER_API(FAIL) @@ -351,7 +403,7 @@ H5RCacquire(hid_t file_id, /*IN/OUT*/ uint64_t *c_version, request->vol_plugin = vol_plugin; } - if(H5VL_iod_rc_acquire(file, rc, req) < 0) + if(H5VL_iod_rc_acquire((H5VL_iod_file_t *)file, rc, c_version, rcapl_id, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a read context on container"); if(request && *req) { @@ -361,15 +413,31 @@ H5RCacquire(hid_t file_id, /*IN/OUT*/ uint64_t *c_version, done: FUNC_LEAVE_API(ret_value) -} +} /* end H5RCacquire() */ + +/*------------------------------------------------------------------------- + * Function: H5RCrelease + * + * Purpose: Releases a previously acquired container version. Does not + * close the RC object (i.e. user has to call H5RCclose()). + * + * Return: Success: Non-Negative + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * August 2013 + * + *------------------------------------------------------------------------- + */ herr_t H5RCrelease(hid_t rc_id , hid_t eq_id) { H5RC_t *rc = NULL; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ - herr_t ret_value; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE2("e", "ii", rc_id, eq_id); @@ -378,6 +446,10 @@ H5RCrelease(hid_t rc_id , hid_t eq_id) if(NULL == (rc = (H5RC_t *)H5I_object_verify(rc_id, H5I_RC))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Read Context ID") + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(eq_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); + if(eq_id != H5_EVENT_QUEUE_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) @@ -398,7 +470,123 @@ H5RCrelease(hid_t rc_id , hid_t eq_id) done: FUNC_LEAVE_API(ret_value) -} +} /* end H5RCrelease() */ + + +/*------------------------------------------------------------------------- + * Function: H5RCpersist + * + * Purpose: Persists a previously acquired container version. + * + * Return: Success: Non-Negative + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * August 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5RCpersist(hid_t rc_id , hid_t eq_id) +{ + H5RC_t *rc = NULL; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_API(FAIL) + H5TRACE2("e", "ii", rc_id, eq_id); + + /* get the RC object */ + if(NULL == (rc = (H5RC_t *)H5I_object_verify(rc_id, H5I_RC))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Read Context ID") + + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(eq_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); + + if(eq_id != H5_EVENT_QUEUE_NULL) { + /* create the private request */ + if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); + request->req = NULL; + req = &request->req; + request->next = NULL; + request->vol_plugin = vol_plugin; + } + + if(H5VL_iod_rc_persist(rc, req) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a persist on a read context on container"); + + if(request && *req) { + if(H5EQinsert(eq_id, request) < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "failed to insert request in event queue"); + } + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5RCpersist() */ + + +/*------------------------------------------------------------------------- + * Function: H5RCsnapshot + * + * Purpose: Creates a permanently visible snapshot of a container state. + * + * Return: Success: Non-Negative + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * August 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5RCsnapshot(hid_t rc_id , const char *snapshot_name, hid_t eq_id) +{ + H5RC_t *rc = NULL; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_API(FAIL) + H5TRACE3("e", "i*si", rc_id, snapshot_name, eq_id); + + /* Check arguments */ + if(!snapshot_name || !*snapshot_name) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid snapshot name") + + /* get the RC object */ + if(NULL == (rc = (H5RC_t *)H5I_object_verify(rc_id, H5I_RC))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Read Context ID") + + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(eq_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); + + if(eq_id != H5_EVENT_QUEUE_NULL) { + /* create the private request */ + if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); + request->req = NULL; + req = &request->req; + request->next = NULL; + request->vol_plugin = vol_plugin; + } + + if(H5VL_iod_rc_snapshot(rc, snapshot_name, req) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a snapshot on a read context on container"); + + if(request && *req) { + if(H5EQinsert(eq_id, request) < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "failed to insert request in event queue"); + } + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5RCsnapshot() */ /*------------------------------------------------------------------------- @@ -450,13 +638,11 @@ done: herr_t H5RC_close(H5RC_t *rc) { - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_API(FAIL) + FUNC_ENTER_NOAPI_NOINIT_NOERR rc = H5FL_FREE(H5RC_t, rc); -done: - FUNC_LEAVE_API(ret_value) + FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5RC_close() */ +#endif /* H5_HAVE_EFF */ diff --git a/src/H5RCprivate.h b/src/H5RCprivate.h index e4ffa75..bb77ede 100644 --- a/src/H5RCprivate.h +++ b/src/H5RCprivate.h @@ -27,6 +27,8 @@ #include "H5Pprivate.h" /* Property lists */ #include "H5VLprivate.h" /* VOL plugins */ +#ifdef H5_HAVE_EFF + /**************************/ /* Library Private Macros */ /**************************/ @@ -36,7 +38,7 @@ /****************************/ /* the client Read Context struct */ typedef struct H5RC_t { - void *file; + struct H5VL_iod_file_t *file; uint64_t c_version; } H5RC_t; @@ -47,15 +49,11 @@ typedef struct H5RC_t { /******************************/ /* Library Private Prototypes */ /******************************/ -#if 0 herr_t H5RC_init(void); -/* API wrappers */ H5_DLL H5RC_t *H5RC_create(void *file, uint64_t c_version); -H5_DLL herr_t H5RC_close(H5RC_t *rc); +H5_DLL herr_t H5RC_close(H5RC_t *rcxt); -H5_DLL herr_t H5VL_iod_rc_acquire(H5VL_iod_file_t *file, H5RC_t *rc, void **req); -H5_DLL herr_t H5VL_iod_rc_release(H5RC_t *rc, void **req); -#endif +#endif /* H5_HAVE_EFF */ #endif /* _H5RCprivate_H */ diff --git a/src/H5RCpublic.h b/src/H5RCpublic.h index e6083e3..4d6b500 100644 --- a/src/H5RCpublic.h +++ b/src/H5RCpublic.h @@ -25,6 +25,8 @@ #include "H5public.h" #include "H5Ipublic.h" +#ifdef H5_HAVE_EFF + /*****************/ /* Public Macros */ /*****************/ @@ -56,18 +58,15 @@ extern "C" { H5_DLL hid_t H5RCcreate(hid_t file_id, uint64_t container_version); H5_DLL hid_t H5RCacquire(hid_t file_id, /*IN/OUT*/ uint64_t *container_version, hid_t rcapl_id, hid_t eq_id); -H5_DLL herr_t H5RCrelease(hid_t rc_id , hid_t eq_id); -H5_DLL herr_t H5RCclose(hid_t rc_id); +H5_DLL herr_t H5RCrelease(hid_t rcxt_id , hid_t eq_id); +H5_DLL herr_t H5RCpersist(hid_t rcxt_id, hid_t eq_id); +H5_DLL herr_t H5RCsnapshot(hid_t rcxt_id, const char *snapshot_name, hid_t eq_id); +H5_DLL herr_t H5RCclose(hid_t rcxt_id); H5_DLL herr_t H5Pset_rcapl_version_request(hid_t rcapl_id, H5RC_request_t acquire_req); +H5_DLL herr_t H5Pget_rcapl_version_request(hid_t rcapl_id, H5RC_request_t *acquire_req); -#if 0 -/* Those are not set for now */ -H5_DLL herr_t H5Fskip_trans(hid_t file_id, uint64_t start_trans_num, uint64_t count, hid_t eq_id); -H5_DLL herr_t H5Fpersist(hid_t file_id, uint64_t rc_num, hid_t eq_id); -H5_DLL herr_t H5Fsnapshot(hid_t file_id, uint64_t container_version, - const char* snapshot_name, hid_t eq_id); -#endif +#endif /* H5_HAVE_EFF */ #ifdef __cplusplus } @@ -34,11 +34,15 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5Eprivate.h" /* Error handling */ -#include "H5TRprivate.h" /* Transactions */ +#include "H5EQprivate.h" /* Event Queues */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ +#include "H5RCprivate.h" /* Read Contexts */ +#include "H5TRprivate.h" /* Transactions */ #include "H5VLprivate.h" /* VOL plugins */ +#include "H5VLiod_client.h" /* IOD VOL plugin */ +#ifdef H5_HAVE_EFF /****************/ /* Local Macros */ @@ -78,8 +82,8 @@ static const H5I_class_t H5I_TR_CLS[1] = {{ 0, /* Class flags */ 64, /* Minimum hash size for class */ 2, /* # of reserved IDs for class */ - NULL, /* Callback routine for closing objects of this class */ - (H5I_free2_t)H5TR_close /* Callback routine for closing auxilary objects of this class */ + (H5I_free_t)H5TR_close, /* Callback routine for closing objects of this class */ + NULL /* Callback routine for closing auxilary objects of this class */ }}; @@ -233,6 +237,41 @@ done: /*------------------------------------------------------------------------- + * Function: H5Pget_trspl_num_peers + * + * Purpose: Get the number of peers that will call H5TRstart for a + * transaction. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pget_trspl_num_peers(hid_t trspl_id, unsigned *num_peers) +{ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value = SUCCEED; /* return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE2("e", "i*Iu", trspl_id, num_peers); + + /* Get the plist structure */ + if(NULL == (plist = H5P_object_verify(trspl_id, H5P_TR_START))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + + /* Set property */ + if(H5P_get(plist, H5TR_START_NUM_PEERS_NAME, num_peers) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get num peers in transaction"); + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Pset_trspl_num_peers() */ + + +/*------------------------------------------------------------------------- * Function: H5TRcreate * * Purpose: Wraps an hid_t around a transaction number, a file ID, @@ -253,6 +292,7 @@ H5TRcreate(hid_t file_id, hid_t rc_id, uint64_t trans_num) void *file = NULL; H5VL_t *vol_plugin = NULL; H5TR_t *tr = NULL; + H5RC_t *rc = NULL; hid_t ret_value; FUNC_ENTER_API(FAIL) @@ -296,8 +336,6 @@ done: H5TR_t * H5TR_create(void *file, H5RC_t *rc, uint64_t trans_num) { - void *file = NULL; - H5VL_t *vol_plugin = NULL; H5TR_t *tr = NULL; H5TR_t *ret_value = NULL; /* Return value */ @@ -307,7 +345,7 @@ H5TR_create(void *file, H5RC_t *rc, uint64_t trans_num) if(NULL == (tr = H5FL_CALLOC(H5TR_t))) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, NULL, "can't allocate top transaction structure") - tr->file = file; + tr->file = (H5VL_iod_file_t *)file; tr->c_version = rc->c_version; tr->trans_num = trans_num; @@ -315,10 +353,7 @@ H5TR_create(void *file, H5RC_t *rc, uint64_t trans_num) ret_value = tr; done: - if(!ret_value && tr) - tr = H5FL_FREE(H5TR_t, tr); - - FUNC_LEAVE_API(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5TR_create() */ @@ -326,6 +361,8 @@ done: * Function: H5TRstart * * Purpose: Starts a transaction that has been created with H5TRcreate. + * If the operation fails, the user is still reponsible to call + * H5TRclose() on the returned value to free resources. * * Return: Success: Non-Negative. * Failure: Negative @@ -339,9 +376,10 @@ herr_t H5TRstart(hid_t tr_id, hid_t trspl_id, hid_t eq_id) { H5TR_t *tr = NULL; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ - herr_t ret_value; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE3("e", "iii", tr_id, trspl_id, eq_id); @@ -357,6 +395,10 @@ H5TRstart(hid_t tr_id, hid_t trspl_id, hid_t eq_id) if(TRUE != H5P_isa_class(trspl_id, H5P_TR_START)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not transaction start property list") + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(eq_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); + if(eq_id != H5_EVENT_QUEUE_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) @@ -383,7 +425,11 @@ done: /*------------------------------------------------------------------------- * Function: H5TRfinish * - * Purpose: Finishes/Commits a transaction. + * Purpose: Finishes/Commits a transaction. If rcxt_id is not NULL, + * create a read context from the finished transaction number. + * If the finish fails, the user is still reponsible to call + * H5RCclose() on the rcxt_id and H5TRclose() on the tr_id + * to free resources. * * Return: Success: Non-Negative. * Failure: Negative @@ -394,15 +440,19 @@ done: *------------------------------------------------------------------------- */ herr_t -H5TRfinish(hid_t trans_id, hid_t trfpl_id, hid_t eq_id) +H5TRfinish(hid_t tr_id, hid_t trfpl_id, hid_t *rcxt_id, hid_t eq_id) { H5TR_t *tr = NULL; + H5RC_t *rc = NULL; + H5P_genplist_t *plist; /* Property list pointer */ + hbool_t acquire = FALSE; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ - herr_t ret_value; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) - H5TRACE3("e", "iii", trans_id, trfpl_id, eq_id); + H5TRACE4("e", "ii*ii", tr_id, trfpl_id, rcxt_id, eq_id); /* get the TR object */ if(NULL == (tr = (H5TR_t *)H5I_object_verify(tr_id, H5I_TR))) @@ -415,6 +465,22 @@ H5TRfinish(hid_t trans_id, hid_t trfpl_id, hid_t eq_id) if(TRUE != H5P_isa_class(trfpl_id, H5P_TR_FINISH)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not transaction finish property list") + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(eq_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); + + /* create a new read context object (if user requested it) with + the provided transaction number to finish */ + if(rcxt_id) { + acquire = TRUE; + + if(NULL == (rc = H5RC_create(tr->file, tr->trans_num))) + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create read context"); + /* Get an atom for the event queue with the VOL information as the auxilary struct */ + if((*rcxt_id = H5I_register2(H5I_RC, rc, vol_plugin, TRUE)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize read context handle"); + } + if(eq_id != H5_EVENT_QUEUE_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) @@ -425,7 +491,7 @@ H5TRfinish(hid_t trans_id, hid_t trfpl_id, hid_t eq_id) request->vol_plugin = vol_plugin; } - if(H5VL_iod_tr_finish(tr, trfpl_id, req) < 0) + if(H5VL_iod_tr_finish(tr, acquire, trfpl_id, req) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a transaction finish"); if(request && *req) { @@ -439,12 +505,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5TRfinish + * Function: H5TRset_dependency * * Purpose: Set a depedency between two transactions. Transaction - * associated with trans_id is declaring a dependency on transaction + * associated with tr_id is declaring a dependency on transaction * numbered trans_num. trans_num must be < the transaction number - * trans_id is associated with. + * tr_id is associated with. * * Return: Success: Non-Negative. * Failure: Negative @@ -455,12 +521,13 @@ done: *------------------------------------------------------------------------- */ herr_t -H5TRset_dependency(hid_t trans_id, uint64_t trans_num, hid_t eq_id) +H5TRset_dependency(hid_t tr_id, uint64_t trans_num, hid_t eq_id) { H5TR_t *tr = NULL; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ - herr_t ret_value; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) @@ -471,6 +538,10 @@ H5TRset_dependency(hid_t trans_id, uint64_t trans_num, hid_t eq_id) if(tr->trans_num <= trans_num) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "The dependent transaction must be higher than the one it depends on") + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(eq_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); + if(eq_id != H5_EVENT_QUEUE_NULL) { /* create the private request */ if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) @@ -495,6 +566,61 @@ done: /*------------------------------------------------------------------------- + * Function: H5TRskip + * + * Purpose: Skip a sequence of transaction numbers from the container. + * + * Return: Success: Non-Negative. + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * August 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5TRskip(hid_t file_id, uint64_t start_trans_num, uint64_t count, hid_t eq_id) +{ + void *file = NULL; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ + H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ + void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_API(FAIL) + + /* get the file object */ + if(NULL == (file = (void *)H5I_object_verify(file_id, H5I_FILE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") + + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(file_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information") + + if(eq_id != H5_EVENT_QUEUE_NULL) { + /* create the private request */ + if(NULL == (request = (H5_priv_request_t *)H5MM_calloc(sizeof(H5_priv_request_t)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); + request->req = NULL; + req = &request->req; + request->next = NULL; + request->vol_plugin = vol_plugin; + } + + if(H5VL_iod_tr_skip(file, start_trans_num, count, req) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "failed to request a transaction skip"); + + if(request && *req) { + if(H5EQinsert(eq_id, request) < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "failed to insert request in event queue"); + } + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5TRskip()*/ + + +/*------------------------------------------------------------------------- * Function: H5TRabort * * Purpose: Aborts a transaction @@ -508,15 +634,20 @@ done: *------------------------------------------------------------------------- */ herr_t -H5TRabort(hid_t trans_id, hid_t eq_id) +H5TRabort(hid_t tr_id, hid_t eq_id) { H5TR_t *tr = NULL; + H5VL_t *vol_plugin = NULL; /* VOL plugin pointer this event queue should use */ H5_priv_request_t *request = NULL; /* private request struct inserted in event queue */ void **req = NULL; /* pointer to plugin generate requests (Stays NULL if plugin does not support async */ - herr_t ret_value; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) - H5TRACE2("e", "ii", trans_id, eq_id); + H5TRACE2("e", "ii", tr_id, eq_id); + + /* get the plugin pointer */ + if (NULL == (vol_plugin = (H5VL_t *)H5I_get_aux(eq_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "ID does not contain VOL information"); /* get the TR object */ if(NULL == (tr = (H5TR_t *)H5I_object_verify(tr_id, H5I_TR))) @@ -567,7 +698,7 @@ H5TRclose(hid_t tr_id) H5TRACE1("e", "i", tr_id); /* Check args */ - if(NULL == H5I_object_verify(tr_id,H5I_TR)) + if(NULL == H5I_object_verify(tr_id, H5I_TR)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an transaction ID") if(H5I_dec_app_ref(tr_id) < 0) @@ -581,8 +712,7 @@ done: /*------------------------------------------------------------------------- * Function: H5TR_close * - * Purpose: Closes the specified transaction ID. The ID will no longer be - * valid for accessing the transaction. + * Purpose: Frees the transaction struct. * * Return: Non-negative on success/Negative on failure * @@ -594,13 +724,11 @@ done: herr_t H5TR_close(H5TR_t *tr) { - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_API(FAIL) + FUNC_ENTER_NOAPI_NOINIT_NOERR tr = H5FL_FREE(H5TR_t, tr); -done: - FUNC_LEAVE_API(ret_value) + FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5TR_close() */ +#endif /* H5_HAVE_EFF */ diff --git a/src/H5TRprivate.h b/src/H5TRprivate.h index 54bbe20..d648d2b 100644 --- a/src/H5TRprivate.h +++ b/src/H5TRprivate.h @@ -22,22 +22,24 @@ #include "H5TRpublic.h" /* Private headers needed by this file */ -#include "H5private.h" /* Generic Functions */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5VLprivate.h" /* VOL plugins */ +#include "H5RCprivate.h" /* Read Contexts */ + +#ifdef H5_HAVE_EFF /**************************/ /* Library Private Macros */ /**************************/ +#define H5TR_FINISH_ACQUIRE_NAME "acquire_after_finishing" /****************************/ /* Library Private Typedefs */ /****************************/ /* the transaction struct */ typedef struct H5TR_t { - void *file; + struct H5VL_iod_file_t *file; uint64_t c_version; uint64_t trans_num; + struct H5VL_iod_request_t *request; } H5TR_t; /*****************************/ @@ -47,17 +49,10 @@ typedef struct H5TR_t { /******************************/ /* Library Private Prototypes */ /******************************/ -#if 0 herr_t H5TR_init(void); -/* API wrappers */ H5_DLL H5TR_t *H5TR_create(void *file, H5RC_t *rc, uint64_t trans_num); H5_DLL herr_t H5TR_close(H5TR_t *tr); - -H5_DLL herr_t H5VL_iod_tr_start(H5TR_t *tr, hid_t trspl_id, void **req); -H5_DLL herr_t H5VL_iod_tr_finish(H5TR_t *tr, hid_t trfpl_id, void **req); -H5_DLL herr_t H5VL_iod_tr_set_dependency(H5TR_t *tr, uint64_t trans_num, void **req); -H5_DLL herr_t H5VL_iod_tr_abort(H5TR_t *tr, void **req); -#endif +#endif /* H5_HAVE_EFF */ #endif /* _H5TRprivate_H */ diff --git a/src/H5TRpublic.h b/src/H5TRpublic.h index 07d6291..4d615ef 100644 --- a/src/H5TRpublic.h +++ b/src/H5TRpublic.h @@ -43,6 +43,8 @@ extern "C" { #endif +#ifdef H5_HAVE_EFF + /*********************/ /* Public Prototypes */ /*********************/ @@ -50,12 +52,16 @@ extern "C" { /* API wrappers */ H5_DLL hid_t H5TRcreate(hid_t file_id, hid_t rc_id, uint64_t trans_num); H5_DLL herr_t H5TRstart(hid_t trans_id, hid_t trspl_id, hid_t eq_id); -H5_DLL herr_t H5TRfinish(hid_t trans_id, hid_t trfpl_id, hid_t eq_id); +H5_DLL herr_t H5TRfinish(hid_t trans_id, hid_t trfpl_id, hid_t *rcntxt_id, hid_t eq_id); +H5_DLL herr_t H5TRskip(hid_t file_id, uint64_t start_trans_num, uint64_t count, hid_t eq_id); H5_DLL herr_t H5TRset_dependency(hid_t trans_id, uint64_t trans_num, hid_t eq_id); H5_DLL herr_t H5TRabort(hid_t trans_id, hid_t eq_id); H5_DLL herr_t H5TRclose(hid_t trans_id); H5_DLL herr_t H5Pset_trspl_num_peers(hid_t trspl_id, unsigned num_peers); +H5_DLL herr_t H5Pget_trspl_num_peers(hid_t trspl_id, unsigned *num_peers); + +#endif /* H5_HAVE_EFF */ #ifdef __cplusplus } diff --git a/src/H5VLiod.c b/src/H5VLiod.c index f0a1e20..771d4ff 100644 --- a/src/H5VLiod.c +++ b/src/H5VLiod.c @@ -89,8 +89,18 @@ static hg_id_t H5VL_OBJECT_VISIT_ID; static hg_id_t H5VL_OBJECT_SET_COMMENT_ID; static hg_id_t H5VL_OBJECT_GET_COMMENT_ID; static hg_id_t H5VL_OBJECT_GET_INFO_ID; +static hg_id_t H5VL_RC_ACQUIRE_ID; +static hg_id_t H5VL_RC_RELEASE_ID; +static hg_id_t H5VL_RC_PERSIST_ID; +static hg_id_t H5VL_RC_SNAPSHOT_ID; +static hg_id_t H5VL_TR_START_ID; +static hg_id_t H5VL_TR_FINISH_ID; +static hg_id_t H5VL_TR_SET_DEPEND_ID; +static hg_id_t H5VL_TR_SKIP_ID; +static hg_id_t H5VL_TR_ABORT_ID; static hg_id_t H5VL_CANCEL_OP_ID; + /* global AXE list struct */ typedef struct H5VL_iod_axe_list_t { H5VL_iod_request_t *head; @@ -405,11 +415,11 @@ H5VL__iod_request_add_to_axe_list(H5VL_iod_request_t *request) } request->global_next = NULL; - request->rc ++; + request->ref_count ++; /* process axe_list */ while(axe_list.head && /* If there is a head request */ - (axe_list.head->rc == 1 || (axe_list.head->rc == 2 && request->req != NULL)) && + (axe_list.head->ref_count == 1 || (axe_list.head->ref_count == 2 && request->req != NULL)) && H5VL_IOD_COMPLETED == axe_list.head->state) { axe_list.last_released_task = axe_list.head->axe_id; @@ -463,7 +473,7 @@ H5VL__iod_create_and_forward(hg_id_t op_id, H5RQ_type_t op_type, request->type = op_type; request->data = data; request->req = hg_req; - request->rc = 1; + request->ref_count = 1; request->obj = request_obj; request->axe_id = axe_info->axe_id; request->next = request->prev = NULL; @@ -511,7 +521,7 @@ H5VL__iod_create_and_forward(hg_id_t op_id, H5RQ_type_t op_type, H5VL_iod_request_decr_rc(request); request->req = H5MM_xfree(request->req); - HDassert(1 == request->rc); + HDassert(1 == request->ref_count); } /* end else */ done: @@ -640,6 +650,18 @@ EFF_init(MPI_Comm comm, MPI_Info UNUSED info) object_get_comment_out_t); H5VL_OBJECT_GET_INFO_ID = MERCURY_REGISTER("object_get_info", object_op_in_t, oinfo_t); + H5VL_RC_ACQUIRE_ID = MERCURY_REGISTER("read_context_acquire", + rc_acquire_in_t, rc_acquire_out_t); + H5VL_RC_RELEASE_ID = MERCURY_REGISTER("read_context_release", rc_release_in_t, ret_t); + H5VL_RC_PERSIST_ID = MERCURY_REGISTER("read_context_persist", rc_persist_in_t, ret_t); + H5VL_RC_SNAPSHOT_ID = MERCURY_REGISTER("read_context_snapshot", rc_snapshot_in_t, ret_t); + + H5VL_TR_START_ID = MERCURY_REGISTER("transaction_start", tr_start_in_t, ret_t); + H5VL_TR_FINISH_ID = MERCURY_REGISTER("transaction_finish", tr_finish_in_t, ret_t); + H5VL_TR_SET_DEPEND_ID = MERCURY_REGISTER("transaction_set_depend",tr_set_depend_in_t, ret_t); + H5VL_TR_SKIP_ID = MERCURY_REGISTER("transaction_skip", tr_skip_in_t, ret_t); + H5VL_TR_ABORT_ID = MERCURY_REGISTER("transaction_abort",tr_abort_in_t, ret_t); + H5VL_CANCEL_OP_ID = MERCURY_REGISTER("cancel_op", uint64_t, uint8_t); /* forward the init call to the ION and wait for its completion */ @@ -1591,7 +1613,7 @@ H5VL_iod_file_close(void *_file, hid_t dxpl_id, void **req) while(cur_req) { if(cur_req->state == H5VL_IOD_PENDING) { parent_reqs[num_parents] = cur_req; - cur_req->rc ++; + cur_req->ref_count ++; num_parents ++; } cur_req = cur_req->next; @@ -2296,10 +2318,10 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, input.dset_type_id = dset->remote_dset.type_id; input.mem_type_id = mem_type_id; input.axe_info.axe_id = g_axe_id ++; - if(NULL != dset->common.request) { + if(NULL != dset->common.request && dset->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &dset->common.request->axe_id; - dset->common.request->rc ++; + dset->common.request->ref_count ++; *parent_req = dset->common.request; } else { @@ -2317,10 +2339,10 @@ H5VL_iod_dataset_read(void *_dset, hid_t mem_type_id, hid_t mem_space_id, input_vl.space_id = file_space_id; input_vl.mem_type_id = mem_type_id; input_vl.axe_info.axe_id = g_axe_id ++; - if(NULL != dset->common.request) { + if(NULL != dset->common.request && dset->common.request->state != H5VL_IOD_COMPLETED) { input_vl.axe_info.num_parents = 1; input_vl.axe_info.parent_axe_ids = &dset->common.request->axe_id; - dset->common.request->rc ++; + dset->common.request->ref_count ++; *parent_req = dset->common.request; } else { @@ -2512,10 +2534,10 @@ H5VL_iod_dataset_write(void *_dset, hid_t mem_type_id, hid_t mem_space_id, input.dset_type_id = dset->remote_dset.type_id; input.mem_type_id = mem_type_id; input.axe_info.axe_id = g_axe_id ++; - if(NULL != dset->common.request) { + if(NULL != dset->common.request && dset->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &dset->common.request->axe_id; - dset->common.request->rc ++; + dset->common.request->ref_count ++; *parent_req = dset->common.request; } else { @@ -3496,10 +3518,10 @@ H5VL_iod_attribute_read(void *_attr, hid_t type_id, void *buf, hid_t dxpl_id, vo input.bulk_handle = *bulk_handle; input.type_id = type_id; input.axe_info.axe_id = g_axe_id ++; - if(NULL != attr->common.request) { + if(NULL != attr->common.request && attr->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &attr->common.request->axe_id; - attr->common.request->rc ++; + attr->common.request->ref_count ++; *parent_req = attr->common.request; } else { @@ -3592,10 +3614,10 @@ H5VL_iod_attribute_write(void *_attr, hid_t type_id, const void *buf, hid_t dxpl input.bulk_handle = *bulk_handle; input.type_id = type_id; input.axe_info.axe_id = g_axe_id ++; - if(NULL != attr->common.request) { + if(NULL != attr->common.request && attr->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &attr->common.request->axe_id; - attr->common.request->rc ++; + attr->common.request->ref_count ++; *parent_req = attr->common.request; } else { @@ -5543,7 +5565,7 @@ done: void * H5VL_iod_map_create(void *_obj, H5VL_loc_params_t loc_params, const char *name, hid_t keytype, hid_t valtype, hid_t lcpl_id, hid_t mcpl_id, - hid_t mapl_id, uint64_t trans, void **req) + hid_t mapl_id, hid_t trans_id, void **req) { H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; /* location object to create the group */ H5VL_iod_map_t *map = NULL; /* the map object that is created and passed to the user */ @@ -5650,7 +5672,7 @@ done: void * H5VL_iod_map_open(void *_obj, H5VL_loc_params_t loc_params, const char *name, hid_t mapl_id, - uint64_t trans, void **req) + hid_t rcxt_id, void **req) { H5VL_iod_object_t *obj = (H5VL_iod_object_t *)_obj; /* location object to create the group */ H5VL_iod_map_t *map = NULL; /* the map object that is created and passed to the user */ @@ -5738,7 +5760,7 @@ done: herr_t H5VL_iod_map_set(void *_map, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, const void *value, hid_t dxpl_id, - uint64_t trans, void **req) + hid_t trans_id, void **req) { H5VL_iod_map_t *map = (H5VL_iod_map_t *)_map; map_set_in_t input; @@ -5790,10 +5812,10 @@ H5VL_iod_map_set(void *_map, hid_t key_mem_type_id, const void *key, input.val.buf_size = val_size; input.val.buf = value; input.axe_info.axe_id = g_axe_id ++; - if(NULL != map->common.request) { + if(NULL != map->common.request && map->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &map->common.request->axe_id; - map->common.request->rc ++; + map->common.request->ref_count ++; *parent_req = map->common.request; } else { @@ -5822,7 +5844,7 @@ done: herr_t H5VL_iod_map_get(void *_map, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, void *value, hid_t dxpl_id, - uint64_t trans, void **req) + hid_t rcxt_id, void **req) { H5VL_iod_map_t *map = (H5VL_iod_map_t *)_map; map_get_in_t input; @@ -5872,10 +5894,10 @@ H5VL_iod_map_get(void *_map, hid_t key_mem_type_id, const void *key, input.key.buf = key; input.val_memtype_id = val_mem_type_id; input.axe_info.axe_id = g_axe_id ++; - if(NULL != map->common.request) { + if(NULL != map->common.request && map->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &map->common.request->axe_id; - map->common.request->rc ++; + map->common.request->ref_count ++; *parent_req = map->common.request; } else { @@ -5890,7 +5912,7 @@ H5VL_iod_map_get(void *_map, hid_t key_mem_type_id, const void *key, #endif if(NULL == (output = (map_get_out_t *)H5MM_calloc(sizeof(map_get_out_t)))) - HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate a request"); + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate map get output struct"); output->val.val = value; output->val.val_size = val_size; @@ -5907,7 +5929,7 @@ done: herr_t H5VL_iod_map_get_types(void *_map, hid_t *key_type_id, hid_t *val_type_id, - uint64_t trans, void **req) + hid_t rcxt_id, void **req) { H5VL_iod_map_t *map = (H5VL_iod_map_t *)_map; herr_t ret_value = SUCCEED; @@ -5934,7 +5956,7 @@ done: } /* end H5VL_iod_map_get_types() */ herr_t -H5VL_iod_map_get_count(void *_map, hsize_t *count, uint64_t trans, void **req) +H5VL_iod_map_get_count(void *_map, hsize_t *count, hid_t rcxt_id, void **req) { H5VL_iod_map_t *map = (H5VL_iod_map_t *)_map; map_get_count_in_t input; @@ -5951,10 +5973,10 @@ H5VL_iod_map_get_count(void *_map, hsize_t *count, uint64_t trans, void **req) input.iod_oh = map->remote_map.iod_oh; input.iod_id = map->remote_map.iod_id; input.axe_info.axe_id = g_axe_id ++; - if(NULL != map->common.request) { + if(NULL != map->common.request && map->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &map->common.request->axe_id; - map->common.request->rc ++; + map->common.request->ref_count ++; *parent_req = map->common.request; } else { @@ -5980,7 +6002,7 @@ done: herr_t H5VL_iod_map_exists(void *_map, hid_t key_mem_type_id, const void *key, - htri_t *exists, uint64_t trans, void **req) + htri_t *exists, hid_t rcxt_id, void **req) { H5VL_iod_map_t *map = (H5VL_iod_map_t *)_map; map_op_in_t input; @@ -6011,10 +6033,10 @@ H5VL_iod_map_exists(void *_map, hid_t key_mem_type_id, const void *key, input.key.buf_size = key_size; input.key.buf = key; input.axe_info.axe_id = g_axe_id ++; - if(NULL != map->common.request) { + if(NULL != map->common.request && map->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &map->common.request->axe_id; - map->common.request->rc ++; + map->common.request->ref_count ++; *parent_req = map->common.request; } else { @@ -6052,7 +6074,7 @@ done: herr_t H5VL_iod_map_delete(void *_map, hid_t key_mem_type_id, const void *key, - uint64_t trans, void **req) + hid_t trans_id, void **req) { H5VL_iod_map_t *map = (H5VL_iod_map_t *)_map; map_op_in_t input; @@ -6084,10 +6106,10 @@ H5VL_iod_map_delete(void *_map, hid_t key_mem_type_id, const void *key, input.key.buf_size = key_size; input.key.buf = key; input.axe_info.axe_id = g_axe_id ++; - if(NULL != map->common.request) { + if(NULL != map->common.request && map->common.request->state != H5VL_IOD_COMPLETED) { input.axe_info.num_parents = 1; input.axe_info.parent_axe_ids = &map->common.request->axe_id; - map->common.request->rc ++; + map->common.request->ref_count ++; *parent_req = map->common.request; } else { @@ -6375,4 +6397,508 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_wait() */ + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_rc_acquire + * + * Purpose: Forwards an acquire for a read context to IOD. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_rc_acquire(H5VL_iod_file_t *file, H5RC_t *rc, uint64_t *c_version, + hid_t rcapl_id, void **req) +{ + rc_acquire_in_t input; + H5VL_iod_rc_info_t *rc_info = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + /* set the input structure for the HG encode routine */ + input.coh = file->remote_file.coh; + input.c_version = *c_version; + input.rcapl_id = rcapl_id; + input.axe_info.axe_id = g_axe_id ++; + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + + /* setup the info structure for updating the RC on completion */ + if(NULL == (rc_info = (H5VL_iod_rc_info_t *)H5MM_calloc(sizeof(H5VL_iod_rc_info_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate RC info struct"); + + rc_info->read_cxt = rc; + rc_info->c_version_ptr = c_version; + +#if H5VL_IOD_DEBUG + printf("Read Context Acquire, version %llu, axe id %llu\n", + input.c_version, input.axe_info.axe_id); +#endif + + if(H5VL__iod_create_and_forward(H5VL_RC_ACQUIRE_ID, HG_RC_ACQUIRE, + (H5VL_iod_object_t *)file, 0, 0, NULL, + &input, &rc_info->result, rc_info, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + +#if 0 + /* MSC - this is not needed because the user is repsonsible to wait on the acquire */ + if(NULL != req) { + H5VL_iod_request_t *request = (H5VL_iod_request_t *)(*req); + + rc->request = request; + request->ref_count ++; + } +#endif + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_rc_acquire() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_rc_release + * + * Purpose: Forwards an release on an acquired read context to IOD + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_rc_release(H5RC_t *rc, void **req) +{ + rc_release_in_t input; + int *status = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + /* set the input structure for the HG encode routine */ + input.coh = rc->file->remote_file.coh; + input.c_version = rc->c_version; + input.axe_info.axe_id = g_axe_id ++; + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + + status = (int *)malloc(sizeof(int)); + +#if H5VL_IOD_DEBUG + printf("Read Context Release, version %llu, axe id %llu\n", + input.c_version, input.axe_info.axe_id); +#endif + + if(H5VL__iod_create_and_forward(H5VL_RC_RELEASE_ID, HG_RC_RELEASE, + (H5VL_iod_object_t *)rc->file, 0, 0, NULL, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + +#if 0 + /* MSC - this is not needed because the user is repsonsible to wait on the acquire */ + if(NULL != rc->request) { + H5VL_iod_request_decr_rc(rc->request); + } +#endif + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_rc_release() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_rc_persist + * + * Purpose: Forwards an persist on an acquired read context to IOD + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_rc_persist(H5RC_t *rc, void **req) +{ + rc_persist_in_t input; + int *status = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + /* set the input structure for the HG encode routine */ + input.coh = rc->file->remote_file.coh; + input.c_version = rc->c_version; + input.axe_info.axe_id = g_axe_id ++; + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + + status = (int *)malloc(sizeof(int)); + +#if H5VL_IOD_DEBUG + printf("Read Context Persist, version %llu, axe id %llu\n", + input.c_version, input.axe_info.axe_id); +#endif + + if(H5VL__iod_create_and_forward(H5VL_RC_PERSIST_ID, HG_RC_PERSIST, + (H5VL_iod_object_t *)rc->file, 0, 0, NULL, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_rc_persist() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_rc_snapshot + * + * Purpose: Forwards an snapshot on an acquired read context to IOD + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_rc_snapshot(H5RC_t *rc, const char *snapshot_name, void **req) +{ + rc_snapshot_in_t input; + int *status = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + /* set the input structure for the HG encode routine */ + input.coh = rc->file->remote_file.coh; + input.c_version = rc->c_version; + input.snapshot_name = snapshot_name; + input.axe_info.axe_id = g_axe_id ++; + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + + status = (int *)malloc(sizeof(int)); + +#if H5VL_IOD_DEBUG + printf("Read Context Snapshot, version %llu, axe id %llu\n", + input.c_version, input.axe_info.axe_id); +#endif + + if(H5VL__iod_create_and_forward(H5VL_RC_SNAPSHOT_ID, HG_RC_SNAPSHOT, + (H5VL_iod_object_t *)rc->file, 0, 0, NULL, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_rc_snapshot() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_tr_start + * + * Purpose: Forwards a transaction start call to IOD + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_tr_start(H5TR_t *tr, hid_t trspl_id, void **req) +{ + tr_start_in_t input; + int *status = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + /* set the input structure for the HG encode routine */ + input.coh = tr->file->remote_file.coh; + input.trans_num = tr->trans_num; + input.trspl_id = trspl_id; + input.axe_info.axe_id = g_axe_id ++; + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + + status = (int *)malloc(sizeof(int)); + +#if H5VL_IOD_DEBUG + printf("Transaction start, number %llu, axe id %llu\n", + input.trans_num, input.axe_info.axe_id); +#endif + + if(H5VL__iod_create_and_forward(H5VL_TR_START_ID, HG_TR_START, + (H5VL_iod_object_t *)tr->file, 0, 0, NULL, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + + if(NULL != req) { + H5VL_iod_request_t *request = (H5VL_iod_request_t *)(*req); + + tr->request = request; + request->ref_count ++; + } + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_tr_start() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_tr_finish + * + * Purpose: Forwards a transaction finish call to IOD. + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_tr_finish(H5TR_t *tr, hbool_t acquire, hid_t trfpl_id, void **req) +{ + tr_finish_in_t input; + int *status = NULL; + H5VL_iod_request_t **parent_req = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (parent_req = (H5VL_iod_request_t **)H5MM_malloc(sizeof(H5VL_iod_request_t *)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* set the input structure for the HG encode routine */ + input.coh = tr->file->remote_file.coh; + input.trans_num = tr->trans_num; + input.trfpl_id = trfpl_id; + input.acquire = acquire; + input.axe_info.axe_id = g_axe_id ++; + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + + if(NULL != tr->request && tr->request->state != H5VL_IOD_COMPLETED) { + input.axe_info.num_parents = 1; + input.axe_info.parent_axe_ids = &tr->request->axe_id; + tr->request->ref_count ++; + *parent_req = tr->request; + } + else { + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + *parent_req = NULL; + } + + status = (int *)malloc(sizeof(int)); + +#if H5VL_IOD_DEBUG + printf("Transaction Finish, %llu, axe id %llu, Parent %llu\n", + input.trans_num, input.axe_info.axe_id, + ((input.axe_info.parent_axe_ids!=NULL) ? input.axe_info.parent_axe_ids[0] : 0)); +#endif + + if(H5VL__iod_create_and_forward(H5VL_TR_FINISH_ID, HG_TR_FINISH, + (H5VL_iod_object_t *)tr->file, 0, + input.axe_info.num_parents, parent_req, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + + if(NULL != tr->request) { + H5VL_iod_request_decr_rc(tr->request); + } + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_tr_finish() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_tr_set_dependency + * + * Purpose: Forwards a transaction set dependency to IOD + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_tr_set_dependency(H5TR_t *tr, uint64_t trans_num, void **req) +{ + tr_set_depend_in_t input; + int *status = NULL; + H5VL_iod_request_t **parent_req = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (parent_req = (H5VL_iod_request_t **)H5MM_malloc(sizeof(H5VL_iod_request_t *)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* set the input structure for the HG encode routine */ + input.coh = tr->file->remote_file.coh; + input.child_trans_num = tr->trans_num; + input.parent_trans_num = trans_num; + input.axe_info.axe_id = g_axe_id ++; + + if(NULL != tr->request && tr->request->state != H5VL_IOD_COMPLETED) { + input.axe_info.num_parents = 1; + input.axe_info.parent_axe_ids = &tr->request->axe_id; + tr->request->ref_count ++; + *parent_req = tr->request; + } + else { + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + *parent_req = NULL; + } + +#if H5VL_IOD_DEBUG + printf("Transaction Set Dependency, %llu on %llu axe id %llu, Parent %llu\n", + input.child_trans_num, input.parent_trans_num, input.axe_info.axe_id, + ((input.axe_info.parent_axe_ids!=NULL) ? input.axe_info.parent_axe_ids[0] : 0)); +#endif + + status = (int *)malloc(sizeof(int)); + + if(H5VL__iod_create_and_forward(H5VL_TR_SET_DEPEND_ID, HG_TR_SET_DEPEND, + (H5VL_iod_object_t *)tr->file, 0, + input.axe_info.num_parents, parent_req, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_tr_set_dependency() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_tr_skip + * + * Purpose: Forwards a transaction skip to IOD + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_tr_skip(H5VL_iod_file_t *file, uint64_t start_trans_num, uint64_t count, void **req) +{ + tr_skip_in_t input; + int *status = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + /* set the input structure for the HG encode routine */ + input.coh = file->remote_file.coh; + input.start_trans_num = start_trans_num; + input.count = count; + input.axe_info.axe_id = g_axe_id ++; + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + +#if H5VL_IOD_DEBUG + printf("Transaction Skip, tr %llu count %llu,, axe id %llu\n", + input.start_trans_num, input.count, input.axe_info.axe_id); +#endif + + status = (int *)malloc(sizeof(int)); + + if(H5VL__iod_create_and_forward(H5VL_TR_SKIP_ID, HG_TR_SKIP, + (H5VL_iod_object_t *)file, 0, 0, NULL, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_tr_skip() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_tr_abort + * + * Purpose: Forwards a transaction abort to IOD + * + * Return: Success: SUCCEED + * Failure: FAIL + * + * Programmer: Mohamad Chaarawi + * September 2013 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_iod_tr_abort(H5TR_t *tr, void **req) +{ + tr_abort_in_t input; + int *status = NULL; + H5VL_iod_request_t **parent_req = NULL; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (parent_req = (H5VL_iod_request_t **)H5MM_malloc(sizeof(H5VL_iod_request_t *)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate parent req element"); + + /* set the input structure for the HG encode routine */ + input.coh = tr->file->remote_file.coh; + input.trans_num = tr->trans_num; + input.axe_info.axe_id = g_axe_id ++; + if(NULL != tr->request && tr->request->state != H5VL_IOD_COMPLETED) { + input.axe_info.num_parents = 1; + input.axe_info.parent_axe_ids = &tr->request->axe_id; + tr->request->ref_count ++; + *parent_req = tr->request; + } + else { + input.axe_info.num_parents = 0; + input.axe_info.parent_axe_ids = NULL; + *parent_req = NULL; + } + + status = (int *)malloc(sizeof(int)); + +#if H5VL_IOD_DEBUG + printf("Transaction Abort, tr %llu, axe id %llu, Parent %llu\n", + input.trans_num, input.axe_info.axe_id, + ((input.axe_info.parent_axe_ids!=NULL) ? input.axe_info.parent_axe_ids[0] : 0)); +#endif + + if(H5VL__iod_create_and_forward(H5VL_TR_ABORT_ID, HG_TR_ABORT, + (H5VL_iod_object_t *)tr->file, 0, + input.axe_info.num_parents, parent_req, + &input, status, status, req) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "failed to create and ship VOL op"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_tr_abort() */ + #endif /* H5_HAVE_EFF */ diff --git a/src/H5VLiod_client.c b/src/H5VLiod_client.c index 74db59b..4e126e9 100644 --- a/src/H5VLiod_client.c +++ b/src/H5VLiod_client.c @@ -65,9 +65,9 @@ H5VL_iod_request_decr_rc(H5VL_iod_request_t *request) { FUNC_ENTER_NOAPI_NOINIT_NOERR - request->rc --; + request->ref_count --; - if(0 == request->rc) { + if(0 == request->ref_count) { request->parent_reqs = (H5VL_iod_request_t **)H5MM_xfree(request->parent_reqs); request = (H5VL_iod_request_t *)H5MM_xfree(request); } @@ -1102,8 +1102,62 @@ H5VL_iod_request_complete(H5VL_iod_file_t *file, H5VL_iod_request_t *req) H5VL_iod_request_delete(file, req); break; } + case HG_RC_ACQUIRE: + { + H5VL_iod_rc_info_t *rc_info = (H5VL_iod_rc_info_t *)req->data; + + if(SUCCEED != rc_info->result.ret) { + fprintf(stderr, "Failed to Acquire Read Context %llu\n", *(rc_info->c_version_ptr)); + req->status = H5AO_FAILED; + req->state = H5VL_IOD_COMPLETED; + } + + rc_info->read_cxt->c_version = rc_info->result.c_version; + *rc_info->c_version_ptr = rc_info->result.c_version; + rc_info = (H5VL_iod_rc_info_t *)H5MM_xfree(rc_info); + req->data = NULL; + H5VL_iod_request_delete(file, req); + break; + } + case HG_RC_RELEASE: + case HG_RC_PERSIST: + case HG_RC_SNAPSHOT: + { + int *status = (int *)req->data; + + if(SUCCEED != *status) { + fprintf(stderr, "Failed to Read Context OP\n"); + req->status = H5AO_FAILED; + req->state = H5VL_IOD_COMPLETED; + } + + free(status); + req->data = NULL; + H5VL_iod_request_delete(file, req); + break; + } + case HG_TR_START: + case HG_TR_FINISH: + case HG_TR_SET_DEPEND: + case HG_TR_SKIP: + case HG_TR_ABORT: + { + int *status = (int *)req->data; + + if(SUCCEED != *status) { + fprintf(stderr, "Failed transaction OP\n"); + req->status = H5AO_FAILED; + req->state = H5VL_IOD_COMPLETED; + } + + free(status); + req->data = NULL; + H5VL_iod_request_delete(file, req); + break; + } case HG_LINK_ITERATE: case HG_OBJECT_VISIT: + case HG_MAP_ITERATE: default: req->status = H5AO_FAILED; req->state = H5VL_IOD_COMPLETED; @@ -1140,6 +1194,7 @@ H5VL_iod_request_cancel(H5VL_iod_file_t *file, H5VL_iod_request_t *req) case HG_DSET_READ: case HG_ATTR_WRITE: case HG_ATTR_READ: + case HG_DSET_GET_VL_SIZE: { H5VL_iod_io_info_t *info = (H5VL_iod_io_info_t *)req->data; @@ -1410,11 +1465,46 @@ H5VL_iod_request_cancel(H5VL_iod_file_t *file, H5VL_iod_request_t *req) break; } case HG_OBJECT_OPEN: + case HG_LINK_GET_INFO: + case HG_OBJECT_GET_INFO: req->data = NULL; H5VL_iod_request_delete(file, req); break; + case HG_LINK_GET_VAL: + { + link_get_val_out_t *result = (link_get_val_out_t *)req->data; + + free(result); + req->data = NULL; + H5VL_iod_request_delete(file, req); + break; + } + case HG_RC_ACQUIRE: + { + H5VL_iod_rc_info_t *rc_info = (H5VL_iod_rc_info_t *)req->data; + + rc_info = (H5VL_iod_rc_info_t *)H5MM_xfree(rc_info); + req->data = NULL; + H5VL_iod_request_delete(file, req); + break; + } + case HG_RC_RELEASE: + case HG_TR_START: + case HG_TR_FINISH: + case HG_TR_SET_DEPEND: + case HG_TR_SKIP: + case HG_TR_ABORT: + { + int *status = (int *)req->data; + + free(status); + req->data = NULL; + H5VL_iod_request_delete(file, req); + break; + } case HG_LINK_ITERATE: case HG_OBJECT_VISIT: + case HG_MAP_ITERATE: default: H5VL_iod_request_delete(file, req); HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "Request Type not supported"); @@ -1455,7 +1545,7 @@ H5VL_iod_get_axe_parents(H5VL_iod_object_t *obj, /*IN/OUT*/ size_t *count, } if(NULL != parent_reqs) { parent_reqs[size] = cur_req; - cur_req->rc ++; + cur_req->ref_count ++; } size ++; } @@ -1611,7 +1701,7 @@ H5VL_iod_get_parent_info(H5VL_iod_object_t *obj, H5VL_loc_params_t loc_params, if(cur_obj->request && cur_obj->request->status == H5AO_PENDING) { *parent_req = cur_obj->request; - cur_obj->request->rc ++; + cur_obj->request->ref_count ++; } else { *parent_req = NULL; diff --git a/src/H5VLiod_client.h b/src/H5VLiod_client.h index a3e34df..cc6edc2 100644 --- a/src/H5VLiod_client.h +++ b/src/H5VLiod_client.h @@ -21,6 +21,8 @@ #include "H5FFprivate.h" /* FastForward wrappers */ #include "H5Mpublic.h" +#include "H5RCprivate.h" /* Read contexts */ +#include "H5TRprivate.h" /* Transactions */ #include "H5VLiod_common.h" #ifdef H5_HAVE_EFF @@ -78,7 +80,16 @@ typedef enum H5RQ_type_t { HG_OBJECT_EXISTS, HG_OBJECT_SET_COMMENT, HG_OBJECT_GET_COMMENT, - HG_OBJECT_GET_INFO + HG_OBJECT_GET_INFO, + HG_RC_ACQUIRE, + HG_RC_RELEASE, + HG_RC_PERSIST, + HG_RC_SNAPSHOT, + HG_TR_START, + HG_TR_FINISH, + HG_TR_SET_DEPEND, + HG_TR_SKIP, + HG_TR_ABORT } H5RQ_type_t; /* the client IOD VOL request struct */ @@ -96,7 +107,7 @@ typedef struct H5VL_iod_request_t { struct H5VL_iod_request_t *next; struct H5VL_iod_request_t *global_prev; struct H5VL_iod_request_t *global_next; - unsigned rc; + unsigned ref_count; } H5VL_iod_request_t; /* struct that contains the information about the IOD container */ @@ -252,6 +263,13 @@ typedef struct H5VL_iod_io_info_t { } H5VL_iod_io_info_t; +/* information about a read context acquire request*/ +typedef struct H5VL_iod_rc_info_t { + rc_acquire_out_t result; + H5RC_t *read_cxt; + uint64_t *c_version_ptr; +} H5VL_iod_rc_info_t; + H5_DLL herr_t H5VL_iod_request_delete(H5VL_iod_file_t *file, H5VL_iod_request_t *request); H5_DLL herr_t H5VL_iod_request_add(H5VL_iod_file_t *file, H5VL_iod_request_t *request); H5_DLL herr_t H5VL_iod_request_wait(H5VL_iod_file_t *file, H5VL_iod_request_t *request); @@ -287,25 +305,40 @@ H5_DLL herr_t H5VL_iod_pre_read(hid_t type_id, hid_t space_id, const void *buf, H5_DLL herr_t H5M_init(void); H5_DLL void *H5VL_iod_map_create(void *obj, H5VL_loc_params_t loc_params, const char *name, hid_t keytype, hid_t valtype, hid_t lcpl_id, hid_t mcpl_id, - hid_t mapl_id, uint64_t trans, void **req); + hid_t mapl_id, hid_t trans_id, void **req); H5_DLL void *H5VL_iod_map_open(void *obj, H5VL_loc_params_t loc_params, - const char *name, hid_t mapl_id, uint64_t trans, void **req); + const char *name, hid_t mapl_id, hid_t rcxt_id, void **req); H5_DLL herr_t H5VL_iod_map_set(void *map, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, const void *value, hid_t dxpl_id, - uint64_t trans, void **req); + hid_t trans_id, void **req); H5_DLL herr_t H5VL_iod_map_get(void *map, hid_t key_mem_type_id, const void *key, hid_t val_mem_type_id, void *value, hid_t dxpl_id, - uint64_t trans, void **req); + hid_t rcxt_id, void **req); H5_DLL herr_t H5VL_iod_map_get_types(void *map, hid_t *key_type_id, hid_t *val_type_id, - uint64_t trans, void **req); -H5_DLL herr_t H5VL_iod_map_get_count(void *map, hsize_t *count, uint64_t trans, void **req); + hid_t rcxt_id, void **req); +H5_DLL herr_t H5VL_iod_map_get_count(void *map, hsize_t *count, hid_t rcxt_id, void **req); H5_DLL herr_t H5VL_iod_map_exists(void *map, hid_t key_mem_type_id, const void *key, - htri_t *exists, uint64_t trans, void **req); + htri_t *exists, hid_t rcxt_id, void **req); H5_DLL herr_t H5VL_iod_map_iterate(void *map, hid_t key_mem_type_id, hid_t value_mem_type_id, H5M_iterate_func_t callback_func, void *context); H5_DLL herr_t H5VL_iod_map_delete(void *map, hid_t key_mem_type_id, const void *key, - uint64_t trans, void **req); + hid_t trans_id, void **req); H5_DLL herr_t H5VL_iod_map_close(void *map, void **req); +/* private routines for RC */ +H5_DLL herr_t H5VL_iod_rc_acquire(H5VL_iod_file_t *file, H5RC_t *rc, + uint64_t *c_version, hid_t rcapl_id, void **req); +H5_DLL herr_t H5VL_iod_rc_release(H5RC_t *rc, void **req); +H5_DLL herr_t H5VL_iod_rc_persist(H5RC_t *rc, void **req); +H5_DLL herr_t H5VL_iod_rc_snapshot(H5RC_t *rc, const char *snapshot_name, void **req); + +/* private routines for TR */ +H5_DLL herr_t H5VL_iod_tr_start(H5TR_t *tr, hid_t trspl_id, void **req); +H5_DLL herr_t H5VL_iod_tr_finish(H5TR_t *tr, hbool_t acquire, hid_t trfpl_id, void **req); +H5_DLL herr_t H5VL_iod_tr_set_dependency(H5TR_t *tr, uint64_t trans_num, void **req); +H5_DLL herr_t H5VL_iod_tr_skip(H5VL_iod_file_t *file, uint64_t start_trans_num, + uint64_t count, void **req); +H5_DLL herr_t H5VL_iod_tr_abort(H5TR_t *tr, void **req); + #endif /* H5_HAVE_EFF */ #endif /* _H5VLiod_client_H */ diff --git a/src/H5VLiod_common.h b/src/H5VLiod_common.h index 302e9ea..aa92625 100644 --- a/src/H5VLiod_common.h +++ b/src/H5VLiod_common.h @@ -287,5 +287,31 @@ MERCURY_GEN_PROC(object_get_comment_in_t, ((axe_t)(axe_info)) ((hg_string_t)(path)) ((uint64_t)(length))) MERCURY_GEN_PROC(object_get_comment_out_t, ((int32_t)(ret)) ((name_t)(name))) +MERCURY_GEN_PROC(rc_acquire_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((uint64_t)(c_version)) + ((hid_t)(rcapl_id))) +MERCURY_GEN_PROC(rc_acquire_out_t, ((int32_t)(ret)) ((uint64_t)(c_version))) +MERCURY_GEN_PROC(rc_release_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((uint64_t)(c_version))) +MERCURY_GEN_PROC(rc_persist_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((uint64_t)(c_version))) +MERCURY_GEN_PROC(rc_snapshot_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((hg_string_t)(snapshot_name)) + ((uint64_t)(c_version))) + +MERCURY_GEN_PROC(tr_start_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((uint64_t)(trans_num)) + ((hid_t)(trspl_id))) +MERCURY_GEN_PROC(tr_finish_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((uint64_t)(trans_num)) + ((hbool_t)(acquire)) ((hid_t)(trfpl_id))) +MERCURY_GEN_PROC(tr_set_depend_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((uint64_t)(child_trans_num)) + ((uint64_t)(parent_trans_num))) +MERCURY_GEN_PROC(tr_skip_in_t, ((axe_t)(axe_info)) ((iod_handle_t)(coh)) + ((uint64_t)(start_trans_num)) ((uint64_t)(count))) +MERCURY_GEN_PROC(tr_abort_in_t, ((axe_t)(axe_info)) + ((iod_handle_t)(coh)) ((uint64_t)(trans_num))) + #endif /* H5_HAVE_EFF */ #endif /* _H5VLiod_common_H */ diff --git a/src/H5VLiod_encdec.c b/src/H5VLiod_encdec.c index 8fc807c..6cf4d75 100644 --- a/src/H5VLiod_encdec.c +++ b/src/H5VLiod_encdec.c @@ -447,7 +447,8 @@ static int hg_proc_plist_t(hg_proc_t proc, hid_t *data) H5P_ATTRIBUTE_CREATE_DEFAULT != plist_id && H5P_OBJECT_COPY_DEFAULT != plist_id && H5P_DATASET_ACCESS_DEFAULT != plist_id && H5P_DATASET_XFER_DEFAULT != plist_id && H5P_DATATYPE_CREATE_DEFAULT != plist_id && H5P_DATATYPE_ACCESS_DEFAULT != plist_id && - H5P_LINK_ACCESS_DEFAULT != plist_id) { + H5P_LINK_ACCESS_DEFAULT != plist_id && H5P_RC_ACQUIRE_DEFAULT != plist_id && + H5P_TR_START_DEFAULT != plist_id && H5P_TR_FINISH_DEFAULT != plist_id) { if(H5Pencode(plist_id, NULL, &plist_size) < 0) { HG_ERROR_DEFAULT("PLIST encode Proc error"); return HG_FAIL; diff --git a/src/H5VLiod_server.c b/src/H5VLiod_server.c index 3fb3dc1..77fba12 100644 --- a/src/H5VLiod_server.c +++ b/src/H5VLiod_server.c @@ -158,6 +158,26 @@ H5VLiod_start_handler(MPI_Comm comm, MPI_Info UNUSED info) MERCURY_HANDLER_REGISTER("object_get_info", H5VL_iod_server_object_get_info, object_op_in_t, oinfo_t); + MERCURY_HANDLER_REGISTER("read_context_acquire", H5VL_iod_server_rcxt_acquire, + rc_acquire_in_t, rc_acquire_out_t); + MERCURY_HANDLER_REGISTER("read_context_release", H5VL_iod_server_rcxt_release, + rc_release_in_t, ret_t); + MERCURY_HANDLER_REGISTER("read_context_persist", H5VL_iod_server_rcxt_persist, + rc_persist_in_t, ret_t); + MERCURY_HANDLER_REGISTER("read_context_snapshot", H5VL_iod_server_rcxt_snapshot, + rc_snapshot_in_t, ret_t); + + MERCURY_HANDLER_REGISTER("transaction_start", H5VL_iod_server_trans_start, + tr_start_in_t, ret_t); + MERCURY_HANDLER_REGISTER("transaction_finish", H5VL_iod_server_trans_finish, + tr_finish_in_t, ret_t); + MERCURY_HANDLER_REGISTER("transaction_set_depend", H5VL_iod_server_trans_set_dependency, + tr_set_depend_in_t, ret_t); + MERCURY_HANDLER_REGISTER("transaction_skip", H5VL_iod_server_trans_skip, + tr_skip_in_t, ret_t); + MERCURY_HANDLER_REGISTER("transaction_abort", H5VL_iod_server_trans_abort, + tr_abort_in_t, ret_t); + MERCURY_HANDLER_REGISTER("cancel_op", H5VL_iod_server_cancel_op, uint64_t, uint8_t); /* Initialize engine attribute */ @@ -2825,4 +2845,481 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_iod_server_map_close() */ + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_acquire + * + * Purpose: Function shipper registered call for Read Context Acquire. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_rcxt_acquire(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + rc_acquire_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (rc_acquire_in_t *)H5MM_malloc(sizeof(rc_acquire_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_rcxt_acquire_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_rcxt_acquire() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_release + * + * Purpose: Function shipper registered call for read context release. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_rcxt_release(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + rc_release_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (rc_release_in_t *)H5MM_malloc(sizeof(rc_release_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_rcxt_release_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_rcxt_release() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_persist + * + * Purpose: Function shipper registered call for read context persist. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_rcxt_persist(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + rc_persist_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (rc_persist_in_t *)H5MM_malloc(sizeof(rc_persist_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_rcxt_persist_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_rcxt_persist() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_snapshot + * + * Purpose: Function shipper registered call for read context snapshot. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_rcxt_snapshot(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + rc_snapshot_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (rc_snapshot_in_t *)H5MM_malloc(sizeof(rc_snapshot_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_rcxt_snapshot_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_rcxt_snapshot() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_start + * + * Purpose: Function shipper registered call for transaction start. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_trans_start(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + tr_start_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (tr_start_in_t *)H5MM_malloc(sizeof(tr_start_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_trans_start_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_trans_start() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_finish + * + * Purpose: Function shipper registered call for transaction finish. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_trans_finish(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + tr_finish_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (tr_finish_in_t *)H5MM_malloc(sizeof(tr_finish_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_trans_finish_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_trans_finish() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_set_dependency + * + * Purpose: Function shipper registered call for transaction set_dependency. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_trans_set_dependency(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + tr_set_depend_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (tr_set_depend_in_t *)H5MM_malloc(sizeof(tr_set_depend_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_trans_set_dependency_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_trans_set_dependency() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_skip + * + * Purpose: Function shipper registered call for transaction skip. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_trans_skip(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + tr_skip_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (tr_skip_in_t *)H5MM_malloc(sizeof(tr_skip_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_trans_skip_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_trans_skip() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_abort + * + * Purpose: Function shipper registered call for transaction abort. + * Inserts the real worker routine into the Async Engine. + * + * Return: Success: HG_SUCCESS + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +int +H5VL_iod_server_trans_abort(hg_handle_t handle) +{ + op_data_t *op_data = NULL; + tr_abort_in_t *input; + int ret_value = HG_SUCCESS; + + FUNC_ENTER_NOAPI_NOINIT + + if(NULL == (op_data = (op_data_t *)H5MM_malloc(sizeof(op_data_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(NULL == (input = (tr_abort_in_t *)H5MM_malloc(sizeof(tr_abort_in_t)))) + HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, HG_FAIL, "can't allocate axe op_data struct"); + + if(HG_FAIL == HG_Handler_get_input(handle, input)) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, HG_FAIL, "can't get input parameters"); + + if(NULL == engine) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "AXE engine not started"); + + if(input->axe_info.count && + H5VL__iod_server_finish_axe_tasks(engine, input->axe_info.start_range, + input->axe_info.count) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "Unable to cleanup AXE tasks"); + + op_data->hg_handle = handle; + op_data->input = (void *)input; + + if (AXE_SUCCEED != AXEcreate_task(engine, input->axe_info.axe_id, + input->axe_info.num_parents, input->axe_info.parent_axe_ids, + 0, NULL, H5VL_iod_server_trans_abort_cb, op_data, NULL)) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, HG_FAIL, "can't insert task into async engine"); + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_iod_server_trans_abort() */ + #endif /* H5_HAVE_EFF */ diff --git a/src/H5VLiod_server.h b/src/H5VLiod_server.h index d20ab97..435b0e5 100644 --- a/src/H5VLiod_server.h +++ b/src/H5VLiod_server.h @@ -127,6 +127,15 @@ H5_DLL int H5VL_iod_server_object_exists(hg_handle_t handle); H5_DLL int H5VL_iod_server_object_set_comment(hg_handle_t handle); H5_DLL int H5VL_iod_server_object_get_comment(hg_handle_t handle); H5_DLL int H5VL_iod_server_object_get_info(hg_handle_t handle); +H5_DLL int H5VL_iod_server_rcxt_acquire(hg_handle_t handle); +H5_DLL int H5VL_iod_server_rcxt_release(hg_handle_t handle); +H5_DLL int H5VL_iod_server_rcxt_persist(hg_handle_t handle); +H5_DLL int H5VL_iod_server_rcxt_snapshot(hg_handle_t handle); +H5_DLL int H5VL_iod_server_trans_start(hg_handle_t handle); +H5_DLL int H5VL_iod_server_trans_finish(hg_handle_t handle); +H5_DLL int H5VL_iod_server_trans_set_dependency(hg_handle_t handle); +H5_DLL int H5VL_iod_server_trans_skip(hg_handle_t handle); +H5_DLL int H5VL_iod_server_trans_abort(hg_handle_t handle); H5_DLL void H5VL_iod_server_file_create_cb(AXE_engine_t axe_engine, size_t num_n_parents, AXE_task_t n_parents[], @@ -310,6 +319,43 @@ H5_DLL void H5VL_iod_server_object_get_info_cb(AXE_engine_t axe_engine, size_t num_s_parents, AXE_task_t s_parents[], void *op_data); +H5_DLL void H5VL_iod_server_rcxt_acquire_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_rcxt_release_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_rcxt_persist_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_rcxt_snapshot_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_trans_start_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_trans_finish_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_trans_set_dependency_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_trans_skip_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); +H5_DLL void H5VL_iod_server_trans_abort_cb(AXE_engine_t axe_engine, + size_t num_n_parents, AXE_task_t n_parents[], + size_t num_s_parents, AXE_task_t s_parents[], + void *op_data); + /* Helper routines used several times in different places */ H5_DLL herr_t H5VL_iod_server_traverse(iod_handle_t coh, iod_obj_id_t loc_id, iod_handle_t loc_handle, const char *path, hbool_t create_interm_grps, diff --git a/src/H5VLiod_trans.c b/src/H5VLiod_trans.c new file mode 100644 index 0000000..49c87bc --- /dev/null +++ b/src/H5VLiod_trans.c @@ -0,0 +1,536 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * Copyright by the Board of Trustees of the University of Illinois. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic HDF5 document set and * + * is linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * + * access to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include "H5VLiod_server.h" +#include "H5RCpublic.h" +#include "H5TRpublic.h" + +#ifdef H5_HAVE_EFF + +/* + * Programmer: Mohamad Chaarawi <chaarawi@hdfgroup.gov> + * July, 2013 + * + * Purpose: The IOD plugin server side transaction and read context routines. + */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_acquire_cb + * + * Purpose: Acquire a read context of a container using a version number. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_rcxt_acquire_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + rc_acquire_in_t *input = (rc_acquire_in_t *)op_data->input; + rc_acquire_out_t output; + iod_handle_t coh = input->coh; /* the container handle */ + iod_trans_id_t c_version = input->c_version; + iod_trans_id_t acquired_version; + hid_t rcapl_id; + H5RC_request_t acquire_req; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + + if(H5P_DEFAULT == input->rcapl_id) + input->rcapl_id = H5Pcopy(H5P_RC_ACQUIRE_DEFAULT); + rcapl_id = input->rcapl_id; + + if(H5Pget_rcapl_version_request(rcapl_id, &acquire_req) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET,FAIL, "can't get acquire request property"); + + switch(acquire_req) { + case H5RC_EXACT: +#if H5VL_IOD_DEBUG + fprintf(stderr, "Exact Acquire Read Context %llu\n", input->c_version); +#endif + if(iod_trans_start(coh, &c_version, NULL, 0, IOD_TRANS_RD, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't acquire read context"); + acquired_version = c_version; + break; + case H5RC_LAST: +#if H5VL_IOD_DEBUG + fprintf(stderr, "Acquire LAST Read Context\n"); +#endif + c_version = IOD_TID_UNKNOWN; + if(iod_trans_start(coh, &c_version, NULL, 0, IOD_TRANS_RD, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't acquire read context"); + acquired_version = c_version; + break; + case H5RC_NEXT: + { + iod_container_tids_t tids; + uint64_t u; + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Next Acquire Read Context %llu\n", input->c_version); +#endif + if(iod_container_query_tids(coh, &tids, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get container tids status"); + + acquired_version = IOD_TID_UNKNOWN; + + for(u=c_version; u<tids.latest_rdable ; u++) { + if(iod_trans_start(coh, &u, NULL, 0, IOD_TRANS_RD, NULL) < 0) + continue; + acquired_version = u; + break; + } + + if(IOD_TID_UNKNOWN == acquired_version) { + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, + "can't get a read version after %llu\n", c_version); + } + break; + } + default: + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "invalid acquire request"); + } + + output.c_version = acquired_version; + output.ret = ret_value; + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Done with Acquire Read Context. Acquired %llu\n", output.c_version); +#endif + + HG_Handler_start_output(op_data->hg_handle, &output); + +done: + /* return an UNDEFINED oh to the client if the operation failed */ + if(ret_value < 0) { + fprintf(stderr, "Failed to Acquire Read context\n"); + output.ret = FAIL; + HG_Handler_start_output(op_data->hg_handle, &output); + } + + input = (rc_acquire_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_rcxt_acquire_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_release_cb + * + * Purpose: Release a read context of a container using a version number. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_rcxt_release_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + rc_release_in_t *input = (rc_release_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Release Read Context %llu\n", input->c_version); +#endif + + if(iod_trans_finish(coh, input->c_version, NULL, 0, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't release Read Context %llu", input->c_version); + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Release Read context\n"); + + input = (rc_release_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_rcxt_release_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_persist_cb + * + * Purpose: Persist a read context of a container using a version number. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_rcxt_persist_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + rc_persist_in_t *input = (rc_persist_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Persist Read Context %llu\n", input->c_version); +#endif + + if(iod_trans_persist(coh, input->c_version, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't persist Read Context %llu", input->c_version); + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Persist Read context\n"); + + input = (rc_persist_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_rcxt_persist_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_rcxt_snapshot_cb + * + * Purpose: Snapshot a read context of a container using a version number. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_rcxt_snapshot_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + rc_snapshot_in_t *input = (rc_snapshot_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Snapshot %s with Read Context %llu\n", input->snapshot_name, input->c_version); +#endif + + /* MSC - can only snapshot latest version */ + if(iod_container_snapshot(coh, input->snapshot_name, NULL, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't snapshot Read Context %llu", input->c_version); + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Snapshot Read context\n"); + + input = (rc_snapshot_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_rcxt_snapshot_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_start_cb + * + * Purpose: Start a transaction on a container. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_trans_start_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + tr_start_in_t *input = (tr_start_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + hid_t trspl_id; + iod_trans_id_t trans_num = input->trans_num; + unsigned num_peers; /* the number of peers starting this transaction */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Transaction Start %llu\n", input->trans_num); +#endif + + if(H5P_DEFAULT == input->trspl_id) + input->trspl_id = H5Pcopy(H5P_TR_START_DEFAULT); + trspl_id = input->trspl_id; + + if(H5Pget_trspl_num_peers(trspl_id, &num_peers) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get acquire request property"); + + if(iod_trans_start(coh, &trans_num, NULL, num_peers, IOD_TRANS_WR, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't start transaction"); + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Done with Transaction Start\n"); +#endif + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Start Transaction\n"); + + input = (tr_start_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_trans_start_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_finish_cb + * + * Purpose: Finish a transaction on a container. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_trans_finish_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + tr_finish_in_t *input = (tr_finish_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + hid_t trfpl_id; + iod_trans_id_t trans_num = input->trans_num; + hbool_t acquire = input->acquire; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Transaction Finish %llu\n", input->trans_num); +#endif + + /* Finish the transaction */ + if(iod_trans_finish(coh, trans_num, NULL, 0, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't finish transaction"); + + /* if the flag is true, acquire a read context on the finished transaction */ + if(TRUE == acquire) { + fprintf(stderr, "Transaction Acquire after Finish %llu\n", trans_num); + + if(iod_trans_start(coh, &trans_num, NULL, 0, IOD_TRANS_RD, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't acquire read context"); + } + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Done with Transaction Finish\n"); +#endif + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Finish Transaction\n"); + + input = (tr_finish_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_trans_finish_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_set_dependency_cb + * + * Purpose: Set Dependency between 2 transactions on a container. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_trans_set_dependency_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + tr_set_depend_in_t *input = (tr_set_depend_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Transaction Set_Dependency %llu on %llu\n", + input->child_trans_num, input->parent_trans_num); +#endif + + fprintf(stderr, "Can't do Set_Dependency with Current IOD\n"); + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Done with Transaction Set_Dependency\n"); +#endif + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Set_Dependency between Transactions\n"); + + input = (tr_set_depend_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_trans_set_dependency_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_skip_cb + * + * Purpose: Skip a number of transactions on a container. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_trans_skip_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + tr_skip_in_t *input = (tr_skip_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + iod_trans_id_t start_trans_num = input->start_trans_num; + uint64_t count = input->count; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Transaction Skip %llu starting at %llu\n", count, start_trans_num); +#endif + + fprintf(stderr, "NO IOD Transaction Skip at the moment\n"); + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Done with Transaction Skip\n"); +#endif + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Skip Transaction\n"); + + input = (tr_skip_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_trans_skip_cb() */ + + +/*------------------------------------------------------------------------- + * Function: H5VL_iod_server_trans_abort_cb + * + * Purpose: Abort a transaction on a container. + * + * Return: Success: SUCCEED + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * September, 2013 + * + *------------------------------------------------------------------------- + */ +void +H5VL_iod_server_trans_abort_cb(AXE_engine_t UNUSED axe_engine, + size_t UNUSED num_n_parents, AXE_task_t UNUSED n_parents[], + size_t UNUSED num_s_parents, AXE_task_t UNUSED s_parents[], + void *_op_data) +{ + op_data_t *op_data = (op_data_t *)_op_data; + tr_abort_in_t *input = (tr_abort_in_t *)op_data->input; + iod_handle_t coh = input->coh; /* the container handle */ + iod_trans_id_t trans_num = input->trans_num; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI_NOINIT + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Transaction Abort %llu\n", input->trans_num); +#endif + + if(iod_trans_finish(coh, trans_num, NULL, IOD_TRANS_ABORT_SINGLE, NULL) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't abort transaction"); + +#if H5VL_IOD_DEBUG + fprintf(stderr, "Done with Transaction Abort\n"); +#endif + +done: + if(HG_SUCCESS != HG_Handler_start_output(op_data->hg_handle, &ret_value)) + fprintf(stderr, "Failed to Abort Transaction\n"); + + input = (tr_abort_in_t *)H5MM_xfree(input); + op_data = (op_data_t *)H5MM_xfree(op_data); + + FUNC_LEAVE_NOAPI_VOID +} /* end H5VL_iod_server_trans_abort_cb() */ + +#endif /* H5_HAVE_EFF */ diff --git a/src/H5private.h b/src/H5private.h index 2f90c45..cb5c7d3 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -2365,6 +2365,8 @@ H5_DLL int H5AC_term_interface(void); H5_DLL int H5D_term_interface(void); H5_DLL int H5E_term_interface(void); H5_DLL int H5EQ_term_interface(void); +H5_DLL int H5RC_term_interface(void); +H5_DLL int H5TR_term_interface(void); H5_DLL int H5F_term_interface(void); H5_DLL int H5FS_term_interface(void); H5_DLL int H5G_term_interface(void); diff --git a/src/Makefile.am b/src/Makefile.am index dedf109..427bed9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -60,13 +60,13 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ H5FAstat.c H5FAtest.c \ H5VL.c H5VLint.c H5VLnative.c \ - H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c H5VLiod_util.c\ - H5VLiod_file.c H5VLiod_group.c H5VLiod_dset.c H5VLiod_dtype.c \ + H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c H5VLiod_util.c \ + H5VLiod_file.c H5VLiod_group.c H5VLiod_dset.c H5VLiod_dtype.c H5VLiod_trans.c \ H5VLiod_attr.c H5VLiod_link.c H5VLiod_obj.c H5VLiod_map.c \ H5FD.c H5FDcore.c \ H5FDdirect.c H5FDfamily.c H5FDint.c H5FDlog.c H5FDmpi.c H5FDmpio.c \ H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDspace.c H5FDstdio.c \ - H5FF.c H5EQ.c H5M.c\ + H5FF.c H5EQ.c H5RC.c H5TR.c H5M.c\ H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c H5FSstat.c H5FStest.c \ H5G.c H5Gbtree2.c H5Gcache.c \ H5Gcompact.c H5Gdense.c H5Gdeprec.c H5Gent.c \ @@ -93,7 +93,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c \ H5Pdeprec.c H5Pdxpl.c H5Pencdec.c \ H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \ - H5Pgcpl.c H5Pint.c H5Prcapl.c H5Ptrspl.c \ + H5Pgcpl.c H5Pint.c H5Prcapl.c H5Ptrspl.c H5Ptrfpl.c \ H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \ H5PL.c \ H5R.c H5Rdeprec.c \ @@ -122,7 +122,8 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers H5Epubgen.h H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDcore.h H5FDdirect.h \ H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h \ H5FDmulti.h H5FDsec2.h H5FDstdio.h \ - H5VLpublic.h H5VLnative.h H5VLiod.h H5FFpublic.h H5EQpublic.h H5Mpublic.h\ + H5VLpublic.h H5VLnative.h H5VLiod.h \ + H5FFpublic.h H5EQpublic.h H5RCpublic.h H5TRpublic.h H5Mpublic.h\ H5Gpublic.h H5Ipublic.h H5Lpublic.h \ H5MMpublic.h H5Opublic.h H5Ppublic.h \ H5PLextern.h \ diff --git a/src/Makefile.in b/src/Makefile.in index 11c754c..acb4276 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -138,17 +138,17 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5VLint.lo H5VLnative.lo H5VLiod.lo H5VLiod_client.lo \ H5VLiod_server.lo H5VLiod_encdec.lo H5VLiod_util.lo \ H5VLiod_file.lo H5VLiod_group.lo H5VLiod_dset.lo \ - H5VLiod_dtype.lo H5VLiod_attr.lo H5VLiod_link.lo \ - H5VLiod_obj.lo H5VLiod_map.lo H5FD.lo H5FDcore.lo \ - H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo H5FDmpi.lo \ - H5FDmpio.lo H5FDmpiposix.lo H5FDmulti.lo H5FDsec2.lo \ - H5FDspace.lo H5FDstdio.lo H5FF.lo H5EQ.lo H5M.lo H5FL.lo \ - H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo H5FSsection.lo \ - H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo H5Gcache.lo \ - H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo H5Gint.lo \ - H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo H5Goh.lo \ - H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo H5HF.lo \ - H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ + H5VLiod_dtype.lo H5VLiod_trans.lo H5VLiod_attr.lo \ + H5VLiod_link.lo H5VLiod_obj.lo H5VLiod_map.lo H5FD.lo \ + H5FDcore.lo H5FDdirect.lo H5FDfamily.lo H5FDint.lo H5FDlog.lo \ + H5FDmpi.lo H5FDmpio.lo H5FDmpiposix.lo H5FDmulti.lo \ + H5FDsec2.lo H5FDspace.lo H5FDstdio.lo H5FF.lo H5EQ.lo H5RC.lo \ + H5TR.lo H5M.lo H5FL.lo H5FO.lo H5FS.lo H5FScache.lo H5FSdbg.lo \ + H5FSsection.lo H5FSstat.lo H5FStest.lo H5G.lo H5Gbtree2.lo \ + H5Gcache.lo H5Gcompact.lo H5Gdense.lo H5Gdeprec.lo H5Gent.lo \ + H5Gint.lo H5Glink.lo H5Gloc.lo H5Gname.lo H5Gnode.lo H5Gobj.lo \ + H5Goh.lo H5Groot.lo H5Gstab.lo H5Gtest.lo H5Gtraverse.lo \ + H5HF.lo H5HFbtree2.lo H5HFcache.lo H5HFdbg.lo H5HFdblock.lo \ H5HFdtable.lo H5HFhdr.lo H5HFhuge.lo H5HFiblock.lo H5HFiter.lo \ H5HFman.lo H5HFsection.lo H5HFspace.lo H5HFstat.lo H5HFtest.lo \ H5HFtiny.lo H5HG.lo H5HGcache.lo H5HGdbg.lo H5HGquery.lo \ @@ -164,19 +164,20 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \ H5Oshared.lo H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo \ H5P.lo H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo \ H5Pdxpl.lo H5Pencdec.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo \ - H5Pgcpl.lo H5Pint.lo H5Prcapl.lo H5Ptrspl.lo H5Plapl.lo \ - H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo H5Ptest.lo \ - H5PL.lo H5R.lo H5Rdeprec.lo H5UC.lo H5RS.lo H5S.lo H5Sall.lo \ - H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo H5Spoint.lo \ - H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo H5SMbtree2.lo \ - H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo H5T.lo \ - H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo H5Tconv.lo \ - H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo H5Tfields.lo \ - H5Tfixed.lo H5Tfloat.lo H5Tinit.lo H5Tnative.lo H5Toffset.lo \ - H5Toh.lo H5Topaque.lo H5Torder.lo H5Tpad.lo H5Tprecis.lo \ - H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo H5V.lo H5WB.lo \ - H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo H5Znbit.lo H5Zshuffle.lo \ - H5Zszip.lo H5Zscaleoffset.lo H5Ztrans.lo + H5Pgcpl.lo H5Pint.lo H5Prcapl.lo H5Ptrspl.lo H5Ptrfpl.lo \ + H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo \ + H5Ptest.lo H5PL.lo H5R.lo H5Rdeprec.lo H5UC.lo H5RS.lo H5S.lo \ + H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \ + H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \ + H5SMbtree2.lo H5SMcache.lo H5SMmessage.lo H5SMtest.lo H5ST.lo \ + H5T.lo H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo \ + H5Tconv.lo H5Tcset.lo H5Tdbg.lo H5Tdeprec.lo H5Tenum.lo \ + H5Tfields.lo H5Tfixed.lo H5Tfloat.lo H5Tinit.lo H5Tnative.lo \ + H5Toffset.lo H5Toh.lo H5Topaque.lo H5Torder.lo H5Tpad.lo \ + H5Tprecis.lo H5Tstrpad.lo H5Tvisit.lo H5Tvlen.lo H5TS.lo \ + H5V.lo H5WB.lo H5Z.lo H5Zdeflate.lo H5Zfletcher32.lo \ + H5Znbit.lo H5Zshuffle.lo H5Zszip.lo H5Zscaleoffset.lo \ + H5Ztrans.lo libhdf5_la_OBJECTS = $(am_libhdf5_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -570,13 +571,13 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \ H5FAstat.c H5FAtest.c \ H5VL.c H5VLint.c H5VLnative.c \ - H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c H5VLiod_util.c\ - H5VLiod_file.c H5VLiod_group.c H5VLiod_dset.c H5VLiod_dtype.c \ + H5VLiod.c H5VLiod_client.c H5VLiod_server.c H5VLiod_encdec.c H5VLiod_util.c \ + H5VLiod_file.c H5VLiod_group.c H5VLiod_dset.c H5VLiod_dtype.c H5VLiod_trans.c \ H5VLiod_attr.c H5VLiod_link.c H5VLiod_obj.c H5VLiod_map.c \ H5FD.c H5FDcore.c \ H5FDdirect.c H5FDfamily.c H5FDint.c H5FDlog.c H5FDmpi.c H5FDmpio.c \ H5FDmpiposix.c H5FDmulti.c H5FDsec2.c H5FDspace.c H5FDstdio.c \ - H5FF.c H5EQ.c H5M.c\ + H5FF.c H5EQ.c H5RC.c H5TR.c H5M.c\ H5FL.c H5FO.c H5FS.c H5FScache.c H5FSdbg.c H5FSsection.c H5FSstat.c H5FStest.c \ H5G.c H5Gbtree2.c H5Gcache.c \ H5Gcompact.c H5Gdense.c H5Gdeprec.c H5Gent.c \ @@ -603,7 +604,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \ H5P.c H5Pacpl.c H5Pdapl.c H5Pdcpl.c \ H5Pdeprec.c H5Pdxpl.c H5Pencdec.c \ H5Pfapl.c H5Pfcpl.c H5Pfmpl.c \ - H5Pgcpl.c H5Pint.c H5Prcapl.c H5Ptrspl.c \ + H5Pgcpl.c H5Pint.c H5Prcapl.c H5Ptrspl.c H5Ptrfpl.c \ H5Plapl.c H5Plcpl.c H5Pocpl.c H5Pocpypl.c H5Pstrcpl.c H5Ptest.c \ H5PL.c \ H5R.c H5Rdeprec.c \ @@ -632,7 +633,8 @@ include_HEADERS = hdf5.h H5api_adpt.h H5overflow.h H5pubconf.h H5public.h H5vers H5Epubgen.h H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDcore.h H5FDdirect.h \ H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h \ H5FDmulti.h H5FDsec2.h H5FDstdio.h \ - H5VLpublic.h H5VLnative.h H5VLiod.h H5FFpublic.h H5EQpublic.h H5Mpublic.h\ + H5VLpublic.h H5VLnative.h H5VLiod.h \ + H5FFpublic.h H5EQpublic.h H5RCpublic.h H5TRpublic.h H5Mpublic.h\ H5Gpublic.h H5Ipublic.h H5Lpublic.h \ H5MMpublic.h H5Opublic.h H5Ppublic.h \ H5PLextern.h \ @@ -980,8 +982,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Prcapl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Pstrcpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ptest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ptrfpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ptrspl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5R.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5RC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5RS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Rdeprec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5S.Plo@am__quote@ @@ -1001,6 +1005,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Sselect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Stest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5T.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5TR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5TS.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tarray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Tbit.Plo@am__quote@ @@ -1041,6 +1046,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_obj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_trans.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLiod_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5VLnative.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5WB.Plo@am__quote@ |