summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 2ebcd94..435c1be 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -1138,9 +1138,15 @@ done:
HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "can't close property list")
f->shared = H5FL_FREE(H5F_shared_t, f->shared);
- }
+ } /* end if */
+
+ /* Free VOL object */
+ if(f->vol_obj)
+ if(H5VL_free_object(f->vol_obj) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTDEC, NULL, "unable to free VOL object")
+
f = H5FL_FREE(H5F_t, f);
- }
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__new() */
@@ -1407,6 +1413,9 @@ H5F__dest(H5F_t *f, hbool_t flush)
/* Free the non-shared part of the file */
f->open_name = (char *)H5MM_xfree(f->open_name);
f->actual_name = (char *)H5MM_xfree(f->actual_name);
+ if(f->vol_obj && H5VL_free_object(f->vol_obj) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "unable to free VOL object")
+ f->vol_obj = NULL;
if(H5FO_top_dest(f) < 0)
HDONE_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "problems closing file")
f->shared = NULL;
@@ -1820,6 +1829,35 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5F__post_open
+ *
+ * Purpose: Finishes file open after wrapper context for file has been
+ * set.
+ *
+ * Return: SUCCEED/FAIL
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F__post_open(H5F_t *f)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_PACKAGE
+
+ /* Sanity check arguments */
+ HDassert(f);
+
+ /* Store a vol object in the file struct */
+ if(NULL == (f->vol_obj = H5VL_create_object_using_vol_id(H5I_FILE, f, f->shared->vol_id)))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't create VOL object")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F__flush() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_flush_phase1
*
* Purpose: First phase of flushing cached data.