diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 7 | ||||
-rw-r--r-- | src/H5FSint.c | 26 | ||||
-rw-r--r-- | src/H5FSprivate.h | 3 |
3 files changed, 36 insertions, 0 deletions
@@ -29,6 +29,7 @@ #include "H5Pprivate.h" /* Property lists */ #include "H5SLprivate.h" /* Skip lists */ #include "H5Tprivate.h" /* Datatypes */ +#include "H5FSprivate.h" /* File free space */ /****************/ /* Local Macros */ @@ -204,6 +205,10 @@ H5_init_library(void) * property classes. * The link interface needs to be initialized so that link property lists * have their properties registered. + * The FS module needs to be initialized as a result of the fix for HDFFV-10160: + * It might not be initialized during normal file open. + * When the application does not close the file, routines in the module might + * be called via H5_term_library() when shutting down the file. */ if(H5E_init() < 0) HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize error interface") @@ -217,6 +222,8 @@ H5_init_library(void) HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize metadata caching interface") if(H5L_init() < 0) HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize link interface") + if(H5FS_init() < 0) + HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize FS interface") /* Debugging? */ H5_debug_mask("-all"); diff --git a/src/H5FSint.c b/src/H5FSint.c index 1a41172..4297291 100644 --- a/src/H5FSint.c +++ b/src/H5FSint.c @@ -77,6 +77,32 @@ /*******************/ +/*------------------------------------------------------------------------- + * Function: H5FS_init + * + * Purpose: Initialize the interface in case it is unable to initialize + * itself soon enough. + * + * Return: Success: non-negative + * Failure: negative + * + * Programmer: Quincey Koziol + * Saturday, March 4, 2000 + * + *------------------------------------------------------------------------- + */ +herr_t +H5FS_init(void) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + /* FUNC_ENTER() does all the work */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5FS_init() */ + /*------------------------------------------------------------------------- * Function: H5FS__create_flush_depend diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h index c0467a6..247d75c 100644 --- a/src/H5FSprivate.h +++ b/src/H5FSprivate.h @@ -175,6 +175,9 @@ H5FL_SEQ_EXTERN(H5FS_section_class_t); /* Library-private Function Prototypes */ /***************************************/ +/* Package initialization routine */ +H5_DLL herr_t H5FS_init(void); + /* Free space manager routines */ H5_DLL H5FS_t *H5FS_create(H5F_t *f, hid_t dxpl_id, haddr_t *fs_addr, const H5FS_create_t *fs_create, uint16_t nclasses, |