diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2018-10-27 06:33:07 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2018-10-27 06:33:07 (GMT) |
commit | 6e84fd8327138e48bd515665c1919bc8cf22dc9f (patch) | |
tree | 8e1db3902adcb85df26dd92fd5a7c7eeeee3eb6f /src | |
parent | ce3d1ec9ea5a7a0627d948687d64dc7e5e76f6cd (diff) | |
download | hdf5-6e84fd8327138e48bd515665c1919bc8cf22dc9f.zip hdf5-6e84fd8327138e48bd515665c1919bc8cf22dc9f.tar.gz hdf5-6e84fd8327138e48bd515665c1919bc8cf22dc9f.tar.bz2 |
Remove virtual dataset refresh code's direct use of native VOL plugin's ID.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Dvirtual.c | 21 | ||||
-rw-r--r-- | src/H5VLnative.c | 8 | ||||
-rw-r--r-- | src/H5VLnative_private.h | 1 |
3 files changed, 12 insertions, 18 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 7d127c2..3dc44c5 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -2963,7 +2963,6 @@ static herr_t H5D__virtual_refresh_source_dset(H5D_t **dset) { hid_t temp_id = H5I_INVALID_HID; /* Temporary dataset identifier */ - hid_t native_vol_id = H5I_INVALID_HID; /* ID for the native VOL driver */ H5VL_object_t *vol_obj = NULL; /* VOL object stored with the ID */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2972,13 +2971,16 @@ H5D__virtual_refresh_source_dset(H5D_t **dset) /* Sanity check */ HDassert(dset && *dset); - /* Get the native VOL driver's ID */ -/* XXX (VOL MERGE): Need a better solution than this */ - if((native_vol_id = H5VL_native_get_driver_id()) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get native VOL driver ID") - /* Get a temporary identifier for this source dataset */ - if((temp_id = H5VL_register_using_vol_id(H5I_DATASET, *dset, native_vol_id, FALSE)) < 0) +{ +void *vol_wrap_ctx = NULL; /* Object wrapping context */ + +/* Retrieve the VOL object wrap context */ +if(H5CX_get_vol_wrap_ctx((void **)&vol_wrap_ctx) < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get VOL object wrap context") +HDassert(vol_wrap_ctx); +} + if((temp_id = H5VL_wrap_register(H5I_DATASET, *dset, FALSE)) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "can't register (temporary) source dataset ID") /* Refresh source dataset */ @@ -2988,7 +2990,8 @@ H5D__virtual_refresh_source_dset(H5D_t **dset) /* Discard the identifier & replace the dataset */ if(NULL == (vol_obj = (H5VL_object_t *)H5I_remove(temp_id))) HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "can't unregister source dataset ID") - *dset = (H5D_t *)(vol_obj->data); + if(NULL == (*dset = (H5D_t *)H5VL_object_data(vol_obj))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve library object from VOL object") vol_obj->data = NULL; done: @@ -2996,7 +2999,7 @@ done: HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "unable to free VOL object") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D__virtual_refresh_source_dsets() */ +} /* end H5D__virtual_refresh_source_dset() */ /*------------------------------------------------------------------------- diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 69b010b..4d4311f 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -231,14 +231,6 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5VL_native_init() */ -/* XXX (VOL_MERGE): TEMPORARY */ -hid_t -H5VL_native_get_driver_id(void) -{ -HDassert(0 && "H5VL_native_get_driver_id"); - return H5VL_NATIVE_ID_g; -} - /*--------------------------------------------------------------------------- * Function: H5VL__native_term diff --git a/src/H5VLnative_private.h b/src/H5VLnative_private.h index 84df828..397d496 100644 --- a/src/H5VLnative_private.h +++ b/src/H5VLnative_private.h @@ -28,7 +28,6 @@ extern "C" { #endif -H5_DLL hid_t H5VL_native_get_driver_id(void); H5_DLL hid_t H5VL_native_init(hid_t vipl_id); #ifdef __cplusplus |