summaryrefslogtreecommitdiffstats
path: root/src/H5VLpassthru.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-09-19 19:55:03 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-10-08 19:30:24 (GMT)
commitfa6fdde1bfb8a29cfc86a4b441c49a63f15fd109 (patch)
treef177a35a87255c46747e497c4281d4843967eee6 /src/H5VLpassthru.c
parenteaa65c862b09b399fc4727e664b56b648cfb37d2 (diff)
downloadhdf5-fa6fdde1bfb8a29cfc86a4b441c49a63f15fd109.zip
hdf5-fa6fdde1bfb8a29cfc86a4b441c49a63f15fd109.tar.gz
hdf5-fa6fdde1bfb8a29cfc86a4b441c49a63f15fd109.tar.bz2
Fix H5VL_blob_get to return size of blob
Fix const in blob API Add H5HG_HEAP_ID_SIZE macro to return native blob size Add maximum size for blobs Fix blob API callbacks to pass VOL file object Add public wrappers for blob VOL API Implement passthrough blob callbacks Update H5Tvlen after callback changes Update trace information for H5VL blob routines Fix public header inclusion in native and passthru headers
Diffstat (limited to 'src/H5VLpassthru.c')
-rw-r--r--src/H5VLpassthru.c92
1 files changed, 89 insertions, 3 deletions
diff --git a/src/H5VLpassthru.c b/src/H5VLpassthru.c
index 48ef510..85c2211 100644
--- a/src/H5VLpassthru.c
+++ b/src/H5VLpassthru.c
@@ -178,6 +178,12 @@ static herr_t H5VL_pass_through_request_specific(void *req, H5VL_request_specifi
static herr_t H5VL_pass_through_request_optional(void *req, va_list arguments);
static herr_t H5VL_pass_through_request_free(void *req);
+/* Blob callbacks */
+static herr_t H5VL_pass_through_blob_put(void *obj, const void *buf, size_t size, void *blob_id, void *ctx);
+static herr_t H5VL_pass_through_blob_get(void *obj, const void *blob_id, void *buf, size_t *size, void *ctx);
+static herr_t H5VL_pass_through_blob_specific(void *obj, void *blob_id, H5VL_blob_specific_t specific_type, va_list arguments);
+
+
/*******************/
/* Local variables */
/*******************/
@@ -273,9 +279,9 @@ static const H5VL_class_t H5VL_pass_through_g = {
H5VL_pass_through_request_free /* free */
},
{ /* blob_cls */
- NULL, /* put */
- NULL, /* get */
- NULL, /* specific */
+ H5VL_pass_through_blob_put, /* put */
+ H5VL_pass_through_blob_get, /* get */
+ H5VL_pass_through_blob_specific, /* specific */
NULL /* optional */
},
NULL /* optional */
@@ -2840,3 +2846,83 @@ H5VL_pass_through_request_free(void *obj)
return ret_value;
} /* end H5VL_pass_through_request_free() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL_pass_through_blob_put
+ *
+ * Purpose: Handles the blob 'put' callback
+ *
+ * Return: SUCCEED / FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5VL_pass_through_blob_put(void *obj, const void *buf, size_t size,
+ void *blob_id, void *ctx)
+{
+ H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
+ herr_t ret_value;
+
+#ifdef ENABLE_PASSTHRU_LOGGING
+ printf("------- PASS THROUGH VOL BLOB Put\n");
+#endif
+
+ ret_value = H5VLblob_put(o->under_object, o->under_vol_id, buf, size,
+ blob_id, ctx);
+
+ return ret_value;
+} /* end H5VL_pass_through_blob_put() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL_pass_through_blob_get
+ *
+ * Purpose: Handles the blob 'get' callback
+ *
+ * Return: SUCCEED / FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5VL_pass_through_blob_get(void *obj, const void *blob_id, void *buf,
+ size_t *size, void *ctx)
+{
+ H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
+ herr_t ret_value;
+
+#ifdef ENABLE_PASSTHRU_LOGGING
+ printf("------- PASS THROUGH VOL BLOB Get\n");
+#endif
+
+ ret_value = H5VLblob_get(o->under_object, o->under_vol_id, blob_id, buf,
+ size, ctx);
+
+ return ret_value;
+} /* end H5VL_pass_through_blob_get() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5VL_pass_through_blob_specific
+ *
+ * Purpose: Handles the blob 'specific' callback
+ *
+ * Return: SUCCEED / FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5VL_pass_through_blob_specific(void *obj, void *blob_id,
+ H5VL_blob_specific_t specific_type, va_list arguments)
+{
+ H5VL_pass_through_t *o = (H5VL_pass_through_t *)obj;
+ herr_t ret_value;
+
+#ifdef ENABLE_PASSTHRU_LOGGING
+ printf("------- PASS THROUGH VOL BLOB Specific\n");
+#endif
+
+ ret_value = H5VLblob_specific(o->under_object, o->under_vol_id, blob_id,
+ specific_type, arguments);
+
+ return ret_value;
+} /* end H5VL_pass_through_blob_specific() */