summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5Fint.c9
-rw-r--r--src/H5Fpkg.h1
-rw-r--r--src/H5Fprivate.h1
-rw-r--r--src/H5Fquery.c22
-rw-r--r--src/H5Pfapl.c3
-rw-r--r--src/H5VLnative.c10
6 files changed, 10 insertions, 36 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index e0ce36b..8da53d2 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -189,11 +189,6 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file close degree")
}
- /* MSC TODO move this to the upper VOL get routine & set the vol info too*/
- /* Set the VOL class in the property list */
- if(H5P_set(new_plist, H5F_ACS_VOL_NAME, &(f->vol_cls)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file VOL plugin")
-
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_get_access_plist() */
@@ -1135,10 +1130,6 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id,
if(NULL == (a_plist = (H5P_genplist_t *)H5I_object(fapl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not file access property list")
- /* Store a pointer to the VOL plugin in the file struct */
- if(H5P_get(a_plist, H5F_ACS_VOL_NAME, &(file->vol_cls)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get vol plugin")
-
/*
* Decide the file close degree. If it's the first time to open the
* file, set the degree to access property list value; if it's the
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 669e0d3..98de62a 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -275,7 +275,6 @@ struct H5F_t {
hbool_t closing; /* File is in the process of being closed */
struct H5F_t *parent; /* Parent file that this file is mounted to */
unsigned nmounts; /* Number of children mounted to this file */
- struct H5VL_class_t *vol_cls; /* class of the VOL plugin */
};
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index b271476..eafb7c3 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -554,7 +554,6 @@ H5_DLL hid_t H5F_get_access_plist(H5F_t *f, hbool_t app_ref);
H5_DLL hid_t H5F_get_id(H5F_t *file, hbool_t app_ref);
H5_DLL herr_t H5F_get_obj_count(const H5F_t *f, unsigned types, hbool_t app_ref, size_t *obj_id_count_ptr);
H5_DLL herr_t H5F_get_obj_ids(const H5F_t *f, unsigned types, size_t max_objs, hid_t *oid_list, hbool_t app_ref, size_t *obj_id_count_ptr);
-H5_DLL struct H5VL_class_t *H5F_get_vol_cls(const H5F_t *f);
/* Functions than retrieve values set/cached from the superblock/FCPL */
H5_DLL haddr_t H5F_get_base_addr(const H5F_t *f);
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index e7dd48b..89d97f4 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -1072,25 +1072,3 @@ H5F_use_tmp_space(const H5F_t *f)
FUNC_LEAVE_NOAPI(f->shared->use_tmp_space)
} /* end H5F_use_tmp_space() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5F_get_vol_cls
- *
- * Return: vol_cls on success/abort on failure (shouldn't fail)
- *
- * Programmer: Mohamad Chaarawi
- * April 2012
- *
- *-------------------------------------------------------------------------
- */
-H5VL_class_t *
-H5F_get_vol_cls(const H5F_t *f)
-{
-
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- HDassert(f);
-
- FUNC_LEAVE_NOAPI(f->vol_cls)
-} /* end H5F_get_parent() */
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index a52e29b..1479cd5 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -130,7 +130,6 @@
/* Definition for VOL plugin */
#define H5F_ACS_VOL_SIZE sizeof(void *)
#define H5F_ACS_VOL_DEF H5VL_NATIVE
-
/* Definition for vol info */
#define H5F_ACS_VOL_INFO_SIZE sizeof(void*)
#define H5F_ACS_VOL_INFO_DEF NULL
@@ -238,7 +237,7 @@ H5P_facc_reg_prop(H5P_genclass_t *pclass)
hbool_t want_posix_fd = H5F_ACS_WANT_POSIX_FD_DEF; /* Default setting for retrieving 'handle' from core VFD */
unsigned efc_size = H5F_ACS_EFC_SIZE_DEF; /* Default external file cache size */
H5VL_class_t *vol_cls = H5F_ACS_VOL_DEF; /* Default VOL plugin */
- void *vol_info = H5F_ACS_VOL_INFO_DEF; /* Default VOL plugin */
+ void *vol_info = H5F_ACS_VOL_INFO_DEF; /* Default VOL plugin information*/
H5FD_file_image_info_t file_image_info = H5F_ACS_FILE_IMAGE_INFO_DEF; /* Default file image info and callbacks */
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 2716a13..de0ad06 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -1721,12 +1721,21 @@ H5VL_native_file_get(void *obj, H5VL_file_get_t get_type, hid_t UNUSED req, va_l
/* H5Fget_access_plist */
case H5VL_FILE_GET_FAPL:
{
+ H5P_genplist_t *new_plist; /* New property list */
hid_t *plist_id = va_arg (arguments, hid_t *);
f = (H5F_t *)obj;
/* Retrieve the file's access property list */
if((*plist_id = H5F_get_access_plist(f, TRUE)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file access property list")
+
+ if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(*plist_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+
+ /* Set the VOL class in the property list - we don't
+ have a VOL info for the native plugin */
+ if(H5P_set(new_plist, H5F_ACS_VOL_NAME, &H5VL_native_g) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set file VOL plugin")
break;
}
/* H5Fget_create_plist */
@@ -2104,7 +2113,6 @@ H5VL_native_file_optional(void *obj, H5VL_file_optional_t optional_type, hid_t U
f = (H5F_t *)obj;
if(NULL == (new_file = H5F_reopen(f)))
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to reopen file")
- new_file->vol_cls = &H5VL_native_g;
new_file->id_exists = TRUE;
*ret = (void *)new_file;