From 2a64d2fe93a0ba1da27c77df8a9e3b76e3cd5ee9 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 30 Jul 2020 16:53:01 -0500 Subject: Change H5F_open to perform deduplication of open VFDs in a more flexible way, using the new routine H5FDdeduplicate(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify H5F_open() a bit, pushing some of the configuration checks into the SMWR VFD. For example, check that page buffering is enabled in H5FD_vfd_swmr_open() instead of in H5F_open(). Compare VFD SWMR configurations in H5FD_vfd_swmr_dedup() instead of in H5F_open(). Clone the default file-access property list at a new file-access property list ID, H5P_FILE_ACCESS_ANY_VFD. The new ID is used to indicate that if the file that's being opened is already open under an existing virtual file, and if that virtual file would not ordinarily be opened with the default FAPL, then it's ok to use that virtual file. Add a new optional method, `dedup`, to H5FD_class_t, and use it to customize a VFD's deduplication. Customize the SWMR VFD's deduplication. Make it honor H5P_FILE_ACCESS_ANY_VFD Embed the VFD SWMR configuration in the H5FD_vfd_swmr_t to facilitate comparison of configuration between new and old SWMR virtual files. In H5F__sfile_search(), match using a pointer comparison instead of H5FD_cmp(), because we will only ever enter H5F__sfile_search() with a deduplicated H5FD_t *. --- src/H5FD.c | 67 +++++++++++++++++++++++++++++++ src/H5FDcore.c | 1 + src/H5FDfamily.c | 1 + src/H5FDhdfs.c | 1 + src/H5FDlog.c | 1 + src/H5FDmulti.c | 1 + src/H5FDprivate.h | 1 + src/H5FDpublic.h | 1 + src/H5FDsec2.c | 1 + src/H5FDsplitter.c | 1 + src/H5FDstdio.c | 1 + src/H5FDvfd_swmr.c | 116 ++++++++++++++++++++++++++++++++++++++++------------- src/H5Fint.c | 28 +++---------- src/H5Fsfile.c | 30 ++++---------- src/H5Pfapl.c | 7 ++++ src/H5Pint.c | 1 + src/H5Ppublic.h | 2 + test/h5test.c | 1 + 18 files changed, 191 insertions(+), 71 deletions(-) diff --git a/src/H5FD.c b/src/H5FD.c index 547eb8f..415ccf3 100644 --- a/src/H5FD.c +++ b/src/H5FD.c @@ -679,6 +679,73 @@ done: FUNC_LEAVE_API(ret_value) } +/* Return `other` if `self` has no de-duplication method. Otherwise, return + * `other` if it duplicates `self`, `self` if `other` does NOT duplicate it, + * NULL if `other` conflicts with `self` or if there is an error. + * + * Unlike H5FD_deduplicate(), this routine does not free `self` under any + * circumstances. + */ +static H5FD_t * +H5FD_dedup(H5FD_t *self, H5FD_t *other, hid_t fapl) +{ + H5FD_t *(*dedup)(H5FD_t *, H5FD_t *, hid_t); + + if ((dedup = self->cls->dedup) != NULL) + return (*dedup)(self, other, fapl); + + if (H5FDcmp(self, other) == 0) + return self; + + return other; +} + +/* If any other open H5FD_t is functionally equivalent to `file` under + * the given file-access properties, then return it and close `file`. + * + * If any other open H5FD_t is not equivalent to `file`, but its + * operation would conflict with `file`, then return NULL and close `file`. + */ +H5FD_t * +H5FD_deduplicate(H5FD_t *file, hid_t fapl) +{ + H5FD_t *deduped = file, *item; + + TAILQ_FOREACH(item, &all_vfds, link) { + /* skip "self" */ + if (item == file) + continue; + + /* skip files with exclusive owners, for now */ + if (item->exc_owner != NULL) + continue; + + if ((deduped = H5FD_dedup(item, file, fapl)) != file) + goto finish; + } + + /* If we reach this stage, then we identified neither a conflict nor a + * duplicate. If any lower VFD with an exclusive owner matches `file`, + * return NULL to indicate the conflict. + */ + TAILQ_FOREACH(item, &all_vfds, link) { + if (item == file || item->exc_owner == NULL) + continue; + + if (H5FDcmp(file, item) == 0) { + deduped = NULL; + break; + } + } + +finish: + if (deduped != file && H5FD_close(file) < 0) { + HERROR(H5E_FILE, H5E_CANTOPENFILE, "could not close file"); + return NULL; + } + return deduped; +} + /* Return `true` if a second H5FD_t identical to `file` * has an exclusive owner, `false` otherwise. */ diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 0551dd0..394380b 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -179,6 +179,7 @@ static const H5FD_class_t H5FD_core_g = { H5FD__core_truncate, /* truncate */ H5FD_core_lock, /* lock */ H5FD_core_unlock, /* unlock */ + NULL, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c index d110ef7..cc97a0f 100644 --- a/src/H5FDfamily.c +++ b/src/H5FDfamily.c @@ -139,6 +139,7 @@ static const H5FD_class_t H5FD_family_g = { H5FD_family_truncate, /*truncate */ H5FD_family_lock, /*lock */ H5FD_family_unlock, /*unlock */ + NULL, /*dedup */ H5FD_FLMAP_DICHOTOMY /*fl_map */ }; diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 3d086ea..2c06420 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -521,6 +521,7 @@ static const H5FD_class_t H5FD_hdfs_g = { H5FD_hdfs_truncate, /* truncate */ H5FD_hdfs_lock, /* lock */ H5FD_hdfs_unlock, /* unlock */ + NULL, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; diff --git a/src/H5FDlog.c b/src/H5FDlog.c index f649bc4..1536337 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -215,6 +215,7 @@ static const H5FD_class_t H5FD_log_g = { H5FD_log_truncate, /*truncate */ H5FD_log_lock, /*lock */ H5FD_log_unlock, /*unlock */ + NULL, /*dedup */ H5FD_FLMAP_DICHOTOMY /*fl_map */ }; diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 72f4da5..132c2c3 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -170,6 +170,7 @@ static const H5FD_class_t H5FD_multi_g = { H5FD_multi_truncate, /*truncate */ H5FD_multi_lock, /*lock */ H5FD_multi_unlock, /*unlock */ + NULL, /*dedup */ H5FD_FLMAP_DEFAULT /*fl_map */ }; diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h index 0c3f5a5..9f5309d 100644 --- a/src/H5FDprivate.h +++ b/src/H5FDprivate.h @@ -318,6 +318,7 @@ H5_DLL hid_t H5FD_register(const void *cls, size_t size, hbool_t app_ref); H5_DLL H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); bool H5FD_has_conflict(H5FD_t *); +H5FD_t *H5FD_deduplicate(H5FD_t *, hid_t); H5_DLL herr_t H5FD_close(H5FD_t *file); H5_DLL int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2); H5_DLL herr_t H5FD_driver_query(const H5FD_class_t *driver, unsigned long *flags/*out*/); diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index ab8a868..a921c29 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -303,6 +303,7 @@ typedef struct H5FD_class_t { herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing); herr_t (*lock)(H5FD_t *file, hbool_t rw); herr_t (*unlock)(H5FD_t *file); + H5FD_t *(*dedup)(H5FD_t *, H5FD_t *, hid_t); H5FD_mem_t fl_map[H5FD_MEM_NTYPES]; } H5FD_class_t; diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 3551905..37a6ae9 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -171,6 +171,7 @@ static const H5FD_class_t H5FD_sec2_g = { H5FD_sec2_truncate, /* truncate */ H5FD_sec2_lock, /* lock */ H5FD_sec2_unlock, /* unlock */ + NULL, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c index 13816a5..b1fffa5 100644 --- a/src/H5FDsplitter.c +++ b/src/H5FDsplitter.c @@ -164,6 +164,7 @@ static const H5FD_class_t H5FD_splitter_g = { H5FD_splitter_truncate, /* truncate */ H5FD_splitter_lock, /* lock */ H5FD_splitter_unlock, /* unlock */ + NULL, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index d29a1b4..3135709 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -209,6 +209,7 @@ static const H5FD_class_t H5FD_stdio_g = { H5FD_stdio_truncate, /* truncate */ H5FD_stdio_lock, /* lock */ H5FD_stdio_unlock, /* unlock */ + NULL, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c index a7b6d33..f0e0cfd 100644 --- a/src/H5FDvfd_swmr.c +++ b/src/H5FDvfd_swmr.c @@ -58,6 +58,7 @@ typedef struct H5FD_vfd_swmr_t { /* when the page buffer is */ /* and to FALSE otherwise. */ /* Used for sanity checking. */ + H5F_vfd_swmr_config_t config; bool writer; /* True iff configured to write. */ } H5FD_vfd_swmr_t; @@ -69,6 +70,7 @@ static H5FD_t *H5FD_vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); static herr_t H5FD_vfd_swmr_close(H5FD_t *_file); static int H5FD_vfd_swmr_cmp(const H5FD_t *_f1, const H5FD_t *_f2); +static H5FD_t *H5FD_vfd_swmr_dedup(H5FD_t *, H5FD_t *, hid_t); static herr_t H5FD_vfd_swmr_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_vfd_swmr_get_eoa(const H5FD_t *_file, H5FD_mem_t type); static herr_t H5FD_vfd_swmr_set_eoa(H5FD_t *_file, H5FD_mem_t type, @@ -130,6 +132,7 @@ static const H5FD_class_t H5FD_vfd_swmr_g = { H5FD_vfd_swmr_truncate, /* truncate */ H5FD_vfd_swmr_lock, /* lock */ H5FD_vfd_swmr_unlock, /* unlock */ + H5FD_vfd_swmr_dedup, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; @@ -250,15 +253,14 @@ done: } /* end H5Pset_fapl_vfd_swmr() */ static herr_t -H5FD__swmr_reader_open(H5FD_vfd_swmr_t *file, H5F_vfd_swmr_config_t *vfd_swmr_config) +H5FD__swmr_reader_open(H5FD_vfd_swmr_t *file) { h5_retry_t retry; /* retry state */ bool do_try; /* more tries remain */ herr_t ret_value = SUCCEED; - FUNC_ENTER_STATIC - file->api_elapsed_nslots = vfd_swmr_config->max_lag + 1; + file->api_elapsed_nslots = file->config.max_lag + 1; file->api_elapsed_ticks = calloc(file->api_elapsed_nslots, sizeof(*file->api_elapsed_ticks)); @@ -311,30 +313,30 @@ static H5FD_t * H5FD_vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) { - H5FD_vfd_swmr_t *file = NULL; /* VFD SWMR driver info */ - H5P_genplist_t *plist; /* Property list pointer */ - H5F_vfd_swmr_config_t *vfd_swmr_config = /* Points to VFD SWMR */ - NULL; /* configuration */ + H5FD_vfd_swmr_t *file = NULL; + size_t page_buf_size; + H5P_genplist_t *plist; + H5F_vfd_swmr_config_t *vfd_swmr_config; H5FD_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Get file access property list */ - if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) - - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, \ - "not a file access property list") - - /* Allocate buffer for reading the VFD SWMR configuration */ - if(NULL == (vfd_swmr_config = H5MM_malloc(sizeof(H5F_vfd_swmr_config_t)))) { - HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, NULL, - "memory allocation failed for H5F_vfd_swmr_config_t"); + if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id))) { + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, + "not a file access property list"); } - /* Get VFD SWMR configuration */ - if(H5P_get(plist, H5F_ACS_VFD_SWMR_CONFIG_NAME, vfd_swmr_config) < 0) { - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, - "can't get VFD SWMR config info"); + if (H5P_get(plist, H5F_ACS_PAGE_BUFFER_SIZE_NAME, &page_buf_size) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "can't get page buffer size"); + + /* Paged allocation, too, has to be enabled, but the page buffer + * initialization (H5PB_create) will detect a conflicting configuration + * and return an error. + */ + if (page_buf_size == 0) { + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, + "page buffering must be enabled"); } /* Create the new driver struct */ @@ -343,6 +345,14 @@ H5FD_vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, "unable to allocate file struct"); } + vfd_swmr_config = &file->config; + + /* Get VFD SWMR configuration */ + if(H5P_get(plist, H5F_ACS_VFD_SWMR_CONFIG_NAME, vfd_swmr_config) < 0) { + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, + "can't get VFD SWMR config info"); + } + file->md_fd = -1; file->hdf5_file_lf = NULL; file->md_pages_reserved = vfd_swmr_config->md_pages_reserved; @@ -359,8 +369,7 @@ H5FD_vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, file->writer = vfd_swmr_config->writer; /* Ensure that this is the reader */ - if (!vfd_swmr_config->writer && - H5FD__swmr_reader_open(file, vfd_swmr_config) < 0) { + if (!vfd_swmr_config->writer && H5FD__swmr_reader_open(file) < 0) { HGOTO_ERROR(H5E_VFL, H5E_OPENERROR, NULL, "perform reader-specific opening steps failed"); } @@ -384,13 +393,9 @@ H5FD_vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, file->pb_configured = FALSE; /* Set return value */ - ret_value = (H5FD_t*)file; + ret_value = &file->pub; done: - /* Free the buffer */ - if(vfd_swmr_config) - vfd_swmr_config = H5MM_xfree(vfd_swmr_config); - /* Handle closing if error */ if(NULL == ret_value && file) { @@ -503,6 +508,63 @@ H5FD_vfd_swmr_cmp(const H5FD_t *_f1, const H5FD_t *_f2) FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_vfd_swmr_cmp() */ +static H5FD_t * +H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl) +{ + H5FD_vfd_swmr_t *self = (H5FD_vfd_swmr_t *)_self; + + assert(_self->driver_id == H5FD_VFD_SWMR_g); + + if (_self->cls == _other->cls) { + H5FD_vfd_swmr_t *other = (H5FD_vfd_swmr_t *)_other; + H5P_genplist_t *plist; + H5F_vfd_swmr_config_t *config; + bool equal_configs; + + if (H5FD_cmp(self->hdf5_file_lf, other->hdf5_file_lf) != 0) + return _other; + + /* If fapl == _ANY_VFD, then the match between lower files is + * sufficient. + */ + if (fapl == H5P_FILE_ACCESS_ANY_VFD) + return _self; + + /* If fapl != _ANY_VFD, then we have either a duplicate or + * a conflict. If the VFD SWMR parameters match, then + * return `self` to indicate a duplicate. Otherwise, return + * NULL to indicate a mismatch. + */ + if (NULL == (plist = H5I_object(fapl))) { + HERROR(H5E_ARGS, H5E_BADTYPE, "could not get fapl"); + return NULL; + } + + if ((config = malloc(sizeof(*config))) == NULL) { + HERROR(H5E_ARGS, H5E_BADTYPE, "could not allocate config"); + return NULL; + } + if (H5P_get(plist, H5F_ACS_VFD_SWMR_CONFIG_NAME, config) < 0) { + HERROR(H5E_PLIST, H5E_CANTGET, "cannot get VFD SWMR config"); + return NULL; + } + + equal_configs = memcmp(&self->config, config, sizeof(*config)) == 0; + + free(config); + + if (equal_configs) + return _self; + + HERROR(H5E_PLIST, H5E_CANTGET, "inconsistent VFD SWMR config"); + return NULL; + } else if (H5FD_cmp(self->hdf5_file_lf, _other) == 0) { + return (fapl == H5P_FILE_ACCESS_ANY_VFD) ? _self : NULL; + } else { + return _other; + } +} + /*------------------------------------------------------------------------- * Function: H5FD_vfd_swmr_query diff --git a/src/H5Fint.c b/src/H5Fint.c index 84fb1d1..cd1f0fc 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1644,23 +1644,19 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file: name = '%s', tent_flags = %x", name, tent_flags) } /* end if */ - /* Do not reuse a virtual file opened exclusively by a second virtual - * file. + /* Avoid reusing a virtual file opened exclusively by a second virtual + * file, or opening the same file twice with different parameters. */ - if (H5FD_has_conflict(lf)) { - if(H5FD_close(lf) < 0) { - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, - "file '%s' already open exclusively; could not close", name); - } + if ((lf = H5FD_deduplicate(lf, fapl_id)) == NULL) { HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, - "file '%s' already open exclusively", name); + "an already-open file conflicts with '%s'", name); } /* Is the file already open? */ if((shared = H5F__sfile_search(lf)) != NULL) { /* - * The file is already open, so use that one instead of the one we - * just opened. We only one one H5FD_t* per file so one doesn't + * The file is already open, so use the corresponding H5F_shared_t. + * We only allow one H5FD_t* per file so one doesn't * confuse the other. But fail if this request was to truncate the * file (since we can't do that while the file is open), or if the * request was to create a non-existent file (since the file already @@ -1668,8 +1664,6 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * readers don't expect the file to change under them), or if the * SWMR write/read access flags don't agree. */ - if(H5FD_close(lf) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info") if(flags & H5F_ACC_TRUNC) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to truncate a file which is already open") if(flags & H5F_ACC_EXCL) @@ -1807,10 +1801,6 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Checked if configured for VFD SWMR */ if(H5F_VFD_SWMR_CONFIG(file)) { - /* Page buffering and page allocation strategy have to be enabled */ - if(!page_buf_size || !H5F_PAGED_AGGR(file)) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "VFD SWMR file open fail: page buffering must be enabled") - /* Initialization for VFD SWMR writer and reader */ if(1 == shared->nrefs) { if(H5F_vfd_swmr_init(file, file_create) < 0) @@ -1822,12 +1812,6 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "unable to insert entry into the EOT queue") } - /* For multiple opens of the same file, verify that the VFD SWMR setting is consistent */ - if(shared->nrefs > 1) { - if(HDmemcmp(vfd_swmr_config_ptr, &shared->vfd_swmr_config, sizeof(H5F_vfd_swmr_config_t))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "inconsistent VFD SWMR config info") - } - /* * 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/H5Fsfile.c b/src/H5Fsfile.c index 9a9bbab..3cbd490 100644 --- a/src/H5Fsfile.c +++ b/src/H5Fsfile.c @@ -138,28 +138,14 @@ done: H5F_shared_t * H5F__sfile_search(H5FD_t *lf) { - H5F_sfile_node_t *curr; /* Current shared file node */ - H5F_shared_t *ret_value = NULL; /* Return value */ - - FUNC_ENTER_PACKAGE_NOERR - - /* Sanity check */ - HDassert(lf); - - /* Iterate through low-level files for matching low-level file info */ - curr = H5F_sfile_head_g; - while(curr) { - /* Check for match */ - if(0 == H5FD_cmp(curr->shared->lf, lf)) - HGOTO_DONE(curr->shared) - - /* Advance to next shared file node */ - curr = curr->next; - } /* end while */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5F__sfile_search() */ + H5F_sfile_node_t *curr; + + for (curr = H5F_sfile_head_g; curr != NULL; curr = curr->next) { + if(curr->shared->lf == lf) + return curr->shared; + } + return NULL; +} /*------------------------------------------------------------------------- diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 678dbf7..ed6f06a 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -721,6 +721,13 @@ H5P__facc_reg_prop(H5P_genclass_t *pclass) H5F_ACS_VOL_CONN_DEL, H5F_ACS_VOL_CONN_COPY, H5F_ACS_VOL_CONN_CMP, H5F_ACS_VOL_CONN_CLOSE) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") + if (H5P_LST_FILE_ACCESS_ANY_VFD_g == H5I_INVALID_HID) { + H5P_LST_FILE_ACCESS_ANY_VFD_g = H5P_create_id(pclass, false); + if (H5P_LST_FILE_ACCESS_ANY_VFD_g == H5I_INVALID_HID) { + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, + "can't create any-vfd fapl"); + } + } done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__facc_reg_prop() */ diff --git a/src/H5Pint.c b/src/H5Pint.c index 3cefb64..5e0133e 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -178,6 +178,7 @@ H5P_genclass_t *H5P_CLS_REFERENCE_ACCESS_g = NULL; */ hid_t H5P_LST_FILE_CREATE_ID_g = H5I_INVALID_HID; hid_t H5P_LST_FILE_ACCESS_ID_g = H5I_INVALID_HID; +hid_t H5P_LST_FILE_ACCESS_ANY_VFD_g = H5I_INVALID_HID; hid_t H5P_LST_DATASET_CREATE_ID_g = H5I_INVALID_HID; hid_t H5P_LST_DATASET_ACCESS_ID_g = H5I_INVALID_HID; hid_t H5P_LST_DATASET_XFER_ID_g = H5I_INVALID_HID; diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index 150b371..8d3c92b 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -78,6 +78,7 @@ */ #define H5P_FILE_CREATE_DEFAULT (H5OPEN H5P_LST_FILE_CREATE_ID_g) #define H5P_FILE_ACCESS_DEFAULT (H5OPEN H5P_LST_FILE_ACCESS_ID_g) +#define H5P_FILE_ACCESS_ANY_VFD (H5OPEN H5P_LST_FILE_ACCESS_ANY_VFD_g) #define H5P_DATASET_CREATE_DEFAULT (H5OPEN H5P_LST_DATASET_CREATE_ID_g) #define H5P_DATASET_ACCESS_DEFAULT (H5OPEN H5P_LST_DATASET_ACCESS_ID_g) #define H5P_DATASET_XFER_DEFAULT (H5OPEN H5P_LST_DATASET_XFER_ID_g) @@ -212,6 +213,7 @@ H5_DLLVAR hid_t H5P_CLS_REFERENCE_ACCESS_ID_g; /* (Internal to library, do not use! Use macros above) */ H5_DLLVAR hid_t H5P_LST_FILE_CREATE_ID_g; H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_ID_g; +H5_DLLVAR hid_t H5P_LST_FILE_ACCESS_ANY_VFD_g; H5_DLLVAR hid_t H5P_LST_DATASET_CREATE_ID_g; H5_DLLVAR hid_t H5P_LST_DATASET_ACCESS_ID_g; H5_DLLVAR hid_t H5P_LST_DATASET_XFER_ID_g; diff --git a/test/h5test.c b/test/h5test.c index 7b0e82b..0496ca4 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1952,6 +1952,7 @@ static const H5FD_class_t H5FD_dummy_g = { NULL, /* truncate */ NULL, /* lock */ NULL, /* unlock */ + NULL, /* dedup */ H5FD_FLMAP_DICHOTOMY /* fl_map */ }; -- cgit v0.12