summaryrefslogtreecommitdiffstats
path: root/src/H5FDsec2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-08-31 19:33:58 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-08-31 19:33:58 (GMT)
commit1ec946fac8375b9b5a377c5deb027ed17f364255 (patch)
tree4a75d3d7388a2857763f114eb7b1fe73722a90dd /src/H5FDsec2.c
parent362baf12993da83dc1af12491e3adf0ed9cb8dd9 (diff)
downloadhdf5-1ec946fac8375b9b5a377c5deb027ed17f364255.zip
hdf5-1ec946fac8375b9b5a377c5deb027ed17f364255.tar.gz
hdf5-1ec946fac8375b9b5a377c5deb027ed17f364255.tar.bz2
[svn-r2498] Added new VFL 'query' code and added new 'type of data' parameter to write
call.
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r--src/H5FDsec2.c47
1 files changed, 42 insertions, 5 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 7d0a9cf..7e66f39 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -122,12 +122,13 @@ static H5FD_t *H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
static herr_t H5FD_sec2_close(H5FD_t *_file);
static int H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
+static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_sec2_get_eoa(H5FD_t *_file);
static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, haddr_t addr);
static haddr_t H5FD_sec2_get_eof(H5FD_t *_file);
static herr_t H5FD_sec2_read(H5FD_t *_file, hid_t fapl_id, haddr_t addr,
hsize_t size, void *buf);
-static herr_t H5FD_sec2_write(H5FD_t *_file, hid_t fapl_id, haddr_t addr,
+static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
hsize_t size, const void *buf);
static herr_t H5FD_sec2_flush(H5FD_t *_file);
@@ -144,9 +145,10 @@ static const H5FD_class_t H5FD_sec2_g = {
0, /*dxpl_size */
NULL, /*dxpl_copy */
NULL, /*dxpl_free */
- H5FD_sec2_open, /*open */
- H5FD_sec2_close, /*close */
- H5FD_sec2_cmp, /*cmp */
+ H5FD_sec2_open, /*open */
+ H5FD_sec2_close, /*close */
+ H5FD_sec2_cmp, /*cmp */
+ H5FD_sec2_query, /*query */
NULL, /*alloc */
NULL, /*free */
H5FD_sec2_get_eoa, /*get_eoa */
@@ -387,6 +389,41 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
/*-------------------------------------------------------------------------
+ * Function: H5FD_sec2_query
+ *
+ * Purpose: Set the flags that this VFL driver is capable of supporting.
+ * (listed in H5FDpublic.h)
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Quincey Koziol
+ * Friday, August 25, 2000
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5FD_sec2_query(const H5FD_t *_f, unsigned long *flags /* out */)
+{
+ const H5FD_sec2_t *f = (const H5FD_sec2_t*)_f;
+ herr_t ret_value=SUCCEED;
+
+ FUNC_ENTER(H5FD_sec2_query, FAIL);
+
+ /* Set the VFL feature flags that this driver supports */
+ if(flags) {
+ *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */
+ *flags|=H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */
+ } /* end if */
+
+ FUNC_LEAVE(ret_value);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5FD_sec2_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
@@ -577,7 +614,7 @@ H5FD_sec2_read(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr,
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_write(H5FD_t *_file, hid_t UNUSED dxpl_id, haddr_t addr,
+H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, haddr_t addr,
hsize_t size, const void *buf)
{
H5FD_sec2_t *file = (H5FD_sec2_t*)_file;