summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-05-15 02:04:33 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-05-15 02:04:33 (GMT)
commit8fd9d6b53f44b12204ea2bcd34eeedd3f3d54603 (patch)
treee9f266734cca431782f6267a8322df6530aa24dc /src
parentcd1620238c73d616c8ec3c773337e7733b47d3f2 (diff)
downloadhdf5-8fd9d6b53f44b12204ea2bcd34eeedd3f3d54603.zip
hdf5-8fd9d6b53f44b12204ea2bcd34eeedd3f3d54603.tar.gz
hdf5-8fd9d6b53f44b12204ea2bcd34eeedd3f3d54603.tar.bz2
[svn-r27078] Description:
Clean up H5FS interface, to align w/v3 metadata cache changes Tested on: MacOSX/64 10.10.3 (amazon) w/serial & parallel Linux/32 2.6.* (jam) w/serial & parallel
Diffstat (limited to 'src')
-rw-r--r--src/H5FS.c24
-rw-r--r--src/H5FScache.c14
-rw-r--r--src/H5FSpkg.h4
3 files changed, 20 insertions, 22 deletions
diff --git a/src/H5FS.c b/src/H5FS.c
index 9dcf081..67ec838 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -123,7 +123,7 @@ HDfprintf(stderr, "%s: Creating free space manager, nclasses = %Zu\n", FUNC, ncl
/*
* Allocate free space structure
*/
- if(NULL == (fspace = H5FS_new(f, nclasses, classes, cls_init_udata)))
+ if(NULL == (fspace = H5FS__new(f, nclasses, classes, cls_init_udata)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for free space free list")
/* Initialize creation information for free space manager */
@@ -161,7 +161,7 @@ HDfprintf(stderr, "%s: fspace = %p, fspace->addr = %a\n", FUNC, fspace, fspace->
done:
if(!ret_value && fspace)
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
#ifdef H5FS_DEBUG
@@ -573,7 +573,7 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_va
/*-------------------------------------------------------------------------
- * Function: H5FS_new
+ * Function: H5FS__new
*
* Purpose: Create new free space manager structure
*
@@ -586,14 +586,14 @@ HDfprintf(stderr, "%s: Leaving, ret_value = %d, fspace->rc = %u\n", FUNC, ret_va
*-------------------------------------------------------------------------
*/
H5FS_t *
-H5FS_new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes[],
+H5FS__new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes[],
void *cls_init_udata)
{
H5FS_t *fspace = NULL; /* Free space manager */
size_t u; /* Local index variable */
H5FS_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Check arguments. */
HDassert(nclasses == 0 || (nclasses > 0 && classes));
@@ -631,7 +631,7 @@ H5FS_new(const H5F_t *f, uint16_t nclasses, const H5FS_section_class_t *classes[
/* Initialize non-zero information for new free space manager */
fspace->addr = HADDR_UNDEF;
- fspace->hdr_size = H5FS_HEADER_SIZE(f);
+ fspace->hdr_size = (size_t)H5FS_HEADER_SIZE(f);
fspace->sect_addr = HADDR_UNDEF;
/* Set return value */
@@ -649,7 +649,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5FS_new() */
+} /* H5FS__new() */
/*-------------------------------------------------------------------------
@@ -763,7 +763,7 @@ HDfprintf(stderr, "%s: Entering, fpace->addr = %a, fspace->rc = %u\n", FUNC, fsp
HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPIN, FAIL, "unable to unpin free space header")
} /* end if */
else {
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCLOSEOBJ, FAIL, "unable to destroy free space header")
} /* end else */
} /* end if */
@@ -1005,7 +1005,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5FS_hdr_dest
+ * Function: H5FS__hdr_dest
*
* Purpose: Destroys a free space header in memory.
*
@@ -1018,12 +1018,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5FS_hdr_dest(H5FS_t *fspace)
+H5FS__hdr_dest(H5FS_t *fspace)
{
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/*
* Check arguments.
@@ -1047,7 +1047,7 @@ H5FS_hdr_dest(H5FS_t *fspace)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5FS_hdr_dest() */
+} /* end H5FS__hdr_dest() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 306a3fd..5ab788e 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -38,7 +38,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FSpkg.h" /* File free space */
#include "H5MFprivate.h" /* File memory management */
-#include "H5VMprivate.h" /* Vectors and arrays */
+#include "H5VMprivate.h" /* Vectors and arrays */
#include "H5WBprivate.h" /* Wrapped Buffers */
/****************/
@@ -167,7 +167,7 @@ H5FS_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
HDassert(udata);
/* Allocate a new free space manager */
- if(NULL == (fspace = H5FS_new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
+ if(NULL == (fspace = H5FS__new(udata->f, udata->nclasses, udata->classes, udata->cls_init_udata)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Set free space manager's internal information */
@@ -260,7 +260,7 @@ done:
if(wb && H5WB_unwrap(wb) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CLOSEERROR, NULL, "can't close wrapped buffer")
if(!ret_value && fspace)
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HDONE_ERROR(H5E_FSPACE, H5E_CANTFREE, NULL, "unable to destroy free space header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -463,7 +463,7 @@ H5FS_cache_hdr_dest(H5F_t *f, H5FS_t *fspace)
} /* end if */
/* Destroy free space header */
- if(H5FS_hdr_dest(fspace) < 0)
+ if(H5FS__hdr_dest(fspace) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_CANTFREE, FAIL, "unable to destroy free space header")
done:
@@ -865,14 +865,12 @@ H5FS_cache_sinfo_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H
udata.sect_cnt_size = H5VM_limit_enc_size((uint64_t)sinfo->fspace->serial_sect_count);
/* Iterate over all the bins */
- for(bin = 0; bin < sinfo->nbins; bin++) {
+ for(bin = 0; bin < sinfo->nbins; bin++)
/* Check if there are any sections in this bin */
- if(sinfo->bins[bin].bin_list) {
+ if(sinfo->bins[bin].bin_list)
/* Iterate over list of section size nodes for bin */
if(H5SL_iterate(sinfo->bins[bin].bin_list, H5FS_sinfo_serialize_node_cb, &udata) < 0)
HGOTO_ERROR(H5E_FSPACE, H5E_BADITER, FAIL, "can't iterate over section size nodes")
- } /* end if */
- } /* end for */
/* Compute checksum */
metadata_chksum = H5_checksum_metadata(buf, (size_t)(p - buf), 0);
diff --git a/src/H5FSpkg.h b/src/H5FSpkg.h
index b6c240e..78afde8 100644
--- a/src/H5FSpkg.h
+++ b/src/H5FSpkg.h
@@ -221,7 +221,7 @@ H5FL_EXTERN(H5FS_t);
/******************************/
/* Free space manager header routines */
-H5_DLL H5FS_t *H5FS_new(const H5F_t *f, uint16_t nclasses,
+H5_DLL H5FS_t *H5FS__new(const H5F_t *f, uint16_t nclasses,
const H5FS_section_class_t *classes[], void *cls_init_udata);
H5_DLL herr_t H5FS_incr(H5FS_t *fspace);
H5_DLL herr_t H5FS_decr(H5FS_t *fspace);
@@ -231,7 +231,7 @@ H5_DLL herr_t H5FS_dirty(H5FS_t *fspace);
H5_DLL H5FS_sinfo_t *H5FS_sinfo_new(H5F_t *f, H5FS_t *fspace);
/* Routines for destroying structures */
-H5_DLL herr_t H5FS_hdr_dest(H5FS_t *hdr);
+H5_DLL herr_t H5FS__hdr_dest(H5FS_t *hdr);
H5_DLL herr_t H5FS_sinfo_dest(H5FS_sinfo_t *sinfo);
/* Sanity check routines */