summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5F.c87
-rw-r--r--src/H5FS.c180
-rw-r--r--src/H5FScache.c17
-rw-r--r--src/H5FSdbg.c6
-rw-r--r--src/H5FSprivate.h5
-rw-r--r--src/H5FSsection.c65
-rw-r--r--src/H5Fdeprec.c172
-rw-r--r--src/H5Fpkg.h7
-rw-r--r--src/H5Fprivate.h7
-rw-r--r--src/H5Fpublic.h65
-rw-r--r--src/H5Fsuper.c87
-rw-r--r--src/H5Fsuper_cache.c36
-rw-r--r--src/H5MF.c314
-rw-r--r--src/H5MFaggr.c8
-rw-r--r--src/H5MFdbg.c62
-rw-r--r--src/H5MFprivate.h4
-rw-r--r--src/H5O.c1
-rw-r--r--src/H5Ofsinfo.c309
-rw-r--r--src/H5Opkg.h4
-rw-r--r--src/H5Oprivate.h12
-rw-r--r--src/H5Pdeprec.c54
-rw-r--r--src/H5Pfcpl.c152
-rw-r--r--src/H5Ppublic.h9
-rwxr-xr-xsrc/H5SM.c13
-rwxr-xr-xsrc/H5SMprivate.h2
-rw-r--r--src/H5trace.c75
-rw-r--r--src/H5vers.txt1
-rw-r--r--src/H5version.h130
-rwxr-xr-xsrc/Makefile.am5
-rw-r--r--src/Makefile.in29
30 files changed, 1752 insertions, 166 deletions
diff --git a/src/H5F.c b/src/H5F.c
index d259db4..0195b5a 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -891,6 +891,10 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
if(H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &f->shared->sohm_nindexes) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get number of SOHM indexes")
HDassert(f->shared->sohm_nindexes < 255);
+ if(H5P_get(plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &f->shared->fs_strategy) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space strategy")
+ if(H5P_get(plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &f->shared->fs_threshold) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get free-space section threshold")
/* Get the FAPL values to cache */
if(NULL == (plist = (H5P_genplist_t *)H5I_object(fapl_id)))
@@ -1025,9 +1029,11 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
* and also because releasing free space can shrink the file's
* 'eoa' value)
*/
- if(H5MF_close(f, dxpl_id) < 0)
- /* Push error, but keep going*/
- HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file free space info")
+ if(H5F_ACC_RDWR & H5F_INTENT(f)) {
+ if(H5MF_close(f, dxpl_id) < 0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't release file free space info")
+ } /* end if */
/* Unpin the superblock, since we're about to destroy the cache */
if(H5AC_unpin_entry(f, f->shared->sblock) < 0)
@@ -2775,11 +2781,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Fget_info
- * 1. Get storage size for superblock extension if there is one
+ * Function: H5Fget_info2
+ *
+ * Purpose: Gets general information about the file, including:
+ * 1. Get storage size for superblock extension if there is one.
* 2. Get the amount of btree and heap storage for entries
* in the SOHM table if there is one.
- * Consider success when there is no superblock extension and/or SOHM table
+ * 3. The amount of free space tracked in the file.
*
* Return: Success: non-negative on success
* Failure: Negative
@@ -2790,12 +2798,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Fget_info(hid_t obj_id, H5F_info_t *finfo)
+H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo)
{
H5F_t *f; /* Top file in mount hierarchy */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Fget_info, FAIL)
+ FUNC_ENTER_API(H5Fget_info2, FAIL)
H5TRACE2("e", "i*x", obj_id, finfo);
/* Check args */
@@ -2821,18 +2829,67 @@ H5Fget_info(hid_t obj_id, H5F_info_t *finfo)
HDassert(f->shared);
/* Reset file info struct */
- HDmemset(finfo, 0, sizeof(H5F_info_t));
+ HDmemset(finfo, 0, sizeof(*finfo));
+
+ /* Get the size of the superblock and any superblock extensions */
+ if(H5F_super_size(f, H5AC_ind_dxpl_id, &finfo->super.super_size, &finfo->super.super_ext_size) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock sizes")
- /* Check for superblock extension info */
- if(H5F_super_size(f, H5AC_ind_dxpl_id, NULL, &finfo->super_ext_size) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock extension size")
+ /* Get the size of any persistent free space */
+ if(H5MF_get_freespace(f, H5AC_ind_dxpl_id, &finfo->free.tot_space, &finfo->free.meta_size) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve free space information")
/* Check for SOHM info */
if(H5F_addr_defined(f->shared->sohm_addr))
- if(H5SM_ih_size(f, H5AC_ind_dxpl_id, finfo) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve SOHM btree & heap storage info")
+ if(H5SM_ih_size(f, H5AC_ind_dxpl_id, &finfo->sohm.hdr_size, &finfo->sohm.msgs_info) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve SOHM index & heap storage info")
+
+ /* Set version # fields */
+ finfo->super.version = f->shared->sblock->super_vers;
+ finfo->sohm.version = f->shared->sohm_vers;
+ finfo->free.version = HDF5_FREESPACE_VERSION;
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Fget_info2() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Fget_free_sections
+ *
+ * Purpose: To get free-space section information for free-space manager with
+ * TYPE that is associated with file FILE_ID.
+ * If SECT_INFO is null, this routine returns the total # of free-space
+ * sections.
+ *
+ * Return: Success: non-negative, the total # of free space sections
+ * Failure: negative
+ *
+ * Programmer: Vailin Choi; July 1st, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+ssize_t
+H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects,
+ H5F_sect_info_t *sect_info/*out*/)
+{
+ H5F_t *file; /* Top file in mount hierarchy */
+ ssize_t ret_value; /* Return value */
+
+ FUNC_ENTER_API(H5Fget_free_sections, FAIL)
+ H5TRACE4("Zs", "iFmzx", file_id, type, nsects, sect_info);
+
+ /* Check args */
+ if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
+ if(sect_info && nsects == 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "nsects must be > 0")
+
+ /* Go get the free-space section information in the file */
+ if((ret_value = H5MF_get_free_sections(file, H5AC_ind_dxpl_id, type, nsects, sect_info)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Fget_info() */
+} /* end H5Fget_free_sections() */
diff --git a/src/H5FS.c b/src/H5FS.c
index deb9378..5e3392e 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -477,9 +477,6 @@ HDfprintf(stderr, "%s: Section info is NOT for file free space\n", FUNC);
if(fspace->serial_sect_count > 0)
/* Sanity check that section info has address */
HDassert(H5F_addr_defined(fspace->sect_addr));
- else
- /* Sanity check that section info doesn't have address */
- HDassert(!H5F_addr_defined(fspace->sect_addr));
} /* end else */
/* Decrement the reference count on the free space manager header */
@@ -723,6 +720,183 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FS_dirty() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5FS_alloc_hdr()
+ *
+ * Purpose: Allocate space for the free-space manager header
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5FS_alloc_hdr, FAIL)
+
+ /* Check arguments. */
+ HDassert(f);
+ HDassert(fspace);
+
+ if(!H5F_addr_defined(fspace->addr)) {
+ /* Allocate space for the free space header */
+ if(HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, dxpl_id, (hsize_t)H5FS_HEADER_SIZE(f))))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for free space header")
+
+ /* Cache the new free space header (pinned) */
+ if(H5AC_set(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space header to cache")
+ } /* end if */
+
+ if(fs_addr)
+ *fs_addr = fspace->addr;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FS_alloc_hdr() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FS_alloc_sect()
+ *
+ * Purpose: Allocate space for the free-space manager section info header
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5FS_alloc_sect, FAIL)
+
+ /* Check arguments. */
+ HDassert(f);
+ HDassert(fspace);
+
+ if(!H5F_addr_defined(fspace->sect_addr) && fspace->sinfo && fspace->serial_sect_count > 0) {
+ /* Allocate space for section info from aggregator/vfd */
+ /* (The original version called H5MF_alloc(), but that may cause sect_size to change again) */
+ if(HADDR_UNDEF == (fspace->sect_addr = H5MF_aggr_vfd_alloc(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, fspace->sect_size)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "file allocation failed for section info")
+
+ fspace->alloc_sect_size = fspace->sect_size;
+
+ /* Mark free-space header as dirty */
+ if(H5FS_dirty(f, fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
+
+ /* Cache the free-space section info */
+ if(H5AC_set(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, H5AC__NO_FLAGS_SET) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, FAIL, "can't add free space sections to cache")
+
+ fspace->sinfo = NULL;
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FS_alloc_sect() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5FS_free()
+ *
+ * Purpose: Free space for free-space manager header and section info header
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+ haddr_t saved_addr;
+ hsize_t saved_size;
+ unsigned cache_flags;
+ unsigned sinfo_status = 0;
+ unsigned hdr_status = 0;
+
+ FUNC_ENTER_NOAPI(H5FS_free, FAIL)
+
+ /* Check arguments. */
+ HDassert(f);
+ HDassert(fspace);
+
+ cache_flags = H5AC__DELETED_FLAG | H5AC__TAKE_OWNERSHIP_FLAG;;
+
+ if(H5F_addr_defined(fspace->sect_addr)) {
+
+ /* Check whether free-space manager section info is in cache or not */
+ if(H5AC_get_entry_status(f, fspace->sect_addr, &sinfo_status) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "unable to check metadata cache status for free-space section info")
+
+ /* Load free-space manager section info */
+ if(sinfo_status & H5AC_ES__IN_CACHE || !fspace->sinfo) {
+ if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, NULL, fspace, H5AC_READ)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to load free space section info")
+
+ /* Unload and release ownership of the free-space manager section info */
+ if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, fspace->sinfo, cache_flags) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info")
+ }
+
+ saved_addr = fspace->sect_addr;
+ saved_size = fspace->alloc_sect_size;
+
+ fspace->sect_addr = HADDR_UNDEF;
+ fspace->alloc_sect_size = 0;
+
+ /* Free space for the free-space manager section info */
+ if(H5MF_xfree(f, H5FD_MEM_FSPACE_SINFO, dxpl_id, saved_addr, saved_size) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to release free space sections")
+
+ /* Mark free-space manager header as dirty */
+ if(H5FS_dirty(f, fspace) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
+ }
+
+ if(H5F_addr_defined(fspace->addr)) {
+ /* Check whether free-space manager header is in cache or not */
+ if(H5AC_get_entry_status(f, fspace->addr, &hdr_status) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "unable to check metadata cache status for free-space section info")
+
+ if(hdr_status & H5AC_ES__IN_CACHE) {
+ /* Unpin the free-space manager header */
+ if(H5AC_unpin_entry(f, fspace) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPIN, FAIL, "unable to unpin fractal heap header")
+
+ /* Load the free-space manager header */
+ if(NULL == (fspace = (H5FS_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, NULL, fspace, H5AC_READ)))
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to load free space section info")
+
+ /* Unload and release ownership of the free-space header */
+ if(H5AC_unprotect(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, cache_flags) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info")
+ }
+ saved_addr = fspace->addr;
+ fspace->addr = HADDR_UNDEF;
+
+ /* Free space for the free-space manager header */
+ if(H5MF_xfree(f, H5FD_MEM_FSPACE_HDR, dxpl_id, saved_addr, (hsize_t)H5FS_HEADER_SIZE(f)) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to free free space header")
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FS_free() */
+
#ifdef H5FS_DEBUG_ASSERT
/*-------------------------------------------------------------------------
diff --git a/src/H5FScache.c b/src/H5FScache.c
index a7978f5..482b9cb 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -334,10 +334,7 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
if(H5FS_cache_sinfo_flush(f, dxpl_id, FALSE, fspace->sect_addr, fspace->sinfo, NULL) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFLUSH, FAIL, "unable to save free space section info to disk")
} /* end if */
- else {
- /* Sanity check that section info doesn't have address */
- HDassert(!H5F_addr_defined(fspace->sect_addr));
- } /* end else */
+
#ifdef QAK
HDfprintf(stderr, "%s: Check 2.0\n", FUNC);
HDfprintf(stderr, "%s: fspace->sect_addr = %a, fspace->sinfo = %p\n", FUNC, fspace->sect_addr, fspace->sinfo);
@@ -348,15 +345,9 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n"
fspace->sinfo->dirty = FALSE;
} /* end if */
} /* end if */
- else {
- /* Just sanity checks... */
- if(fspace->serial_sect_count > 0)
- /* Sanity check that section info has address */
- HDassert(H5F_addr_defined(fspace->sect_addr));
- else
- /* Sanity check that section info doesn't have address */
- HDassert(!H5F_addr_defined(fspace->sect_addr));
- } /* end else */
+ else if(fspace->serial_sect_count > 0)
+ /* Sanity check that section info has address */
+ HDassert(H5F_addr_defined(fspace->sect_addr));
if(fspace->cache_info.is_dirty) {
uint8_t *hdr; /* Pointer to header buffer */
diff --git a/src/H5FSdbg.c b/src/H5FSdbg.c
index df48240..8cf64ef 100644
--- a/src/H5FSdbg.c
+++ b/src/H5FSdbg.c
@@ -286,10 +286,8 @@ H5FS_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t UNUSED addr, FILE *stream, int
break;
case H5FS_CLIENT_FILE_ID:
-#ifdef NOT_YET
- if(H5MF_sects_debug(f, dxpl_id, fs_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections")
-#endif /* NOT_YET */
+ if(H5MF_sects_debug(f, dxpl_id, fs_addr, stream, indent + 3, MAX(0, fwidth - 3)) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_SYSTEM, FAIL, "unable to dump file free space sections")
break;
default:
diff --git a/src/H5FSprivate.h b/src/H5FSprivate.h
index 056449d..145c374 100644
--- a/src/H5FSprivate.h
+++ b/src/H5FSprivate.h
@@ -180,10 +180,15 @@ H5_DLL H5FS_t *H5FS_open(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr,
H5_DLL herr_t H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size);
H5_DLL herr_t H5FS_delete(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr);
H5_DLL herr_t H5FS_close(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace);
+H5_DLL herr_t H5FS_alloc_hdr(H5F_t *f, H5FS_t *fspace, haddr_t *fs_addr, hid_t dxpl_id);
+H5_DLL herr_t H5FS_alloc_sect(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id);
+H5_DLL herr_t H5FS_free(H5F_t *f, H5FS_t *fspace, hid_t dxpl_id);
/* Free space section routines */
H5_DLL herr_t H5FS_sect_add(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
H5FS_section_info_t *node, unsigned flags, void *op_data);
+H5_DLL htri_t H5FS_sect_try_merge(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
+ H5FS_section_info_t *sect, unsigned flags, void *op_data);
H5_DLL htri_t H5FS_sect_try_extend(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
haddr_t addr, hsize_t size, hsize_t extra_requested);
H5_DLL herr_t H5FS_sect_remove(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace,
diff --git a/src/H5FSsection.c b/src/H5FSsection.c
index 26ff7b9..30885a9 100644
--- a/src/H5FSsection.c
+++ b/src/H5FSsection.c
@@ -1562,6 +1562,71 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5FS_sect_try_merge
+ *
+ * Purpose: Try to merge/shrink a block
+ *
+ * Return: TRUE: merged/shrunk
+ * FALSE: not merged/not shrunk
+ * Failure: negative
+ *
+ * Programmer: Vailin Choi; June 10, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5FS_sect_try_merge(H5F_t *f, hid_t dxpl_id, H5FS_t *fspace, H5FS_section_info_t *sect,
+ unsigned flags, void *op_data)
+{
+ hbool_t sinfo_valid = FALSE; /* Whether the section info is valid */
+ hbool_t sinfo_modified = FALSE; /* Whether the section info was modified */
+ hsize_t saved_fs_size; /* copy the free-space section size */
+ htri_t ret_value = FALSE; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5FS_sect_try_merge, FAIL)
+
+ /* Check arguments. */
+ HDassert(f);
+ HDassert(fspace);
+ HDassert(sect);
+ HDassert(H5F_addr_defined(sect->addr));
+ HDassert(sect->size);
+
+ /* Get a pointer to the section info */
+ if(H5FS_sinfo_lock(f, dxpl_id, fspace, H5AC_WRITE) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTGET, FAIL, "can't get section info")
+ sinfo_valid = TRUE;
+ saved_fs_size = sect->size;
+
+ /* Attempt to merge/shrink section with existing sections */
+ if(H5FS_sect_merge(fspace, &sect, op_data) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTMERGE, FAIL, "can't merge sections")
+
+ /* Check if section is shrunk and/or merged away completely */
+ if(!sect) {
+ sinfo_modified = TRUE;
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ else {
+ /* Check if section is merged */
+ if(sect->size > saved_fs_size) {
+ if(H5FS_sect_link(fspace, sect, flags) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTINSERT, FAIL, "can't insert free space section into skip list")
+ sinfo_modified = TRUE;
+ HGOTO_DONE(TRUE)
+ } /* end if */
+ } /* end else */
+
+done:
+ /* Release the section info */
+ if(sinfo_valid && H5FS_sinfo_unlock(f, dxpl_id, fspace, sinfo_modified) < 0)
+ HDONE_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release section info")
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FS_sect_try_merge() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5FS_sect_find_node
*
* Purpose: Locate a section of free space (in existing free space list
diff --git a/src/H5Fdeprec.c b/src/H5Fdeprec.c
new file mode 100644
index 0000000..46d7979
--- /dev/null
+++ b/src/H5Fdeprec.c
@@ -0,0 +1,172 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5Fdeprec.c
+ * October 1 2009
+ * Quincey Koziol <koziol@hdfgroup.org>
+ *
+ * Purpose: Deprecated functions from the H5F interface. These
+ * functions are here for compatibility purposes and may be
+ * removed in the future. Applications should switch to the
+ * newer APIs.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/****************/
+/* Module Setup */
+/****************/
+
+#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5F_init_deprec_interface
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Fpkg.h" /* File access */
+#include "H5Iprivate.h" /* IDs */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Package Typedefs */
+/********************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5F_init_deprec_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5F_init_deprec_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5F_init() currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5F_init_deprec_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_init_deprec_interface)
+
+ FUNC_LEAVE_NOAPI(H5F_init())
+} /* H5F_init_deprec_interface() */
+
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+/*-------------------------------------------------------------------------
+ * Function: H5Fget_info1
+ *
+ * Purpose: Gets general information about the file, including:
+ * 1. Get storage size for superblock extension if there is one.
+ * 2. Get the amount of btree and heap storage for entries
+ * in the SOHM table if there is one.
+ * 3. The amount of free space tracked in the file.
+ *
+ * Return: Success: non-negative on success
+ * Failure: Negative
+ *
+ * Programmer: Vailin Choi
+ * July 11, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo)
+{
+ H5F_t *f; /* Top file in mount hierarchy */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(H5Fget_info1, FAIL)
+ H5TRACE2("e", "i*x", obj_id, finfo);
+
+ /* Check args */
+ if(!finfo)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct")
+
+ /* For file IDs, get the file object directly */
+ /* (This prevents the H5G_loc() call from returning the file pointer for
+ * the top file in a mount hierarchy)
+ */
+ if(H5I_get_type(obj_id) == H5I_FILE ) {
+ if(NULL == (f = (H5F_t *)H5I_object(obj_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
+ } /* end if */
+ else {
+ H5G_loc_t loc; /* Object location */
+
+ /* Get symbol table entry */
+ if(H5G_loc(obj_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid object ID")
+ f = loc.oloc->file;
+ } /* end else */
+ HDassert(f->shared);
+
+ /* Reset file info struct */
+ HDmemset(finfo, 0, sizeof(*finfo));
+
+ /* Get the size of the superblock extension */
+ if(H5F_super_size(f, H5AC_ind_dxpl_id, NULL, &finfo->super_ext_size) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock extension size")
+
+ /* Check for SOHM info */
+ if(H5F_addr_defined(f->shared->sohm_addr))
+ if(H5SM_ih_size(f, H5AC_ind_dxpl_id, &finfo->sohm.hdr_size, &finfo->sohm.msgs_info) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve SOHM index & heap storage info")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Fget_info1() */
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
+
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index cf40a86..94a24df 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -69,7 +69,9 @@
#define H5F_FS_MERGE_RAWDATA 0x02 /* Section can merge with small 'raw' data aggregator */
/* Macro to abstract checking whether file is using a free space manager */
-#define H5F_HAVE_FREE_SPACE_MANAGER(F) TRUE /* Currently always have a free space manager */
+#define H5F_HAVE_FREE_SPACE_MANAGER(F) \
+ ((F)->shared->fs_strategy == H5F_FILE_SPACE_ALL || \
+ (F)->shared->fs_strategy == H5F_FILE_SPACE_ALL_PERSIST)
/* Macros for encoding/decoding superblock */
#define H5F_MAX_DRVINFOBLOCK_SIZE 1024 /* Maximum size of superblock driver info buffer */
@@ -229,6 +231,8 @@ typedef struct H5F_file_t {
H5RC_t *grp_btree_shared; /* Ref-counted group B-tree node info */
/* File space allocation information */
+ H5F_file_space_type_t fs_strategy; /* File space handling strategy */
+ hsize_t fs_threshold; /* Free space section threshold */
hbool_t use_tmp_space; /* Whether temp. file space allocation is allowed */
haddr_t tmp_addr; /* Next address to use for temp. space in the file */
unsigned fs_aggr_merge[H5FD_MEM_NTYPES]; /* Flags for whether free space can merge with aggregator(s) */
@@ -303,6 +307,7 @@ H5_DLL herr_t H5F_super_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_size, hsize
/* Superblock extension related routines */
H5_DLL herr_t H5F_super_ext_open(H5F_t *f, haddr_t ext_addr, H5O_loc_t *ext_ptr);
H5_DLL herr_t H5F_super_ext_write_msg(H5F_t *f, hid_t dxpl_id, void *mesg, unsigned id, hbool_t may_create);
+H5_DLL herr_t H5F_super_ext_remove_msg(H5F_t *f, hid_t dxpl_id, unsigned id);
H5_DLL herr_t H5F_super_ext_close(H5F_t *f, H5O_loc_t *ext_ptr);
/* Metadata accumulator routines */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 574c4dc..8dae885 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -350,6 +350,8 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
#define H5F_CRT_SHMSG_INDEX_MINSIZE_NAME "shmsg_message_minsize" /* Minimum size of messages in each index */
#define H5F_CRT_SHMSG_LIST_MAX_NAME "shmsg_list_max" /* Shared message list maximum size */
#define H5F_CRT_SHMSG_BTREE_MIN_NAME "shmsg_btree_min" /* Shared message B-tree minimum size */
+#define H5F_CRT_FILE_SPACE_STRATEGY_NAME "file_space_strategy" /* File space handling strategy */
+#define H5F_CRT_FREE_SPACE_THRESHOLD_NAME "free_space_threshold" /* Free space section threshold */
@@ -401,6 +403,11 @@ typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
must compensate. -QAK
*/
+/* Default file space handling strategy */
+#define H5F_FILE_SPACE_STRATEGY_DEF H5F_FILE_SPACE_ALL
+/* Default free space section threshold used by free-space managers */
+#define H5F_FREE_SPACE_THRESHOLD_DEF 1
+
/* Macros to define signatures of all objects in the file */
/* Size of signature information (on disk) */
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 20814b6..a26c814 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -101,14 +101,23 @@ typedef enum H5F_close_degree_t {
} H5F_close_degree_t;
/* Current "global" information about file */
-/* (just size info currently) */
-typedef struct H5F_info_t {
- hsize_t super_ext_size; /* Superblock extension size */
+typedef struct H5F_info2_t {
+ struct {
+ unsigned version; /* Superblock version # */
+ hsize_t super_size; /* Superblock size */
+ hsize_t super_ext_size; /* Superblock extension size */
+ } super;
+ struct {
+ unsigned version; /* Version # of file free space management */
+ hsize_t meta_size; /* Free space manager metadata size */
+ hsize_t tot_space; /* Amount of free space in the file */
+ } free;
struct {
+ unsigned version; /* Version # of shared object header info */
hsize_t hdr_size; /* Shared object header message header size */
H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
} sohm;
-} H5F_info_t;
+} H5F_info2_t;
/*
* Types of allocation requests. The values larger than H5FD_MEM_DEFAULT
@@ -128,12 +137,30 @@ typedef enum H5F_mem_t {
H5FD_MEM_NTYPES /*must be last*/
} H5F_mem_t;
+/* Free space section information */
+typedef struct H5F_sect_info_t {
+ haddr_t addr; /* Address of free space section */
+ hsize_t size; /* Size of free space section */
+} H5F_sect_info_t;
+
/* Library's file format versions */
typedef enum H5F_libver_t {
H5F_LIBVER_EARLIEST, /* Use the earliest possible format for storing objects */
H5F_LIBVER_LATEST /* Use the latest possible format available for storing objects*/
} H5F_libver_t;
+/* File space handling strategy */
+typedef enum H5F_file_space_type_t {
+ H5F_FILE_SPACE_DEFAULT = 0, /* Default (or current) free space strategy setting */
+ H5F_FILE_SPACE_ALL_PERSIST = 1, /* Persistent free space managers, aggregators, virtual file driver */
+ H5F_FILE_SPACE_ALL = 2, /* Non-persistent free space managers, aggregators, virtual file driver */
+ /* This is the library default */
+ H5F_FILE_SPACE_AGGR_VFD = 3, /* Aggregators, Virtual file driver */
+ H5F_FILE_SPACE_VFD = 4, /* Virtual file driver */
+ H5F_FILE_SPACE_NTYPES /* must be last */
+} H5F_file_space_type_t;
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -169,7 +196,35 @@ H5_DLL herr_t H5Fget_mdc_size(hid_t file_id,
int * cur_num_entries_ptr);
H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id);
H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size);
-H5_DLL herr_t H5Fget_info(hid_t obj_id, H5F_info_t *bh_info);
+H5_DLL herr_t H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo);
+H5_DLL ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type,
+ size_t nsects, H5F_sect_info_t *sect_info/*out*/);
+
+/* Symbols defined for compatibility with previous versions of the HDF5 API.
+ *
+ * Use of these symbols is deprecated.
+ */
+#ifndef H5_NO_DEPRECATED_SYMBOLS
+
+/* Macros */
+
+
+/* Typedefs */
+
+/* Current "global" information about file */
+typedef struct H5F_info1_t {
+ hsize_t super_ext_size; /* Superblock extension size */
+ struct {
+ hsize_t hdr_size; /* Shared object header message header size */
+ H5_ih_info_t msgs_info; /* Shared object header message index & heap size */
+ } sohm;
+} H5F_info1_t;
+
+
+/* Function prototypes */
+H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo);
+
+#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
}
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 9c12f15..c24cfa1 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -400,6 +400,12 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
/* Bump superblock version to create superblock extension for SOHM info */
else if(f->shared->sohm_nindexes > 0)
super_vers = HDF5_SUPERBLOCK_VERSION_2;
+ /* Bump superblock version to create superblock extension for
+ * non-default file space strategy or non-default free-space threshold
+ */
+ else if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF ||
+ f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF)
+ super_vers = HDF5_SUPERBLOCK_VERSION_2;
/* Check for non-default indexed storage B-tree internal 'K' value
* and set the version # of the superblock to 1 if it is a non-default
* value.
@@ -495,6 +501,12 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
need_ext = TRUE;
} /* end if */
+ /* Files with non-default free space settings always need the superblock extension */
+ else if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF ||
+ f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF) {
+ HDassert(super_vers >= HDF5_SUPERBLOCK_VERSION_2);
+ need_ext = TRUE;
+ } /* end if */
/* If we're going to use a version of the superblock format which allows
* for the superblock extension, check for non-default values to store
* in it.
@@ -571,6 +583,18 @@ H5F_super_init(H5F_t *f, hid_t dxpl_id)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update driver info header message")
} /* end if */
+ /* Check for non-default free space settings */
+ if(f->shared->fs_strategy != H5F_FILE_SPACE_STRATEGY_DEF ||
+ f->shared->fs_threshold != H5F_FREE_SPACE_THRESHOLD_DEF) {
+ H5O_fsinfo_t fsinfo; /* Free space manager info message */
+
+ /* Write free-space manager info message to superblock extension object header if needed */
+ fsinfo.strategy = f->shared->fs_strategy;
+ fsinfo.threshold = f->shared->fs_threshold;
+ if(H5O_msg_create(&ext_loc, H5O_FSINFO_ID, H5O_MSG_FLAG_DONTSHARE, H5O_UPDATE_TIME, &fsinfo, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message")
+ } /* end if */
+
/* Close superblock extension */
if(H5F_super_ext_close(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to close file's superblock extension")
@@ -769,3 +793,66 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_super_ext_write_msg() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_super_ext_remove_msg
+ *
+ * Purpose: Remove the message with ID from the superblock extension
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_super_ext_remove_msg(H5F_t *f, hid_t dxpl_id, unsigned id)
+{
+ htri_t status; /* Indicate whether the message exists or not */
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ int null_count = 0; /* # of null messages */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5F_super_ext_remove_msg, FAIL)
+
+ /* Make sure that the superblock extension object header exists */
+ HDassert(H5F_addr_defined(f->shared->sblock->ext_addr));
+
+ /* Open superblock extension object header */
+ if(H5F_super_ext_open(f, f->shared->sblock->ext_addr, &ext_loc) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "error in starting file's superblock extension")
+
+ /* Check if message with ID exists in the object header */
+ if((status = H5O_msg_exists(&ext_loc, id, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message")
+ else if(status) { /* message exists */
+ H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */
+
+ /* Remove the message */
+ if(H5O_msg_remove(&ext_loc, id, H5O_ALL, TRUE, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDELETE, FAIL, "unable to delete free-space manager info message")
+
+ /* Get info for the superblock extension's object header */
+ if(H5O_get_hdr_info(&ext_loc, dxpl_id, &hdr_info) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info")
+
+ /* If the object header is an empty base chunk, remove superblock extension */
+ if(hdr_info.nchunks == 1) {
+ if((null_count = H5O_msg_count(&ext_loc, H5O_NULL_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
+ else if((unsigned)null_count == hdr_info.nmesgs) {
+ HDassert(H5F_addr_defined(ext_loc.addr));
+ if(H5O_delete(f, dxpl_id, ext_loc.addr) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "unable to count messages")
+ f->shared->sblock->ext_addr = HADDR_UNDEF;
+ } /* end if */
+ } /* end if */
+ } /* end if */
+
+ /* Close superblock extension object header */
+ if(H5F_super_ext_close(f, &ext_loc) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "unable to close file's superblock extension")
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5F_super_ext_remove_msg() */
+
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index 39899f0..ada9e57 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -480,6 +480,7 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *udata1
H5O_loc_t ext_loc; /* "Object location" for superblock extension */
H5O_btreek_t btreek; /* v1 B-tree 'K' value message from superblock extension */
H5O_drvinfo_t drvinfo; /* Driver info message from superblock extension */
+ size_t u; /* Local index variable */
htri_t status; /* Status for message existing */
/* Sanity check - superblock extension should only be defined for
@@ -564,6 +565,41 @@ H5F_sblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *udata1
sblock->sym_leaf_k = H5F_CRT_SYM_LEAF_DEF;
} /* end if */
+ /* Check for the extension having a 'free-space manager info' message */
+ if((status = H5O_msg_exists(&ext_loc, H5O_FSINFO_ID, dxpl_id)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, NULL, "unable to check object header")
+ if(status) {
+ H5O_fsinfo_t fsinfo; /* Free-space manager info message from superblock extension */
+
+ /* Retrieve the 'free-space manager info' structure */
+ if(NULL == H5O_msg_read(&ext_loc, H5O_FSINFO_ID, &fsinfo, dxpl_id))
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "unable to get free-space manager info message")
+
+ if(shared->fs_strategy != fsinfo.strategy) {
+ shared->fs_strategy = fsinfo.strategy;
+
+ /* Set non-default strategy in the property list */
+ if(H5P_set(c_plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &fsinfo.strategy) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "unable to set file space strategy")
+ } /* end if */
+ if(shared->fs_threshold != fsinfo.threshold) {
+ shared->fs_threshold = fsinfo.threshold;
+
+ /* Set non-default threshold in the property list */
+ if(H5P_set(c_plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &fsinfo.threshold) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, NULL, "unable to set file space strategy")
+ } /* end if */
+
+ /* set free-space manager addresses */
+ shared->fs_addr[0] = HADDR_UNDEF;
+ for(u = 1; u < NELMTS(f->shared->fs_addr); u++)
+ shared->fs_addr[u] = fsinfo.fs_addr[u-1];
+ } /* end if */
+ else {
+ for(u = 0; u < NELMTS(f->shared->fs_addr); u++)
+ shared->fs_addr[u] = HADDR_UNDEF;
+ } /* end else */
+
/* Close superblock extension */
if(H5F_super_ext_close(f, &ext_loc) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, NULL, "unable to close file's superblock extension")
diff --git a/src/H5MF.c b/src/H5MF.c
index b59af88..0129c1d 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -65,6 +65,13 @@ typedef enum {
H5MF_AGGR_MERGE_TOGETHER /* Metadata & raw data in one free list */
} H5MF_aggr_merge_t;
+/* User data for section info iterator callback for iterating over free space sections */
+typedef struct {
+ H5F_sect_info_t *sects; /* section info to be retrieved */
+ size_t sect_count; /* # of sections requested */
+ size_t sect_idx; /* the current count of sections */
+} H5MF_sect_iter_ud_t;
+
/********************/
/* Package Typedefs */
@@ -628,6 +635,12 @@ HDfprintf(stderr, "%s: Trying to avoid starting up free space manager\n", FUNC);
else if(status > 0)
/* Indicate success */
HGOTO_DONE(SUCCEED)
+ else if(size < f->shared->fs_threshold) {
+#ifdef H5MF_ALLOC_DEBUG_MORE
+HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, addr, size);
+#endif /* H5MF_ALLOC_DEBUG_MORE */
+ HGOTO_DONE(SUCCEED)
+ }
} /* end if */
/* If we are deleting the free space manager, leave now, to avoid
@@ -654,7 +667,6 @@ HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, a
if(H5MF_alloc_start(f, dxpl_id, fs_type) < 0)
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
} /* end if */
- HDassert(f->shared->fs_man[fs_type]);
/* Create free space section for block */
if(NULL == (node = H5MF_sect_simple_new(addr, size)))
@@ -666,16 +678,31 @@ HDfprintf(stderr, "%s: dropping addr = %a, size = %Hu, on the floor!\n", FUNC, a
udata.alloc_type = alloc_type;
udata.allow_sect_absorb = TRUE;
- /* Add to the free space for the file */
+ /* If size of section freed is larger than threshold, add it to the free space manager */
+ if(size >= f->shared->fs_threshold) {
+ HDassert(f->shared->fs_man[fs_type]);
+
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: Before H5FS_sect_add()\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- if(H5FS_sect_add(f, dxpl_id, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata) < 0)
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't add section to file free space")
- node = NULL;
+ /* Add to the free space for the file */
+ if(H5FS_sect_add(f, dxpl_id, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't add section to file free space")
+ node = NULL;
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: After H5FS_sect_add()\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
+ } /* end if */
+ else {
+ htri_t merged; /* Whether node was merged */
+
+ /* Try to merge the section that is smaller than threshold */
+ if((merged = H5FS_sect_try_merge(f, dxpl_id, f->shared->fs_man[fs_type], (H5FS_section_info_t *)node, H5FS_ADD_RETURNED_SPACE, &udata)) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINSERT, FAIL, "can't merge section to file free space")
+ else if(merged == TRUE) /* successfully merged */
+ /* Indicate that the node was used */
+ node = NULL;
+ } /* end else */
done:
/* Release section node, if allocated and not added to section list or merged */
@@ -970,55 +997,147 @@ HDfprintf(stderr, "%s: Entering\n", FUNC);
if(H5MF_free_aggrs(f, dxpl_id) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTFREE, FAIL, "can't free aggregators")
- /* Iterate over all the free space types that have managers and get each free list's space */
- for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ /* Making free-space managers persistent for superblock version >= 2 */
+ if(f->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2
+ && f->shared->fs_strategy == H5F_FILE_SPACE_ALL_PERSIST) {
+ H5O_fsinfo_t fsinfo; /* Free space manager info message */
+ hbool_t update = FALSE; /* To update info for the message */
+
+ /* Check to remove free-space manager info message from superblock extension */
+ if(H5F_addr_defined(f->shared->sblock->ext_addr))
+ if(H5F_super_ext_remove_msg(f, dxpl_id, H5O_FSINFO_ID) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "error in removing message from superblock extension")
+
+ /* Free free-space manager header and/or section info header */
+ for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ H5FS_stat_t fs_stat; /* Information for free-space manager */
+
+ /* Check for free space manager of this type */
+ if(f->shared->fs_man[type]) {
+ /* Switch to "about to be deleted" state */
+ f->shared->fs_state[type] = H5F_FS_STATE_DELETING;
+
+ /* Query the free space manager's information */
+ if(H5FS_stat_info(f, f->shared->fs_man[type], &fs_stat) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't get free-space info")
+
+ /* Check if the free space manager has space in the file */
+ if(H5F_addr_defined(fs_stat.addr) || H5F_addr_defined(fs_stat.sect_addr)) {
+ /* Delete the free space manager in the file */
+ /* (will re-allocate later) */
+ if(H5FS_free(f, f->shared->fs_man[type], dxpl_id) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTRELEASE, FAIL, "can't release free-space headers")
+ f->shared->fs_addr[type] = HADDR_UNDEF;
+ } /* end if */
+ } /* end iif */
+ fsinfo.fs_addr[type-1] = HADDR_UNDEF;
+ } /* end for */
+
+ fsinfo.strategy = f->shared->fs_strategy;
+ fsinfo.threshold = f->shared->fs_threshold;
+
+ /* Write free-space manager info message to superblock extension object header */
+ /* Create the superblock extension object header in advance if needed */
+ if(H5F_super_ext_write_msg(f, dxpl_id, &fsinfo, H5O_FSINFO_ID, TRUE) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "error in writing message to superblock extension")
+
+ /* Re-allocate free-space manager header and/or section info header */
+ for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ H5FS_stat_t fs_stat; /* Information for free-space manager */
+
+ /* Check for active free space manager of this type */
+ if(f->shared->fs_man[type]) {
+ /* Re-query free space manager info for this type */
+ if(H5FS_stat_info(f, f->shared->fs_man[type], &fs_stat) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't get free-space info")
+
+ /* Are there sections to persist? */
+ if(fs_stat.serial_sect_count) {
+ /* Allocate space for free-space manager header */
+ if(H5FS_alloc_hdr(f, f->shared->fs_man[type], &f->shared->fs_addr[type], dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_NOSPACE, FAIL, "can't allocated free-space header")
+
+ /* Allocate space for free-space maanger section info header */
+ if(H5FS_alloc_sect(f, f->shared->fs_man[type], dxpl_id) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate free-space section info")
+
+ HDassert(f->shared->fs_addr[type]);
+ fsinfo.fs_addr[type-1] = f->shared->fs_addr[type];
+ update = TRUE;
+ } /* end if */
+ } else if(H5F_addr_defined(f->shared->fs_addr[type])) {
+ fsinfo.fs_addr[type-1] = f->shared->fs_addr[type];
+ update = TRUE;
+ } /* end else-if */
+ } /* end for */
+
+ /* Update the free space manager info message in superblock extension object header */
+ if(update)
+ if(H5F_super_ext_write_msg(f, dxpl_id, &fsinfo, H5O_FSINFO_ID, FALSE) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_WRITEERROR, FAIL, "error in writing message to superblock extension")
+
+ /* Final close of free-space managers */
+ for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
+ if(f->shared->fs_man[type]) {
+ if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't close free space manager")
+ f->shared->fs_man[type] = NULL;
+ f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
+ } /* end if */
+ f->shared->fs_addr[type] = HADDR_UNDEF;
+ } /* end for */
+ } /* end if */
+ else { /* super_vers can be 0, 1, 2 */
+ /* Iterate over all the free space types that have managers and get each free list's space */
+ for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type)) {
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: Check 1.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- /* If the free space manager for this type is open, close it */
- if(f->shared->fs_man[type]) {
+ /* If the free space manager for this type is open, close it */
+ if(f->shared->fs_man[type]) {
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: Before closing free space manager\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release free space info")
- f->shared->fs_man[type] = NULL;
- f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
- } /* end if */
+ if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTRELEASE, FAIL, "can't release free space info")
+ f->shared->fs_man[type] = NULL;
+ f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
+ } /* end if */
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: Check 2.0 - f->shared->fs_man[%u] = %p, f->shared->fs_addr[%u] = %a\n", FUNC, (unsigned)type, f->shared->fs_man[type], (unsigned)type, f->shared->fs_addr[type]);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- /* If there is free space manager info for this type, delete it */
- /* (XXX: Make this optional when free space for a file can be persistant) */
- if(H5F_addr_defined(f->shared->fs_addr[type])) {
- haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */
+ /* If there is free space manager info for this type, delete it */
+ if(H5F_addr_defined(f->shared->fs_addr[type])) {
+ haddr_t tmp_fs_addr; /* Temporary holder for free space manager address */
- /* Put address into temporary variable and reset it */
- /* (Avoids loopback in file space freeing routine) */
- tmp_fs_addr = f->shared->fs_addr[type];
- f->shared->fs_addr[type] = HADDR_UNDEF;
+ /* Put address into temporary variable and reset it */
+ /* (Avoids loopback in file space freeing routine) */
+ tmp_fs_addr = f->shared->fs_addr[type];
+ f->shared->fs_addr[type] = HADDR_UNDEF;
- /* Shift to "deleting" state, to make certain we don't track any
- * file space freed as a result of deleting the free space manager.
- */
- f->shared->fs_state[type] = H5F_FS_STATE_DELETING;
+ /* Shift to "deleting" state, to make certain we don't track any
+ * file space freed as a result of deleting the free space manager.
+ */
+ f->shared->fs_state[type] = H5F_FS_STATE_DELETING;
#ifdef H5MF_ALLOC_DEBUG_MORE
HDfprintf(stderr, "%s: Before deleting free space manager\n", FUNC);
#endif /* H5MF_ALLOC_DEBUG_MORE */
- /* Delete free space manager for this type */
- if(H5FS_delete(f, dxpl_id, tmp_fs_addr) < 0)
- HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't delete free space manager")
- /* Shift [back] to closed state */
- HDassert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
- f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
+ /* Delete free space manager for this type */
+ if(H5FS_delete(f, dxpl_id, tmp_fs_addr) < 0)
+ HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "can't delete free space manager")
- /* Sanity check that the free space manager for this type wasn't started up again */
- HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
- } /* end if */
- } /* end for */
+ /* Shift [back] to closed state */
+ HDassert(f->shared->fs_state[type] == H5F_FS_STATE_DELETING);
+ f->shared->fs_state[type] = H5F_FS_STATE_CLOSED;
+
+ /* Sanity check that the free space manager for this type wasn't started up again */
+ HDassert(!H5F_addr_defined(f->shared->fs_addr[type]));
+ } /* end if */
+ } /* end for */
+ } /* end else */
/* Free the space in aggregators (again) */
/* (in case any free space information re-started them) */
@@ -1032,3 +1151,126 @@ HDfprintf(stderr, "%s: Leaving\n", FUNC);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_close() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5MF_sects_cb()
+ *
+ * Purpose: Iterator callback for each free-space section
+ * Retrieve address and size into user data
+ *
+ * Return: Always succeed
+ *
+ * Programmer: Vailin Choi
+ * July 1st, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5MF_sects_cb(const H5FS_section_info_t *_sect, void *_udata)
+{
+ const H5MF_free_section_t *sect = (const H5MF_free_section_t *)_sect;
+ H5MF_sect_iter_ud_t *udata = (H5MF_sect_iter_ud_t *)_udata;
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5MF_sects_cb)
+
+ if(udata->sect_idx < udata->sect_count) {
+ udata->sects[udata->sect_idx].addr = sect->sect_info.addr;
+ udata->sects[udata->sect_idx].size = sect->sect_info.size;
+ udata->sect_idx++;
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* H5MF_sects_cb() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5MF_get_free_sections()
+ *
+ * Purpose: To iterate over one or all free-space managers for:
+ * # of sections
+ * section info as defined in H5F_sect_info_t
+ *
+ * Return: SUCCEED/FAIL
+ *
+ * Programmer: Vailin Choi
+ * July 1st, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+ssize_t
+H5MF_get_free_sections(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type, size_t nsects, H5F_sect_info_t *sect_info)
+{
+ size_t total_sects = 0; /* total number of sections */
+ H5MF_sect_iter_ud_t sect_udata; /* User data for callback */
+ H5FD_mem_t start_type, end_type; /* Memory types to iterate over */
+ H5FD_mem_t ty; /* Memory type for iteration */
+ ssize_t ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5MF_get_free_sections, FAIL)
+
+ /* check args */
+ HDassert(f);
+ HDassert(f->shared);
+ HDassert(f->shared->lf);
+
+ /* Determine start/end points for loop */
+ if(type == H5FD_MEM_DEFAULT) {
+ start_type = H5FD_MEM_SUPER;
+ end_type = H5FD_MEM_NTYPES;
+ } /* end if */
+ else {
+ start_type = end_type = type;
+ H5_INC_ENUM(H5FD_mem_t, end_type);
+ } /* end else */
+
+ /* Set up user data for section iteration */
+ sect_udata.sects = sect_info;
+ sect_udata.sect_count = nsects;
+ sect_udata.sect_idx = 0;
+
+ /* Iterate over memory types, retrieving the number of sections of each type */
+ for(ty = start_type; ty < end_type; H5_INC_ENUM(H5FD_mem_t, ty)) {
+ hbool_t fs_started = FALSE;
+
+ /* Open free space manager of this type, if it isn't already */
+ if(!f->shared->fs_man[ty] && H5F_addr_defined(f->shared->fs_addr[ty])) {
+ if(H5MF_alloc_open(f, dxpl_id, ty) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTOPENOBJ, FAIL, "can't initialize file free space")
+ HDassert(f->shared->fs_man[ty]);
+ fs_started = TRUE;
+ } /* end if */
+
+ /* Check if f there's free space sections of this type */
+ if(f->shared->fs_man[ty]) {
+ hsize_t hnums = 0; /* Total # of sections */
+ size_t nums; /* Total # of sections, cast to a size_t */
+
+ /* Query how many sections of this type */
+ if(H5FS_sect_stats(f->shared->fs_man[ty], NULL, &hnums) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, FAIL, "can't query free space stats")
+ H5_ASSIGN_OVERFLOW(nums, hnums, hsize_t, size_t);
+
+ /* Increment total # of sections */
+ total_sects += nums;
+
+ /* Check if we should retrieve the section info */
+ if(sect_info && nums > 0) {
+ /* Iterate over all the free space sections of this type, adding them to the user's section info */
+ if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[ty], H5MF_sects_cb, &sect_udata) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_BADITER, FAIL, "can't iterate over sections")
+ } /* end if */
+ } /* end if */
+
+ /* Close the free space manager of this type, if we started it here */
+ if(fs_started)
+ if(H5MF_alloc_close(f, dxpl_id, ty) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTCLOSEOBJ, FAIL, "can't close file free space")
+ } /* end for */
+
+ /* Set return value */
+ ret_value = (ssize_t)total_sects;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5MF_get_free_sections() */
+
diff --git a/src/H5MFaggr.c b/src/H5MFaggr.c
index aa982da..db13408 100644
--- a/src/H5MFaggr.c
+++ b/src/H5MFaggr.c
@@ -177,11 +177,11 @@ HDfprintf(stderr, "%s: type = %u, size = %Hu\n", FUNC, (unsigned)type, size);
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTGET, HADDR_UNDEF, "Unable to get eoa")
/*
- * If the aggregation feature is enabled for this file, allocate "generic"
- * space and sub-allocate out of that, if possible. Otherwise just allocate
- * through H5FD_alloc()
+ * If the aggregation feature is enabled for this file and strategy is not H5F_FILE_SPACE_VFD,
+ * allocate "generic" space and sub-allocate out of that, if possible.
+ * Otherwise just allocate through H5FD_alloc().
*/
- if(f->shared->feature_flags & aggr->feature_flag) {
+ if((f->shared->feature_flags & aggr->feature_flag) && f->shared->fs_strategy != H5F_FILE_SPACE_VFD) {
haddr_t aggr_frag_addr = HADDR_UNDEF; /* Address of aggregrator fragment */
hsize_t aggr_frag_size = 0; /* Size of aggregator fragment */
hsize_t alignment; /* Alignment of this section */
diff --git a/src/H5MFdbg.c b/src/H5MFdbg.c
index ca87c83..31cff15 100644
--- a/src/H5MFdbg.c
+++ b/src/H5MFdbg.c
@@ -41,7 +41,6 @@
#include "H5Fpkg.h" /* File access */
#include "H5MFpkg.h" /* File memory management */
-#ifdef H5MF_ALLOC_DEBUG_DUMP
/****************/
/* Local Macros */
@@ -139,6 +138,67 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5MF_sects_debug_cb() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5MF_sects_debug
+ *
+ * Purpose: Iterate over free space sections for a file
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * koziol@hdfgroup.org
+ * January 31 2008
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t fs_addr, FILE *stream, int indent, int fwidth)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t type; /* Memory type for iteration */
+
+ FUNC_ENTER_NOAPI(H5MF_sects_debug, FAIL)
+
+ /*
+ * Check arguments.
+ */
+ HDassert(f);
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
+
+ for(type = H5FD_MEM_DEFAULT; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ if(H5F_addr_eq(f->shared->fs_addr[type], fs_addr)) {
+ if(!f->shared->fs_man[type])
+ if(H5MF_alloc_open(f, dxpl_id, type) < 0)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't initialize file free space")
+
+ if(f->shared->fs_man[type]) {
+ H5MF_debug_iter_ud_t udata; /* User data for callbacks */
+
+ /* Prepare user data for section iteration callback */
+ udata.fspace = f->shared->fs_man[type];
+ udata.stream = stream;
+ udata.indent = indent;
+ udata.fwidth = fwidth;
+
+ /* Iterate over all the free space sections */
+ if(H5FS_sect_iterate(f, dxpl_id, f->shared->fs_man[type], H5MF_sects_debug_cb, &udata) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_BADITER, FAIL, "can't iterate over heap's free space")
+
+ /* Close the free space information */
+ if(H5FS_close(f, dxpl_id, f->shared->fs_man[type]) < 0)
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTRELEASE, FAIL, "can't release free space info")
+ } /* end if */
+ break;
+ }
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5MF_sects_debug() */
+
+#ifdef H5MF_ALLOC_DEBUG_DUMP
/*-------------------------------------------------------------------------
* Function: H5MF_sects_dump
diff --git a/src/H5MFprivate.h b/src/H5MFprivate.h
index 3f2a427..b471aa3 100644
--- a/src/H5MFprivate.h
+++ b/src/H5MFprivate.h
@@ -73,6 +73,8 @@ H5_DLL herr_t H5MF_try_extend(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
haddr_t addr, hsize_t size, hsize_t extra_requested);
H5_DLL htri_t H5MF_try_shrink(H5F_t *f, H5FD_mem_t alloc_type, hid_t dxpl_id,
haddr_t addr, hsize_t size);
+H5_DLL ssize_t H5MF_get_free_sections(H5F_t *f, hid_t dxpl_id, H5FD_mem_t type,
+ size_t nsects, H5F_sect_info_t *sect_info);
/* File 'temporary' space allocation routines */
H5_DLL haddr_t H5MF_alloc_tmp(H5F_t *f, hsize_t size);
@@ -82,10 +84,8 @@ H5_DLL herr_t H5MF_free_aggrs(H5F_t *f, hid_t dxpl_id);
/* Debugging routines */
#ifdef H5MF_DEBUGGING
-#ifdef NOT_YET
H5_DLL herr_t H5MF_sects_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr,
FILE *stream, int indent, int fwidth);
-#endif /* NOT_YET */
#endif /* H5MF_DEBUGGING */
#endif /* end _H5MFprivate_H */
diff --git a/src/H5O.c b/src/H5O.c
index c294d01..24b8fee 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -126,6 +126,7 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = {
H5O_MSG_AINFO, /*0x0015 Attribute information */
H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */
H5O_MSG_UNKNOWN, /*0x0017 Placeholder for unknown message */
+ H5O_MSG_FSINFO, /*0x0018 Free-space manager info message */
};
/* Declare a free list to manage the H5O_t struct */
diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c
new file mode 100644
index 0000000..fb0151f
--- /dev/null
+++ b/src/H5Ofsinfo.c
@@ -0,0 +1,309 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*-------------------------------------------------------------------------
+ *
+ * Created: H5Ofsinfo.c
+ * Feb 2009
+ * Vailin Choi
+ *
+ * Purpose: Free space manager info message.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#define H5O_PACKAGE /* suppress error about including H5Opkg */
+
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5Opkg.h" /* Object headers */
+
+/* PRIVATE PROTOTYPES */
+static void *H5O_fsinfo_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags, const uint8_t *p);
+static herr_t H5O_fsinfo_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void *H5O_fsinfo_copy(const void *_mesg, void *_dest);
+static size_t H5O_fsinfo_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O_fsinfo_free(void *mesg);
+static herr_t H5O_fsinfo_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
+ FILE * stream, int indent, int fwidth);
+
+/* This message derives from H5O message class */
+const H5O_msg_class_t H5O_MSG_FSINFO[1] = {{
+ H5O_FSINFO_ID, /* message id number */
+ "fsinfo", /* message name for debugging */
+ sizeof(H5O_fsinfo_t), /* native message size */
+ 0, /* messages are sharable? */
+ H5O_fsinfo_decode, /* decode message */
+ H5O_fsinfo_encode, /* encode message */
+ H5O_fsinfo_copy, /* copy the native value */
+ H5O_fsinfo_size, /* size of free-space manager info message */
+ NULL, /* default reset method */
+ H5O_fsinfo_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /* set share method */
+ NULL, /* can share method */
+ NULL, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O_fsinfo_debug /* debug the message */
+}};
+
+/* Current version of free-space manager info information */
+#define H5O_FSINFO_VERSION 0
+
+/* Declare a free list to manage the H5O_fsinfo_t struct */
+H5FL_DEFINE_STATIC(H5O_fsinfo_t);
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_fsinfo_decode
+ *
+ * Purpose: Decode a message and return a pointer to a newly allocated one.
+ *
+ * Return: Success: Ptr to new message in native form.
+ * Failure: NULL
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+H5O_fsinfo_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh,
+ unsigned UNUSED mesg_flags, unsigned UNUSED *ioflags, const uint8_t *p)
+{
+ H5O_fsinfo_t *fsinfo = NULL; /* free-space manager info */
+ H5FD_mem_t type; /* Memory type for iteration */
+ void *ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5O_fsinfo_decode)
+
+ /* check args */
+ HDassert(f);
+ HDassert(p);
+
+ /* Version of message */
+ if(*p++ != H5O_FSINFO_VERSION)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for message")
+
+ /* Allocate space for message */
+ if(NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+
+ fsinfo->strategy = *p++; /* file space strategy */
+ H5F_DECODE_LENGTH(f, p, fsinfo->threshold); /* free space section size threshold */
+
+ /* Addresses of free space managers: only exist for H5F_FILE_SPACE_ALL_PERSIST */
+ if(fsinfo->strategy == H5F_FILE_SPACE_ALL_PERSIST) {
+ for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ H5F_addr_decode(f, &p, &(fsinfo->fs_addr[type-1]));
+ } /* end if */
+ else {
+ for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ fsinfo->fs_addr[type-1] = HADDR_UNDEF;
+ } /* end else */
+
+ /* Set return value */
+ ret_value = fsinfo;
+
+done:
+ if(ret_value == NULL && fsinfo != NULL)
+ fsinfo = H5FL_FREE(H5O_fsinfo_t, fsinfo);
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5O_fsinfo_decode() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_fsinfo_encode
+ *
+ * Purpose: Encodes a message.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O_fsinfo_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const void *_mesg)
+{
+ const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
+ H5FD_mem_t type; /* Memory type for iteration */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_encode)
+
+ /* check args */
+ HDassert(f);
+ HDassert(p);
+ HDassert(fsinfo);
+
+ *p++ = H5O_FSINFO_VERSION; /* message version */
+ *p++ = fsinfo->strategy; /* file space strategy */
+ H5F_ENCODE_LENGTH(f, p, fsinfo->threshold); /* free-space section size threshold */
+
+ /* Addresses of free space managers: only exist for H5F_FILE_SPACE_ALL_PERSIST */
+ if(fsinfo->strategy == H5F_FILE_SPACE_ALL_PERSIST) {
+ for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ H5F_addr_encode(f, &p, fsinfo->fs_addr[type-1]);
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5O_fsinfo_encode() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_fsinfo_copy
+ *
+ * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
+ * necessary.
+ *
+ * Return: Success: Ptr to _DEST
+ * Failure: NULL
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static void *
+H5O_fsinfo_copy(const void *_mesg, void *_dest)
+{
+ const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
+ H5O_fsinfo_t *dest = (H5O_fsinfo_t *) _dest;
+ void *ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5O_fsinfo_copy)
+
+ /* check args */
+ HDassert(fsinfo);
+ if(!dest && NULL == (dest = H5FL_CALLOC(H5O_fsinfo_t)))
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+
+ /* copy */
+ *dest = *fsinfo;
+
+ /* Set return value */
+ ret_value = dest;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5O_fsinfo_copy() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_fsinfo_size
+ *
+ * Purpose: Returns the size of the raw message in bytes not counting
+ * the message type or size fields, but only the data fields.
+ * This function doesn't take into account alignment.
+ *
+ * Return: Success: Message data size in bytes without alignment.
+ * Failure: zero
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static size_t
+H5O_fsinfo_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
+{
+ const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg;
+ size_t fs_addr_size = 0;
+ size_t ret_value; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_size)
+
+
+ /* Addresses of free-space managers exist only for H5F_FILE_SPACE_ALL_PERSIST type */
+ if(H5F_FILE_SPACE_ALL_PERSIST == fsinfo->strategy)
+ fs_addr_size = (H5FD_MEM_NTYPES - 1) * H5F_SIZEOF_ADDR(f);
+
+ ret_value = 2 /* Version & strategy */
+ + H5F_SIZEOF_SIZE(f) /* Threshold */
+ + fs_addr_size; /* Addresses of free-space managers */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5O_fsinfo_size() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_fsinfo_free
+ *
+ * Purpose: Free's the message
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O_fsinfo_free(void *mesg)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_free)
+
+ HDassert(mesg);
+
+ (void)H5FL_FREE(H5O_fsinfo_t, mesg);
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5O_fsinfo_free() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5O_fsinfo_debug
+ *
+ * Purpose: Prints debugging info for a message.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; Feb 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O_fsinfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * stream,
+ int indent, int fwidth)
+{
+ const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg;
+ H5FD_mem_t type; /* Memory type for iteration */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fsinfo_debug)
+
+ /* check args */
+ HDassert(f);
+ HDassert(fsinfo);
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
+
+ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth,
+ "File space strategy:", fsinfo->strategy);
+
+ HDfprintf(stream, "%*s%-*s %Hu\n", indent, "", fwidth,
+ "Free space section threshold:", fsinfo->threshold);
+
+ if(fsinfo->strategy == H5F_FILE_SPACE_ALL_PERSIST) {
+ for(type = H5FD_MEM_SUPER; type < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t, type))
+ HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
+ "Free space manager address:", fsinfo->fs_addr[type-1]);
+ } /* end if */
+
+ FUNC_LEAVE_NOAPI(SUCCEED)
+} /* end H5O_fsinfo_debug() */
+
diff --git a/src/H5Opkg.h b/src/H5Opkg.h
index e0a0971..3cae227 100644
--- a/src/H5Opkg.h
+++ b/src/H5Opkg.h
@@ -30,7 +30,7 @@
#define H5O_NMESGS 8 /*initial number of messages */
#define H5O_NCHUNKS 2 /*initial number of chunks */
#define H5O_MIN_SIZE 22 /* Min. obj header data size (must be big enough for a message prefix and a continuation message) */
-#define H5O_MSG_TYPES 24 /* # of types of messages */
+#define H5O_MSG_TYPES 25 /* # of types of messages */
#define H5O_MAX_CRT_ORDER_IDX 65535 /* Max. creation order index value */
/* Versions of object header structure */
@@ -452,6 +452,8 @@ H5_DLLVAR const H5O_msg_class_t H5O_MSG_REFCOUNT[1];
/* Placeholder for unknown message. (0x0017) */
H5_DLLVAR const H5O_msg_class_t H5O_MSG_UNKNOWN[1];
+/* Free-space Manager Info message. (0x0018) */
+H5_DLLVAR const H5O_msg_class_t H5O_MSG_FSINFO[1];
/*
* Object header "object" types
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 74b9754..a47a40d 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -167,6 +167,7 @@ typedef struct H5O_copy_t {
#define H5O_REFCOUNT_ID 0x0016 /* Reference count message. */
#define H5O_UNKNOWN_ID 0x0017 /* Placeholder message ID for unknown message. */
/* (this should never exist in a file) */
+#define H5O_FSINFO_ID 0x0018 /* Free-space manager info message. */
/* Shared object message types.
@@ -551,6 +552,17 @@ typedef uint32_t H5O_refcount_t; /* Contains # of links to object, if >1
*/
typedef unsigned H5O_unknown_t; /* Original message type ID */
+/*
+ * Free space manager info Message.
+ * Contains file space management info and
+ * addresses of free space managers for file memory
+ * (Data structure in memory)
+ */
+typedef struct H5O_fsinfo_t {
+ H5F_file_space_type_t strategy; /* File space strategy */
+ hsize_t threshold; /* Free space section threshold */
+ haddr_t fs_addr[H5FD_MEM_NTYPES-1]; /* Addresses of free space managers */
+} H5O_fsinfo_t;
/* Typedef for "application" iteration operations */
typedef herr_t (*H5O_operator_t)(const void *mesg/*in*/, unsigned idx,
diff --git a/src/H5Pdeprec.c b/src/H5Pdeprec.c
index 208fcb2..5c72247 100644
--- a/src/H5Pdeprec.c
+++ b/src/H5Pdeprec.c
@@ -440,5 +440,59 @@ H5Pinsert1(hid_t plist_id, const char *name, size_t size, void *value,
done:
FUNC_LEAVE_API(ret_value);
} /* H5Pinsert1() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_version
+ *
+ * Purpose: Retrieves version information for various parts of a file.
+ *
+ * SUPER: The file super block.
+ * FREELIST: The global free list.
+ * STAB: The root symbol table entry.
+ * SHHDR: Shared object headers.
+ *
+ * Any (or even all) of the output arguments can be null
+ * pointers.
+ *
+ * Return: Success: Non-negative, version information is returned
+ * through the arguments.
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Wednesday, January 7, 1998
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_version(hid_t plist_id, unsigned *super/*out*/, unsigned *freelist/*out*/,
+ unsigned *stab/*out*/, unsigned *shhdr/*out*/)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(H5Pget_version, FAIL)
+ H5TRACE5("e", "ixxxx", plist_id, super, freelist, stab, shhdr);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_CREATE)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Get values */
+ if(super)
+ if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, super) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get superblock version")
+ if(freelist)
+ *freelist = HDF5_FREESPACE_VERSION; /* (hard-wired) */
+ if(stab)
+ *stab = HDF5_OBJECTDIR_VERSION; /* (hard-wired) */
+ if(shhdr)
+ *shhdr = HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pget_version() */
+
#endif /* H5_NO_DEPRECATED_SYMBOLS */
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 406dbe1..0653c46 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -75,6 +75,11 @@
#define H5F_CRT_SHMSG_LIST_MAX_DEF (50)
#define H5F_CRT_SHMSG_BTREE_MIN_SIZE sizeof(unsigned)
#define H5F_CRT_SHMSG_BTREE_MIN_DEF (40)
+/* Definitions for file space handling strategy */
+#define H5F_CRT_FILE_SPACE_STRATEGY_SIZE sizeof(unsigned)
+#define H5F_CRT_FILE_SPACE_STRATEGY_DEF H5F_FILE_SPACE_STRATEGY_DEF
+#define H5F_CRT_FREE_SPACE_THRESHOLD_SIZE sizeof(hsize_t)
+#define H5F_CRT_FREE_SPACE_THRESHOLD_DEF H5F_FREE_SPACE_THRESHOLD_DEF
/******************/
@@ -150,6 +155,8 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
unsigned sohm_index_minsizes[H5O_SHMESG_MAX_NINDEXES] = H5F_CRT_SHMSG_INDEX_MINSIZE_DEF;
unsigned sohm_list_max = H5F_CRT_SHMSG_LIST_MAX_DEF;
unsigned sohm_btree_min = H5F_CRT_SHMSG_BTREE_MIN_DEF;
+ unsigned file_space_strategy = H5F_CRT_FILE_SPACE_STRATEGY_DEF;
+ hsize_t free_space_threshold = H5F_CRT_FREE_SPACE_THRESHOLD_DEF;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5P_fcrt_reg_prop)
@@ -192,65 +199,19 @@ H5P_fcrt_reg_prop(H5P_genclass_t *pclass)
if(H5P_register(pclass,H5F_CRT_SHMSG_BTREE_MIN_NAME, H5F_CRT_SHMSG_BTREE_MIN_SIZE, &sohm_btree_min,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+ /* Register the file space handling strategy */
+ if(H5P_register(pclass, H5F_CRT_FILE_SPACE_STRATEGY_NAME, H5F_CRT_FILE_SPACE_STRATEGY_SIZE, &file_space_strategy, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the free space section threshold */
+ if(H5P_register(pclass, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, H5F_CRT_FREE_SPACE_THRESHOLD_SIZE, &free_space_threshold, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P_fcrt_reg_prop() */
/*-------------------------------------------------------------------------
- * Function: H5Pget_version
- *
- * Purpose: Retrieves version information for various parts of a file.
- *
- * SUPER: The file super block.
- * FREELIST: The global free list.
- * STAB: The root symbol table entry.
- * SHHDR: Shared object headers.
- *
- * Any (or even all) of the output arguments can be null
- * pointers.
- *
- * Return: Success: Non-negative, version information is returned
- * through the arguments.
- *
- * Failure: Negative
- *
- * Programmer: Robb Matzke
- * Wednesday, January 7, 1998
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Pget_version(hid_t plist_id, unsigned *super/*out*/, unsigned *freelist/*out*/,
- unsigned *stab/*out*/, unsigned *shhdr/*out*/)
-{
- H5P_genplist_t *plist; /* Property list pointer */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(H5Pget_version, FAIL)
- H5TRACE5("e", "ixxxx", plist_id, super, freelist, stab, shhdr);
-
- /* Get the plist structure */
- if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_CREATE)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
-
- /* Get values */
- if(super)
- if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, super) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get superblock version")
- if(freelist)
- *freelist = HDF5_FREESPACE_VERSION; /* (hard-wired) */
- if(stab)
- *stab = HDF5_OBJECTDIR_VERSION; /* (hard-wired) */
- if(shhdr)
- *shhdr = HDF5_SHAREDHEADER_VERSION; /* (hard-wired) */
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Pget_version() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5Pset_userblock
*
* Purpose: Sets the userblock size field of a file creation property
@@ -943,3 +904,88 @@ done:
FUNC_LEAVE_API(ret_value);
} /* end H5Pget_shared_mesg_phase_change() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pset_file_space
+ *
+ * Purpose: Sets the strategy that the library employs in managing file space.
+ * If strategy is zero, the property is not changed; the existing
+ * strategy is retained.
+ * Sets the threshold value that the file's free space
+ * manager(s) will use to track free space sections.
+ * If threshold is zero, the property is not changed; the existing
+ * threshold is retained.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; June 10, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(H5Pset_file_space, FAIL)
+ H5TRACE3("e", "iFfh", plist_id, strategy, threshold);
+
+ if((unsigned)strategy >= H5F_FILE_SPACE_NTYPES)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid strategy")
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_CREATE)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Set value(s), if non-zero */
+ if(strategy)
+ if(H5P_set(plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, &strategy) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set file space strategy")
+ if(threshold)
+ if(H5P_set(plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, &threshold) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set free-space threshold")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Pset_file_space() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_file_space
+ *
+ * Purpose: Retrieves the strategy that the library uses in managing file space.
+ * Retrieves the threshold value that the file's free space
+ * managers use to track free space sections.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Vailin Choi; June 10, 2009
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(H5Pget_file_space, FAIL)
+ H5TRACE3("e", "i*Ff*h", plist_id, strategy, threshold);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id,H5P_FILE_CREATE)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Get value(s) */
+ if(strategy)
+ if(H5P_get(plist, H5F_CRT_FILE_SPACE_STRATEGY_NAME, strategy) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get file space strategy")
+ if(threshold)
+ if(H5P_get(plist, H5F_CRT_FREE_SPACE_THRESHOLD_NAME, threshold) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get free-space threshold")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5Pget_file_space() */
+
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index 495ba42..1e4cf2f 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -208,9 +208,6 @@ H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times);
H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times);
/* File creation property list (FCPL) routines */
-H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot/*out*/,
- unsigned *freelist/*out*/, unsigned *stab/*out*/,
- unsigned *shhdr/*out*/);
H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size);
H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size);
H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr,
@@ -227,6 +224,8 @@ H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsig
H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags, unsigned *min_mesg_size);
H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree);
H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree);
+H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold);
+H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold);
/* File access property list (FAPL) routines */
@@ -422,7 +421,9 @@ H5_DLL H5Z_filter_t H5Pget_filter1(hid_t plist_id, unsigned filter,
H5_DLL herr_t H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id,
unsigned int *flags/*out*/, size_t *cd_nelmts/*out*/,
unsigned cd_values[]/*out*/, size_t namelen, char name[]/*out*/);
-
+H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot/*out*/,
+ unsigned *freelist/*out*/, unsigned *stab/*out*/,
+ unsigned *shhdr/*out*/);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
#ifdef __cplusplus
diff --git a/src/H5SM.c b/src/H5SM.c
index fad639c..cccddc6 100755
--- a/src/H5SM.c
+++ b/src/H5SM.c
@@ -2494,7 +2494,7 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5SM_ih_size(H5F_t *f, hid_t dxpl_id, H5F_info_t *finfo)
+H5SM_ih_size(H5F_t *f, hid_t dxpl_id, hsize_t *hdr_size, H5_ih_info_t *ih_info)
{
H5SM_master_table_t *table = NULL; /* SOHM master table */
H5HF_t *fheap = NULL; /* Fractal heap handle */
@@ -2506,14 +2506,15 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, H5F_info_t *finfo)
/* Sanity check */
HDassert(f);
HDassert(H5F_addr_defined(f->shared->sohm_addr));
- HDassert(finfo);
+ HDassert(hdr_size);
+ HDassert(ih_info);
/* Look up the master SOHM table */
if(NULL == (table = (H5SM_master_table_t *)H5AC_protect(f, dxpl_id, H5AC_SOHM_TABLE, f->shared->sohm_addr, NULL, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTPROTECT, FAIL, "unable to load SOHM master table")
/* Get SOHM header size */
- finfo->sohm.hdr_size = (hsize_t) H5SM_TABLE_SIZE(f) +
+ *hdr_size = (hsize_t) H5SM_TABLE_SIZE(f) +
(hsize_t)(table->num_indexes * H5SM_INDEX_HEADER_SIZE(f));
/* Loop over all the indices for shared messages */
@@ -2521,11 +2522,11 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, H5F_info_t *finfo)
/* Get index storage size (for either B-tree or list) */
if(table->indexes[u].index_type == H5SM_BTREE) {
if(H5F_addr_defined(table->indexes[u].index_addr))
- if(H5B2_iterate_size(f, dxpl_id, H5SM_INDEX, table->indexes[u].index_addr, &(finfo->sohm.msgs_info.index_size)) < 0)
+ if(H5B2_iterate_size(f, dxpl_id, H5SM_INDEX, table->indexes[u].index_addr, &(ih_info->index_size)) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree storage info")
} /* end if */
else if(table->indexes[u].index_type == H5SM_LIST)
- finfo->sohm.msgs_info.index_size += H5SM_LIST_SIZE(f, table->indexes[u].list_max);
+ ih_info->index_size += H5SM_LIST_SIZE(f, table->indexes[u].list_max);
/* Check for heap for this index */
if(H5F_addr_defined(table->indexes[u].heap_addr)) {
@@ -2534,7 +2535,7 @@ H5SM_ih_size(H5F_t *f, hid_t dxpl_id, H5F_info_t *finfo)
HGOTO_ERROR(H5E_HEAP, H5E_CANTOPENOBJ, FAIL, "unable to open fractal heap")
/* Get heap storage size */
- if(H5HF_size(fheap, dxpl_id, &(finfo->sohm.msgs_info.heap_size)) < 0)
+ if(H5HF_size(fheap, dxpl_id, &(ih_info->heap_size)) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "can't retrieve fractal heap storage info")
/* Release the fractal heap */
diff --git a/src/H5SMprivate.h b/src/H5SMprivate.h
index 1465357..46a43ad 100755
--- a/src/H5SMprivate.h
+++ b/src/H5SMprivate.h
@@ -56,7 +56,7 @@ H5_DLL herr_t H5SM_reconstitute(H5O_shared_t *sh_mesg, H5F_t *f,
unsigned msg_type_id, H5O_fheap_id_t heap_id);
H5_DLL herr_t H5SM_get_refcount(H5F_t *f, hid_t dxpl_id, unsigned type_id,
const H5O_shared_t *sh_mesg, hsize_t *ref_count);
-H5_DLL herr_t H5SM_ih_size(H5F_t *f, hid_t dxpl_id, H5F_info_t *bh_info);
+H5_DLL herr_t H5SM_ih_size(H5F_t *f, hid_t dxpl_id, hsize_t *hdr_size, H5_ih_info_t *ih_info);
/* Debugging routines */
diff --git a/src/H5trace.c b/src/H5trace.c
index 5f1e128..87696d3 100644
--- a/src/H5trace.c
+++ b/src/H5trace.c
@@ -658,6 +658,81 @@ H5_trace (const double *returning, const char *func, const char *type, ...)
}
break;
+ case 'f':
+ if(ptr) {
+ if(vp)
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ else
+ fprintf(out, "NULL");
+ } /* end if */
+ else {
+ H5F_file_space_type_t fs_type = va_arg(ap, H5F_file_space_type_t); /*lint !e64 Type mismatch not really occuring */
+
+ switch(fs_type) {
+ case H5F_FILE_SPACE_ALL_DEFAULT:
+ fprintf(out, "H5F_FILE_SPACE_ALL_DEFAULT");
+ break;
+ case H5F_FILE_SPACE_ALL_PERSIST:
+ fprintf(out, "H5F_FILE_SPACE_ALL_PERSIST");
+ break;
+ case H5F_FILE_SPACE_ALL:
+ fprintf(out, "H5F_FILE_SPACE_ALL");
+ break;
+ case H5F_FILE_SPACE_AGGR_VFD:
+ fprintf(out, "H5F_FILE_SPACE_AGGR_VFD");
+ break;
+ case H5F_FILE_SPACE_VFD:
+ fprintf(out, "H5F_FILE_SPACE_VFD");
+ break;
+ default:
+ fprintf(out, "%ld", (long)fs_type);
+ break;
+ } /* end switch */
+ } /* end else */
+ break;
+
+ case 'm':
+ if(ptr) {
+ if(vp)
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ else
+ fprintf(out, "NULL");
+ } /* end if */
+ else {
+ H5F_mem_t mem_type = va_arg(ap, H5F_mem_t); /*lint !e64 Type mismatch not really occuring */
+
+ switch(mem_type) {
+ case H5FD_MEM_NOLIST:
+ fprintf(out, "H5FD_MEM_NOLIST");
+ break;
+ case H5FD_MEM_DEFAULT:
+ fprintf(out, "H5FD_MEM_DEFAULT");
+ break;
+ case H5FD_MEM_SUPER:
+ fprintf(out, "H5FD_MEM_SUPER");
+ break;
+ case H5FD_MEM_BTREE:
+ fprintf(out, "H5FD_MEM_BTREE");
+ break;
+ case H5FD_MEM_DRAW:
+ fprintf(out, "H5FD_MEM_DRAW");
+ break;
+ case H5FD_MEM_GHEAP:
+ fprintf(out, "H5FD_MEM_GHEAP");
+ break;
+ case H5FD_MEM_LHEAP:
+ fprintf(out, "H5FD_MEM_LHEAP");
+ break;
+ case H5FD_MEM_OHDR:
+ fprintf(out, "H5FD_MEM_OHDR");
+ break;
+ default:
+ fprintf(out, "%ld", (long)mem_type);
+ break;
+ } /* end switch */
+ } /* end else */
+ break;
+
case 's':
if(ptr) {
if(vp)
diff --git a/src/H5vers.txt b/src/H5vers.txt
index 18a88d9..89f7bc6 100644
--- a/src/H5vers.txt
+++ b/src/H5vers.txt
@@ -55,6 +55,7 @@ FUNCTION: H5Eprint; ; v10, v18
FUNCTION: H5Epush; ; v14, v18
FUNCTION: H5Eset_auto; ; v10, v18
FUNCTION: H5Ewalk; H5E_walk, H5E_error; v10, v18
+FUNCTION: H5Fget_info; H5F_info; v18, v110
FUNCTION: H5Gcreate; ; v10, v18
FUNCTION: H5Gopen; ; v10, v18
FUNCTION: H5Pget_filter; ; v10, v18
diff --git a/src/H5version.h b/src/H5version.h
index 58de2ab..296768e 100644
--- a/src/H5version.h
+++ b/src/H5version.h
@@ -21,9 +21,9 @@
#define _H5version_H
/* Issue error if contradicting macros have been defined. */
-#if defined(H5_USE_16_API) && defined(H5_NO_DEPRECATED_SYMBOLS)
+#if (defined(H5_USE_16_API) || defined(H5_USE_18_API)) && defined(H5_NO_DEPRECATED_SYMBOLS)
#error "Can't choose old API versions when deprecated APIs are disabled"
-#endif /* defined(H5_USE_16_API) && defined(H5_NO_DEPRECATED_SYMBOLS) */
+#endif /* (defined(H5_USE_16_API) || defined(H5_USE_18_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) */
/* If a particular "global" version of the library's interfaces is chosen,
@@ -36,6 +36,11 @@
#define H5_USE_16_API 1
#endif /* H5_USE_16_API_DEFAULT && !H5_USE_16_API */
+#if defined(H5_USE_18_API_DEFAULT) && !defined(H5_USE_18_API)
+#define H5_USE_18_API 1
+#endif /* H5_USE_18_API_DEFAULT && !H5_USE_18_API */
+
+
#ifdef H5_USE_16_API
/*************/
@@ -140,6 +145,114 @@
#endif /* H5_USE_16_API */
+#ifdef H5_USE_18_API
+
+/*************/
+/* Functions */
+/*************/
+
+#if !defined(H5Acreate_vers)
+#define H5Acreate_vers 2
+#endif /* !defined(H5Acreate_vers) */
+
+#if !defined(H5Aiterate_vers)
+#define H5Aiterate_vers 2
+#endif /* !defined(H5Aiterate_vers) */
+
+#if !defined(H5Dcreate_vers)
+#define H5Dcreate_vers 2
+#endif /* !defined(H5Dcreate_vers) */
+
+#if !defined(H5Dopen_vers)
+#define H5Dopen_vers 2
+#endif /* !defined(H5Dopen_vers) */
+
+#if !defined(H5Eclear_vers)
+#define H5Eclear_vers 2
+#endif /* !defined(H5Eclear_vers) */
+
+#if !defined(H5Eget_auto_vers)
+#define H5Eget_auto_vers 2
+#endif /* !defined(H5Eget_auto_vers) */
+
+#if !defined(H5Eprint_vers)
+#define H5Eprint_vers 2
+#endif /* !defined(H5Eprint_vers) */
+
+#if !defined(H5Epush_vers)
+#define H5Epush_vers 2
+#endif /* !defined(H5Epush_vers) */
+
+#if !defined(H5Eset_auto_vers)
+#define H5Eset_auto_vers 2
+#endif /* !defined(H5Eset_auto_vers) */
+
+#if !defined(H5Ewalk_vers)
+#define H5Ewalk_vers 2
+#endif /* !defined(H5Ewalk_vers) */
+
+#if !defined(H5Fget_info_vers)
+#define H5Fget_info_vers 1
+#endif /* !defined(H5Fget_info_vers) */
+
+#if !defined(H5Gcreate_vers)
+#define H5Gcreate_vers 2
+#endif /* !defined(H5Gcreate_vers) */
+
+#if !defined(H5Gopen_vers)
+#define H5Gopen_vers 2
+#endif /* !defined(H5Gopen_vers) */
+
+#if !defined(H5Pget_filter_vers)
+#define H5Pget_filter_vers 2
+#endif /* !defined(H5Pget_filter_vers) */
+
+#if !defined(H5Pget_filter_by_id_vers)
+#define H5Pget_filter_by_id_vers 2
+#endif /* !defined(H5Pget_filter_by_id_vers) */
+
+#if !defined(H5Pinsert_vers)
+#define H5Pinsert_vers 2
+#endif /* !defined(H5Pinsert_vers) */
+
+#if !defined(H5Pregister_vers)
+#define H5Pregister_vers 2
+#endif /* !defined(H5Pregister_vers) */
+
+#if !defined(H5Rget_obj_type_vers)
+#define H5Rget_obj_type_vers 2
+#endif /* !defined(H5Rget_obj_type_vers) */
+
+#if !defined(H5Tarray_create_vers)
+#define H5Tarray_create_vers 2
+#endif /* !defined(H5Tarray_create_vers) */
+
+#if !defined(H5Tcommit_vers)
+#define H5Tcommit_vers 2
+#endif /* !defined(H5Tcommit_vers) */
+
+#if !defined(H5Tget_array_dims_vers)
+#define H5Tget_array_dims_vers 2
+#endif /* !defined(H5Tget_array_dims_vers) */
+
+#if !defined(H5Topen_vers)
+#define H5Topen_vers 2
+#endif /* !defined(H5Topen_vers) */
+
+/************/
+/* Typedefs */
+/************/
+
+#if !defined(H5E_auto_t_vers)
+#define H5E_auto_t_vers 2
+#endif /* !defined(H5E_auto_t_vers) */
+
+#if !defined(H5Z_class_t_vers)
+#define H5Z_class_t_vers 2
+#endif /* !defined(H5Z_class_t_vers) */
+
+#endif /* H5_USE_18_API */
+
/* Choose the correct version of each API symbol, defaulting to the latest
* version of each. The "best" name for API parameters/data structures
@@ -267,6 +380,19 @@
#error "H5Ewalk_vers set to invalid value"
#endif /* H5Ewalk_vers */
+#if !defined(H5Fget_info_vers) || H5Fget_info_vers == 2
+#ifndef H5Fget_info_vers
+#define H5Fget_info_vers 2
+#endif /* H5Fget_info_vers */
+#define H5Fget_info H5Fget_info2
+#define H5F_info_t H5F_info2_t
+#elif H5Fget_info_vers == 1
+#define H5Fget_info H5Fget_info1
+#define H5F_info_t H5F_info1_t
+#else /* H5Fget_info_vers */
+#error "H5Fget_info_vers set to invalid value"
+#endif /* H5Fget_info_vers */
+
#if !defined(H5Gcreate_vers) || H5Gcreate_vers == 2
#ifndef H5Gcreate_vers
#define H5Gcreate_vers 2
diff --git a/src/Makefile.am b/src/Makefile.am
index eb31afb..a9f82d7 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -53,7 +53,8 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5E.c H5Edeprec.c H5Eint.c \
H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \
H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \
- H5F.c H5Faccum.c H5Fdbg.c H5Ffake.c H5Fio.c H5Fmount.c H5Fmpi.c H5Fquery.c \
+ H5F.c H5Faccum.c H5Fdbg.c H5Fdeprec.c H5Ffake.c H5Fio.c H5Fmount.c \
+ H5Fmpi.c H5Fquery.c \
H5Fsfile.c H5Fsuper.c H5Fsuper_cache.c H5Ftest.c \
H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \
H5FAstat.c H5FAtest.c \
@@ -77,7 +78,7 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5O.c H5Oainfo.c H5Oalloc.c H5Oattr.c \
H5Oattribute.c H5Obogus.c H5Obtreek.c H5Ocache.c \
H5Ocont.c H5Ocopy.c H5Odbg.c H5Odrvinfo.c H5Odtype.c H5Oefl.c \
- H5Ofill.c H5Oginfo.c \
+ H5Ofill.c H5Ofsinfo.c H5Oginfo.c \
H5Olayout.c \
H5Olinfo.c H5Olink.c H5Omessage.c H5Omtime.c \
H5Oname.c H5Onull.c H5Opline.c H5Orefcount.c \
diff --git a/src/Makefile.in b/src/Makefile.in
index ef006a7..d9d05d5 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -106,8 +106,8 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \
H5E.lo H5Edeprec.lo H5Eint.lo H5EA.lo H5EAcache.lo H5EAdbg.lo \
H5EAdblkpage.lo H5EAdblock.lo H5EAhdr.lo H5EAiblock.lo \
H5EAint.lo H5EAsblock.lo H5EAstat.lo H5EAtest.lo H5F.lo \
- H5Faccum.lo H5Fdbg.lo H5Ffake.lo H5Fio.lo H5Fmount.lo \
- H5Fmpi.lo H5Fquery.lo H5Fsfile.lo H5Fsuper.lo \
+ H5Faccum.lo H5Fdbg.lo H5Fdeprec.lo H5Ffake.lo H5Fio.lo \
+ H5Fmount.lo H5Fmpi.lo H5Fquery.lo H5Fsfile.lo H5Fsuper.lo \
H5Fsuper_cache.lo H5Ftest.lo H5FA.lo H5FAcache.lo H5FAdbg.lo \
H5FAdblock.lo H5FAdblkpage.lo H5FAhdr.lo H5FAstat.lo \
H5FAtest.lo H5FD.lo H5FDcore.lo H5FDdirect.lo H5FDfamily.lo \
@@ -127,15 +127,15 @@ am_libhdf5_la_OBJECTS = H5.lo H5checksum.lo H5dbg.lo H5system.lo \
H5MPtest.lo H5O.lo H5Oainfo.lo H5Oalloc.lo H5Oattr.lo \
H5Oattribute.lo H5Obogus.lo H5Obtreek.lo H5Ocache.lo \
H5Ocont.lo H5Ocopy.lo H5Odbg.lo H5Odrvinfo.lo H5Odtype.lo \
- H5Oefl.lo H5Ofill.lo H5Oginfo.lo H5Olayout.lo H5Olinfo.lo \
- H5Olink.lo H5Omessage.lo H5Omtime.lo H5Oname.lo H5Onull.lo \
- H5Opline.lo H5Orefcount.lo H5Osdspace.lo H5Oshared.lo \
- H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo H5P.lo \
- H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo H5Pdxpl.lo \
- H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo H5Pint.lo \
- H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo H5Pstrcpl.lo \
- H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo H5S.lo \
- H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \
+ H5Oefl.lo H5Ofill.lo H5Ofsinfo.lo H5Oginfo.lo H5Olayout.lo \
+ H5Olinfo.lo H5Olink.lo H5Omessage.lo H5Omtime.lo H5Oname.lo \
+ H5Onull.lo H5Opline.lo H5Orefcount.lo H5Osdspace.lo \
+ H5Oshared.lo H5Ostab.lo H5Oshmesg.lo H5Otest.lo H5Ounknown.lo \
+ H5P.lo H5Pacpl.lo H5Pdapl.lo H5Pdcpl.lo H5Pdeprec.lo \
+ H5Pdxpl.lo H5Pfapl.lo H5Pfcpl.lo H5Pfmpl.lo H5Pgcpl.lo \
+ H5Pint.lo H5Plapl.lo H5Plcpl.lo H5Pocpl.lo H5Pocpypl.lo \
+ H5Pstrcpl.lo H5Ptest.lo H5R.lo H5Rdeprec.lo H5RC.lo H5RS.lo \
+ H5S.lo H5Sall.lo H5Sdbg.lo H5Shyper.lo H5Smpio.lo H5Snone.lo \
H5Spoint.lo H5Sselect.lo H5Stest.lo H5SL.lo H5SM.lo \
H5SMbtree2.lo H5SMcache.lo H5SMtest.lo H5ST.lo H5T.lo \
H5Tarray.lo H5Tbit.lo H5Tcommit.lo H5Tcompound.lo H5Tconv.lo \
@@ -460,7 +460,8 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5E.c H5Edeprec.c H5Eint.c \
H5EA.c H5EAcache.c H5EAdbg.c H5EAdblkpage.c H5EAdblock.c H5EAhdr.c \
H5EAiblock.c H5EAint.c H5EAsblock.c H5EAstat.c H5EAtest.c \
- H5F.c H5Faccum.c H5Fdbg.c H5Ffake.c H5Fio.c H5Fmount.c H5Fmpi.c H5Fquery.c \
+ H5F.c H5Faccum.c H5Fdbg.c H5Fdeprec.c H5Ffake.c H5Fio.c H5Fmount.c \
+ H5Fmpi.c H5Fquery.c \
H5Fsfile.c H5Fsuper.c H5Fsuper_cache.c H5Ftest.c \
H5FA.c H5FAcache.c H5FAdbg.c H5FAdblock.c H5FAdblkpage.c H5FAhdr.c \
H5FAstat.c H5FAtest.c \
@@ -484,7 +485,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
H5O.c H5Oainfo.c H5Oalloc.c H5Oattr.c \
H5Oattribute.c H5Obogus.c H5Obtreek.c H5Ocache.c \
H5Ocont.c H5Ocopy.c H5Odbg.c H5Odrvinfo.c H5Odtype.c H5Oefl.c \
- H5Ofill.c H5Oginfo.c \
+ H5Ofill.c H5Ofsinfo.c H5Oginfo.c \
H5Olayout.c \
H5Olinfo.c H5Olink.c H5Omessage.c H5Omtime.c \
H5Oname.c H5Onull.c H5Opline.c H5Orefcount.c \
@@ -730,6 +731,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5FStest.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Faccum.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fdbg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fdeprec.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ffake.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Fmount.Plo@am__quote@
@@ -805,6 +807,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Odtype.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oefl.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ofill.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Ofsinfo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Oginfo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Olayout.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/H5Olinfo.Plo@am__quote@