summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-12-17 23:25:10 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-12-17 23:25:10 (GMT)
commitc6831c7a75a5d0c1ca82a03c96fc0f023d1bc52e (patch)
tree836f489d80ef2ca0ce59874bbffeb14795f23305 /src
parent8909646693c312be5d3f4a0d4fef4623833bcaf8 (diff)
downloadhdf5-c6831c7a75a5d0c1ca82a03c96fc0f023d1bc52e.zip
hdf5-c6831c7a75a5d0c1ca82a03c96fc0f023d1bc52e.tar.gz
hdf5-c6831c7a75a5d0c1ca82a03c96fc0f023d1bc52e.tar.bz2
Remove H5VL_FILE_CACHE_VOL_CONN from file specific callbacks, as it turns out
not to be necessary. Also, correct _MSC_VER #ifdef
Diffstat (limited to 'src')
-rw-r--r--src/H5Fint.c15
-rw-r--r--src/H5Fpkg.h1
-rw-r--r--src/H5VLcallback.c46
-rw-r--r--src/H5VLnative.c12
-rw-r--r--src/H5VLpassthru.c2
-rw-r--r--src/H5VLpublic.h3
-rw-r--r--src/H5trace.c3
7 files changed, 15 insertions, 67 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 19b4432..734949a 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -74,6 +74,7 @@ typedef struct H5F_olist_t {
/* Local Prototypes */
/********************/
+static herr_t H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info);
static herr_t H5F__get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr);
static int H5F__get_objects_cb(void *obj_ptr, hid_t obj_id, void *key);
static herr_t H5F__build_name(const char *prefix, const char *file_name, char **full_name/*out*/);
@@ -115,13 +116,13 @@ H5FL_DEFINE(H5F_file_t);
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info)
{
void *new_connector_info = NULL; /* Copy of connector info */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE
+ FUNC_ENTER_STATIC
/* Sanity check */
HDassert(file);
@@ -1090,6 +1091,16 @@ H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_
if(H5P_get(plist, H5F_ACS_OBJECT_FLUSH_CB_NAME, &(f->shared->object_flush)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get object flush cb info")
+ /* Get the VOL connector info */
+ {
+ H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */
+
+ if(H5P_peek(plist, H5F_ACS_VOL_CONN_NAME, &connector_prop) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get VOL connector info")
+ if(H5F__set_vol_conn(f, connector_prop.connector_id, connector_prop.connector_info) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "can't cache VOL connector info")
+ } /* end block */
+
/* Create a metadata cache with the specified number of elements.
* The cache might be created with a different number of elements and
* the access property list should be updated to reflect that.
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index e5bb28f..4ad2c55 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -411,7 +411,6 @@ H5_DLL herr_t H5F__close(H5F_t *f);
H5_DLL herr_t H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high);
H5_DLL H5F_t *H5F__get_file(void *obj, H5I_type_t type);
H5_DLL hid_t H5F__get_file_id(H5F_t *file);
-H5_DLL herr_t H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info);
/* File mount related routines */
H5_DLL herr_t H5F__mount(H5G_loc_t *loc, const char *name, H5F_t *child, hid_t plist_id);
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 6e19e07..811162d 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -95,8 +95,6 @@ static herr_t H5VL__dataset_optional(void *obj, const H5VL_class_t *cls,
hid_t dxpl_id, void **req, va_list arguments);
static herr_t H5VL__dataset_close(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
void **req);
-static herr_t H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls,
- hid_t dxpl_id, void **req, ...);
static void * H5VL__file_create(const H5VL_class_t *cls, const char *name,
unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t dxpl_id, void **req);
static void * H5VL__file_open(const H5VL_class_t *cls, const char *name,
@@ -2596,42 +2594,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5VL__file_cache_connector
- *
- * Purpose: Wrap varargs and reissue 'cache VOL connector' operation
- * to file specific call
- *
- * Return: Success: Non-negative
- * Failure: Negative
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
-H5VL__file_cache_connector(void *obj, const H5VL_class_t *cls, hid_t dxpl_id,
- void **req, ...)
-{
- va_list arguments; /* Argument list passed from the API call */
- hbool_t arg_started = FALSE; /* Whether the va_list has been started */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_STATIC
-
- /* Re-issue call to internal file specific callback routine */
- HDva_start(arguments, req);
- arg_started = TRUE;
- if(H5VL__file_specific(obj, cls, H5VL_FILE_CACHE_VOL_CONN, dxpl_id, req, arguments) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTOPERATE, FAIL, "file specific failed")
-
-done:
- /* End access to the va_list, if we started it */
- if(arg_started)
- HDva_end(arguments);
-
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5VL__file_cache_connector() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5VL__file_create
*
* Purpose: Creates a file through the VOL
@@ -2695,10 +2657,6 @@ H5VL_file_create(const H5VL_connector_prop_t *connector_prop, const char *name,
if(NULL == (ret_value = H5VL__file_create(cls, name, flags, fcpl_id, fapl_id, dxpl_id, req)))
HGOTO_ERROR(H5E_VOL, H5E_CANTCREATE, NULL, "file create failed")
- /* Cache the connector ID & info */
- if(H5VL__file_cache_connector(ret_value, cls, dxpl_id, req, connector_prop->connector_id, connector_prop->connector_info) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "caching VOL connector ID & info failed")
-
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_file_create() */
@@ -2806,10 +2764,6 @@ H5VL_file_open(const H5VL_connector_prop_t *connector_prop, const char *name,
if(NULL == (ret_value = H5VL__file_open(cls, name, flags, fapl_id, dxpl_id, req)))
HGOTO_ERROR(H5E_VOL, H5E_CANTOPENOBJ, NULL, "open failed")
- /* Cache the connector ID & info */
- if(H5VL__file_cache_connector(ret_value, cls, dxpl_id, req, connector_prop->connector_id, connector_prop->connector_info) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTSET, NULL, "caching VOL connector ID & info failed")
-
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_file_open() */
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 0339205..4e6af18 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -1738,18 +1738,6 @@ H5VL__native_file_specific(void *obj, H5VL_file_specific_t specific_type,
break;
}
- /* H5Fcreate / H5Fopen */
- case H5VL_FILE_CACHE_VOL_CONN:
- {
- hid_t vol_id = HDva_arg(arguments, hid_t);
- void *vol_info = HDva_arg(arguments, void *);
-
- /* Call private routine */
- if(H5F__set_vol_conn((H5F_t *)obj, vol_id, vol_info) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "cache VOL connector ID & info failed")
- break;
- }
-
default:
HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation")
} /* end switch */
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index bf81425..9361273 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -42,7 +42,7 @@
/* #define ENABLE_PASSTHRU_LOGGING */
/* Windows missing va_copy() hack (from H5win2_defs.h) */
-#if (_MSC_VER < 1800)
+#if defined(_MSC_VER) && (_MSC_VER < 1800)
#define va_copy(D,S) ((D) = (S))
#endif /* MSC_VER < 1800 */
diff --git a/src/H5VLpublic.h b/src/H5VLpublic.h
index b276128..22cf12b 100644
--- a/src/H5VLpublic.h
+++ b/src/H5VLpublic.h
@@ -124,8 +124,7 @@ typedef enum H5VL_file_specific_t {
H5VL_FILE_REOPEN, /* Reopen the file */
H5VL_FILE_MOUNT, /* Mount a file */
H5VL_FILE_UNMOUNT, /* Unmount a file */
- H5VL_FILE_IS_ACCESSIBLE, /* Check if a file is accessible */
- H5VL_FILE_CACHE_VOL_CONN /* Cache VOL connector ID & info */
+ H5VL_FILE_IS_ACCESSIBLE /* Check if a file is accessible */
} H5VL_file_specific_t;
/* types for group GET callback */
diff --git a/src/H5trace.c b/src/H5trace.c
index 1c7948c..7d64c8e 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -2759,9 +2759,6 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case H5VL_FILE_IS_ACCESSIBLE:
HDfprintf(out, "H5VL_FILE_IS_ACCESSIBLE");
break;
- case H5VL_FILE_CACHE_VOL_CONN:
- HDfprintf(out, "H5VL_FILE_CACHE_VOL_CONN");
- break;
default:
HDfprintf(out, "%ld", (long)specific);
break;