Clean up private / package / static namespace issues (function naming, which

header file, FUNC_ENTER / LEAVE, etc).  Removed remaining personal email
addresses from library source code (still needs cleaned from other directories).
Misc. warning, style, and whitespace cleanup.
This commit is contained in:
Quincey Koziol 2020-08-06 15:56:04 -05:00
parent 302dfeb11b
commit 07e4ef9da4
362 changed files with 6699 additions and 10258 deletions

View File

@ -692,6 +692,7 @@
./src/H5FDlog.h
./src/H5FDmirror.c
./src/H5FDmirror.h
./src/H5FDmirror_priv.h
./src/H5FDmodule.h
./src/H5FDmpi.c
./src/H5FDmpi.h

View File

@ -839,6 +839,7 @@ set (H5_PRIVATE_HEADERS
${HDF5_SRC_DIR}/H5FApkg.h
${HDF5_SRC_DIR}/H5FAprivate.h
${HDF5_SRC_DIR}/H5FDmirror_priv.h
${HDF5_SRC_DIR}/H5FDpkg.h
${HDF5_SRC_DIR}/H5FDprivate.h

View File

@ -50,9 +50,9 @@
/********************/
/* Local Prototypes */
/********************/
static void H5_debug_mask(const char*);
static void H5__debug_mask(const char*);
#ifdef H5_HAVE_PARALLEL
static int H5_mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag);
static int H5__mpi_delete_cb(MPI_Comm comm, int keyval, void *attr_val, int *flag);
#endif /*H5_HAVE_PARALLEL*/
/*********************/
@ -139,7 +139,7 @@ H5_init_library(void)
int key_val;
if(MPI_SUCCESS != (mpi_code = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN,
(MPI_Comm_delete_attr_function *)H5_mpi_delete_cb,
(MPI_Comm_delete_attr_function *)H5__mpi_delete_cb,
&key_val, NULL)))
HMPI_GOTO_ERROR(FAIL, "MPI_Comm_create_keyval failed", mpi_code)
@ -219,10 +219,6 @@ H5_init_library(void)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize vol interface")
if(H5P_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize property list interface")
if(H5T_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize datatype interface")
if(H5D_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize dataset interface")
if(H5AC_init() < 0)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize metadata caching interface")
if(H5L_init() < 0)
@ -235,8 +231,8 @@ H5_init_library(void)
HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize vol interface")
/* Debugging? */
H5_debug_mask("-all");
H5_debug_mask(HDgetenv("HDF5_DEBUG"));
H5__debug_mask("-all");
H5__debug_mask(HDgetenv("HDF5_DEBUG"));
done:
FUNC_LEAVE_NOAPI(ret_value)
@ -639,7 +635,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5_debug_mask
* Function: H5__debug_mask
*
* Purpose: Set runtime debugging flags according to the string S. The
* string should contain file numbers and package names
@ -662,7 +658,7 @@ done:
*-------------------------------------------------------------------------
*/
static void
H5_debug_mask(const char *s)
H5__debug_mask(const char *s)
{
FILE *stream = stderr;
char pkg_name[32], *rest;
@ -738,12 +734,12 @@ H5_debug_mask(const char *s)
return;
} /* end H5_debug_mask() */
} /* end H5__debug_mask() */
#ifdef H5_HAVE_PARALLEL
/*-------------------------------------------------------------------------
* Function: H5_mpi_delete_cb
* Function: H5__mpi_delete_cb
*
* Purpose: Callback attribute on MPI_COMM_SELF to terminate the HDF5
* library when the communicator is destroyed, i.e. on MPI_Finalize.
@ -752,7 +748,7 @@ H5_debug_mask(const char *s)
*
*-------------------------------------------------------------------------
*/
static int H5_mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val, int H5_ATTR_UNUSED *flag)
static int H5__mpi_delete_cb(MPI_Comm H5_ATTR_UNUSED comm, int H5_ATTR_UNUSED keyval, void H5_ATTR_UNUSED *attr_val, int H5_ATTR_UNUSED *flag)
{
H5_term_library();
return MPI_SUCCESS;

View File

@ -15,7 +15,7 @@
*
* Created: H5AC.c
* Jul 9 1997
* Robb Matzke <matzke@llnl.gov>
* Robb Matzke
*
* Purpose: Functions in this file implement a cache for
* things which exist on disk. All "things" associated
@ -239,8 +239,6 @@ H5AC_term_package(void)
*
* Programmer: John Mainzer, 1/10/17
*
* Changes: None.
*
*-------------------------------------------------------------------------
*/
hbool_t
@ -275,7 +273,6 @@ H5AC_cache_image_pending(const H5F_t *f)
* Failure: Negative
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@ -469,7 +466,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@ -587,7 +583,6 @@ H5AC_evict(H5F_t *f)
HGOTO_ERROR(H5E_CACHE, H5E_CANTFREE, FAIL, "can't evict cache")
done:
/* If currently logging, generate a message */
if(f->shared->cache->log_info->logging)
if(H5C_log_write_evict_cache_msg(f->shared->cache, ret_value) < 0)
@ -655,7 +650,6 @@ done:
* request to flush all items and something was protected.
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@ -775,7 +769,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@ -1075,7 +1068,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@ -1271,7 +1263,6 @@ done:
* Failure: NULL
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Sep 2 1997
*
*-------------------------------------------------------------------------
@ -1509,7 +1500,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Sep 2 1997
*
*-------------------------------------------------------------------------
@ -1536,8 +1526,8 @@ H5AC_unprotect(H5F_t *f, const H5AC_class_t *type, haddr_t addr, void *thing,
HDassert(type->image_len);
HDassert(H5F_addr_defined(addr));
HDassert(thing);
HDassert( ((H5AC_info_t *)thing)->addr == addr );
HDassert( ((H5AC_info_t *)thing)->type == type );
HDassert(((H5AC_info_t *)thing)->addr == addr);
HDassert(((H5AC_info_t *)thing)->type == type);
dirtied = (hbool_t)(((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG) ||
(((H5AC_info_t *)thing)->dirtied));

View File

@ -270,10 +270,6 @@ H5AC_flush_dependency_exists(H5F_t *f, haddr_t parent_addr, haddr_t child_addr,
*
* Programmer: John Mainzer, 5/30/14
*
* Changes: None.
*
* JRM -- 9/17/16
*
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG
@ -351,8 +347,6 @@ H5AC_get_serialization_in_progress(H5F_t *f)
*
* Programmer: John Mainzer, 6/18/16
*
* Changes: None.
*
*-------------------------------------------------------------------------
*/
#ifndef NDEBUG

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -15,7 +15,7 @@
*
* Created: H5ACmpio.c
* Jun 20 2015
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Functions in this file implement support for parallel
* I/O cache functionality
@ -2284,7 +2284,6 @@ H5AC__tidy_cache_0_lists(H5AC_t *cache_ptr, unsigned num_candidates,
* request to flush all items and something was protected.
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 22 2009
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5ACprivate.h
* Jul 9 1997
* Robb Matzke <matzke@llnl.gov>
* Robb Matzke
*
* Purpose: Constants and typedefs available to the rest of the
* library.

View File

@ -15,12 +15,10 @@
*
* Created: H5ACpublic.h
* Jul 10 1997
* Robb Matzke <matzke@llnl.gov>
* Robb Matzke
*
* Purpose: Public include file for cache functions.
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
#ifndef _H5ACpublic_H

View File

@ -15,7 +15,7 @@
*
* Created: H5Abtree2.c
* Dec 4 2006
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: v2 B-tree callbacks for indexing attributes on objects
*
@ -152,7 +152,6 @@ const H5B2_class_t H5A_BT2_CORDER[1]={{ /* B-tree class information */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Dec 4 2006
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5Adense.c
* Dec 4 2006
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Routines for operating on "dense" attribute storage
* for an object.
@ -209,9 +209,6 @@ H5A__dense_create(H5F_t *f, H5O_ainfo_t *ainfo)
/* Retrieve the heap's address in the file */
if(H5HF_get_heap_addr(fheap, &ainfo->fheap_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap address")
#ifdef QAK
HDfprintf(stderr, "%s: ainfo->fheap_addr = %a\n", FUNC, ainfo->fheap_addr);
#endif /* QAK */
#ifndef NDEBUG
{
@ -221,9 +218,6 @@ HDfprintf(stderr, "%s: ainfo->fheap_addr = %a\n", FUNC, ainfo->fheap_addr);
if(H5HF_get_id_len(fheap, &fheap_id_len) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGETSIZE, FAIL, "can't get fractal heap ID length")
HDassert(fheap_id_len == H5O_FHEAP_ID_LEN);
#ifdef QAK
HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
#endif /* QAK */
}
#endif /* NDEBUG */
@ -243,9 +237,6 @@ HDfprintf(stderr, "%s: fheap_id_len = %Zu\n", FUNC, fheap_id_len);
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_name, &ainfo->name_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for name index")
#ifdef QAK
HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr);
#endif /* QAK */
/* Check if we should create a creation order index v2 B-tree */
if(ainfo->index_corder) {
@ -264,9 +255,6 @@ HDfprintf(stderr, "%s: ainfo->name_bt2_addr = %a\n", FUNC, ainfo->name_bt2_addr)
/* Retrieve the v2 B-tree's address in the file */
if(H5B2_get_addr(bt2_corder, &ainfo->corder_bt2_addr) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't get v2 B-tree address for creation order index")
#ifdef QAK
HDfprintf(stderr, "%s: ainfo->corder_bt2_addr = %a\n", FUNC, ainfo->corder_bt2_addr);
#endif /* QAK */
} /* end if */
done:

View File

@ -15,7 +15,7 @@
*
* Created: H5Adeprec.c
* November 27 2006
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Deprecated functions from the H5A interface. These
* functions are here for compatibility purposes and may be

View File

@ -14,8 +14,8 @@
/*-------------------------------------------------------------------------
*
* Created: H5Aint.c
* Dec 18 2006
* Quincey Koziol <koziol@hdfgroup.org>
* Dec 18 2006
* Quincey Koziol
*
* Purpose: Internal routines for managing attributes.
*
@ -2416,7 +2416,6 @@ done:
* Failure: Negative
*
* Programmer: Peter Cao
* xcao@hdfgroup.org
* July 20, 2007
*
*-------------------------------------------------------------------------

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -263,9 +263,6 @@ H5_DLL herr_t H5O__attr_remove(const H5O_loc_t *loc, const char *name);
H5_DLL herr_t H5O__attr_remove_by_idx(const H5O_loc_t *loc, H5_index_t idx_type,
H5_iter_order_t order, hsize_t n);
H5_DLL htri_t H5O__attr_exists(const H5O_loc_t *loc, const char *name);
#ifndef H5_NO_DEPRECATED_SYMBOLS
H5_DLL int H5O__attr_count(const H5O_loc_t *loc);
#endif /* H5_NO_DEPRECATED_SYMBOLS */
H5_DLL H5A_t *H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size,
H5O_copy_t *cpy_info);
H5_DLL herr_t H5A__attr_post_copy_file(const H5O_loc_t *src_oloc, const H5A_t *mesg_src,

View File

@ -15,7 +15,7 @@
*
* Created: H5B.c
* Jul 10 1997
* Robb Matzke <matzke@llnl.gov>
* Robb Matzke
*
* Purpose: Implements balanced, sibling-linked, N-ary trees
* capable of storing any type of data with unique key
@ -206,7 +206,6 @@ H5FL_SEQ_DEFINE_STATIC(size_t);
* Failure: Negative
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@ -291,7 +290,6 @@ done:
* UDATA is undefined).
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@ -387,7 +385,6 @@ done:
* returned through the NEW_ADDR argument). Negative on failure.
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 3 1997
*
*-------------------------------------------------------------------------
@ -542,7 +539,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@ -700,7 +696,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 8 1997
*
*-------------------------------------------------------------------------
@ -789,7 +784,6 @@ H5B__insert_child(H5B_t *bt, unsigned *bt_flags, unsigned idx,
* Failure: H5B_INS_ERROR
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jul 9 1997
*
*-------------------------------------------------------------------------
@ -1118,7 +1112,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@ -1185,7 +1178,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* matzke@llnl.gov
* Jun 23 1997
*
*-------------------------------------------------------------------------
@ -1679,7 +1671,6 @@ done:
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 27 2008
*
*-------------------------------------------------------------------------
@ -1786,7 +1777,6 @@ H5B_shared_free(void *_shared)
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Apr 18 2000
*
*-------------------------------------------------------------------------
@ -1852,7 +1842,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Jun 3 2008
*
*-------------------------------------------------------------------------
@ -2066,7 +2055,6 @@ done:
* Failure: FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 26, 2008
*
*-------------------------------------------------------------------------

View File

@ -1497,9 +1497,6 @@ H5B2_delete(H5F_t *f, haddr_t addr, void *ctx_udata, H5B2_remove_t op,
HDassert(H5F_addr_defined(addr));
/* Lock the v2 B-tree header into memory */
#ifdef QAK
HDfprintf(stderr, "%s: addr = %a\n", FUNC, addr);
#endif /* QAK */
if(NULL == (hdr = H5B2__hdr_protect(f, addr, ctx_udata, H5AC__NO_FLAGS_SET)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect v2 B-tree header")

View File

@ -15,7 +15,7 @@
*
* Created: H5B2cache.c
* Jan 31 2005
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Implement v2 B-tree metadata cache methods.
*
@ -171,7 +171,6 @@ const H5AC_class_t H5AC_BT2_LEAF[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@ -240,7 +239,6 @@ H5B2__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 1 2005
*
*-------------------------------------------------------------------------
@ -339,7 +337,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@ -370,7 +367,6 @@ H5B2__cache_hdr_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 1 2005
*
*-------------------------------------------------------------------------
@ -442,7 +438,6 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
* nfortne2@hdfgroup.org
* Apr 24 2012
*
*-------------------------------------------------------------------------
@ -530,7 +525,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Mike McGreevy
* mcgreevy@hdfgroup.org
* June 18, 2008
*
*-------------------------------------------------------------------------
@ -562,7 +556,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@ -637,7 +630,6 @@ H5B2__cache_int_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, voi
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -756,7 +748,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@ -788,7 +779,6 @@ H5B2__cache_int_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@ -875,7 +865,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
* nfortne2@hdfgroup.org
* Apr 25 2012
*
*-------------------------------------------------------------------------
@ -886,7 +875,7 @@ H5B2__cache_int_notify(H5AC_notify_action_t action, void *_thing)
H5B2_internal_t *internal = (H5B2_internal_t *)_thing;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/*
* Check arguments.
@ -952,7 +941,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Mike McGreevy
* mcgreevy@hdfgroup.org
* June 18, 2008
*
*-------------------------------------------------------------------------
@ -985,7 +973,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@ -1060,7 +1047,6 @@ H5B2__cache_leaf_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -1159,7 +1145,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@ -1191,7 +1176,6 @@ H5B2__cache_leaf_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -1264,7 +1248,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Neil Fortner
* nfortne2@hdfgroup.org
* Apr 25 2012
*
*-------------------------------------------------------------------------
@ -1275,7 +1258,7 @@ H5B2__cache_leaf_notify(H5AC_notify_action_t action, void *_thing)
H5B2_leaf_t *leaf = (H5B2_leaf_t *)_thing;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/*
* Check arguments.
@ -1341,7 +1324,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Mike McGreevy
* mcgreevy@hdfgroup.org
* June 18, 2008
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5B2dbg.c
* Feb 2 2005
* Quincey Koziol <koziol@ncsa.uiuc.edu>
* Quincey Koziol
*
* Purpose: Dump debugging information about a v2 B-tree.
*
@ -80,7 +80,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -175,7 +174,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 4 2005
*
*-------------------------------------------------------------------------
@ -287,7 +285,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 7 2005
*
*-------------------------------------------------------------------------

View File

@ -174,7 +174,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
/* Compute size to store # of records in each node */
/* (uses leaf # of records because its the largest) */
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[0].max_nrec);
u_max_nrec_size = H5VM__limit_enc_size((uint64_t)hdr->node_info[0].max_nrec);
H5_CHECKED_ASSIGN(hdr->max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
HDassert(hdr->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE);
@ -190,7 +190,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata,
hdr->node_info[u].cum_max_nrec = ((hdr->node_info[u].max_nrec + 1) *
hdr->node_info[u - 1].cum_max_nrec) + hdr->node_info[u].max_nrec;
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[u].cum_max_nrec);
u_max_nrec_size = H5VM__limit_enc_size((uint64_t)hdr->node_info[u].cum_max_nrec);
H5_CHECKED_ASSIGN(hdr->node_info[u].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
if(NULL == (hdr->node_info[u].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[u].max_nrec)))
@ -573,7 +573,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Dec 18 2015
*
*-------------------------------------------------------------------------
@ -605,7 +604,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -682,7 +680,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Oct 15 2009
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5B2int.c
* Feb 27 2006
* Quincey Koziol <koziol@ncsa.uiuc.edu>
* Quincey Koziol
*
* Purpose: Internal routines for managing v2 B-trees.
*
@ -97,7 +97,6 @@ H5FL_SEQ_EXTERN(H5B2_node_info_t);
* record to locate is greater than all records to search).
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@ -141,7 +140,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 28 2006
*
*-------------------------------------------------------------------------
@ -336,7 +334,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@ -370,7 +367,7 @@ H5B2__split_root(H5B2_hdr_t *hdr)
hdr->node_info[hdr->depth].merge_nrec = (hdr->node_info[hdr->depth].max_nrec * hdr->merge_percent) / 100;
hdr->node_info[hdr->depth].cum_max_nrec = ((hdr->node_info[hdr->depth].max_nrec + 1) *
hdr->node_info[hdr->depth - 1].cum_max_nrec) + hdr->node_info[hdr->depth].max_nrec;
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[hdr->depth].cum_max_nrec);
u_max_nrec_size = H5VM__limit_enc_size((uint64_t)hdr->node_info[hdr->depth].cum_max_nrec);
H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
if(NULL == (hdr->node_info[hdr->depth].nat_rec_fac = H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[hdr->depth].max_nrec)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory")
@ -414,7 +411,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 9 2005
*
*-------------------------------------------------------------------------
@ -658,7 +654,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 9 2005
*
*-------------------------------------------------------------------------
@ -1032,7 +1027,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
@ -1195,7 +1189,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
@ -1437,7 +1430,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Dec 23 2015
*
*-------------------------------------------------------------------------
@ -1497,7 +1489,6 @@ done:
* Return: Value from callback, non-negative on success, negative on error
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 11 2005
*
*-------------------------------------------------------------------------
@ -1612,7 +1603,6 @@ done:
* Return: Value from callback, non-negative on success, negative on error
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
@ -1779,7 +1769,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@lbl.gov
* Dec 1 2016
*
*-------------------------------------------------------------------------
@ -1877,7 +1866,6 @@ done:
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@lbl.gov
* Dec 1 2016
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5B2internal.c
* Dec 01 2016
* Quincey Koziol <koziol@lbl.gov>
* Quincey Koziol
*
* Purpose: Routines for managing v2 B-tree internal ndoes.
*
@ -87,7 +87,6 @@ H5FL_DEFINE(H5B2_internal_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 3 2005
*
*-------------------------------------------------------------------------
@ -183,7 +182,6 @@ done:
* Return: Pointer to internal node on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 25 2006
*
*-------------------------------------------------------------------------
@ -277,7 +275,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
@ -350,7 +347,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 2 2005
*
*-------------------------------------------------------------------------
@ -513,7 +509,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Dec 24 2015
*
*-------------------------------------------------------------------------
@ -782,7 +777,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
@ -1015,7 +1009,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
@ -1300,7 +1293,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -1349,7 +1341,6 @@ done:
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
@ -1390,7 +1381,6 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_NDEBUG_U
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5B2leaf.c
* Dec 01 2016
* Quincey Koziol <koziol@lbl.gov>
* Quincey Koziol
*
* Purpose: Routines for managing v2 B-tree leaf ndoes.
*
@ -88,7 +88,6 @@ H5FL_DEFINE(H5B2_leaf_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -174,7 +173,6 @@ done:
* Return: Pointer to leaf node on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 5 2010
*
*-------------------------------------------------------------------------
@ -266,7 +264,6 @@ done:
* Return: Non-negative on success, negative on failure.
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 9 2005
*
*-------------------------------------------------------------------------
@ -340,7 +337,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
@ -453,7 +449,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Dec 23 2015
*
*-------------------------------------------------------------------------
@ -608,7 +603,6 @@ done:
* Failure: Negative
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 4 2005
*
*-------------------------------------------------------------------------
@ -765,14 +759,14 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Mar 3 2005
*
*-------------------------------------------------------------------------
*/
herr_t
H5B2__remove_leaf(H5B2_hdr_t *hdr, H5B2_node_ptr_t *curr_node_ptr,
H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op, void *op_data)
H5B2_nodepos_t curr_pos, void *parent, void *udata, H5B2_remove_t op,
void *op_data)
{
H5B2_leaf_t *leaf; /* Pointer to leaf node */
haddr_t leaf_addr = HADDR_UNDEF; /* Leaf address on disk */
@ -874,7 +868,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Nov 14 2006
*
*-------------------------------------------------------------------------
@ -976,7 +969,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
*-------------------------------------------------------------------------
@ -1021,7 +1013,6 @@ done:
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------
@ -1045,7 +1036,6 @@ H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_NDEBUG_UNUSED *hdr,
* Return: Non-negative on success, negative on failure
*
* Programmer: Quincey Koziol
* koziol@ncsa.uiuc.edu
* Feb 19 2005
*
*-------------------------------------------------------------------------

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
/* Programmer: Quincey Koziol
* Monday, March 6, 2006
*
* Purpose: v2 B-tree metadata statistics functions.

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
/* Programmer: Quincey Koziol
* Thursday, February 3, 2005
*
* Purpose: v2 B-tree testing functions.

View File

@ -15,7 +15,7 @@
*
* Created: H5Bcache.c
* Oct 31 2005
* Quincey Koziol <koziol@ncsa.uiuc.edu>
* Quincey Koziol
*
* Purpose: Implement B-tree metadata cache methods.
*
@ -98,7 +98,6 @@ const H5AC_class_t H5AC_BT[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 18, 2010
*
*-------------------------------------------------------------------------
@ -135,7 +134,6 @@ H5B__cache_get_initial_load_size(void *_udata, size_t *image_len)
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 24, 2008
*
*-------------------------------------------------------------------------
@ -241,7 +239,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 20, 2010
*
*-------------------------------------------------------------------------
@ -277,7 +274,6 @@ H5B__cache_image_len(const void *_thing, size_t *image_len)
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 24, 2008
*
*-------------------------------------------------------------------------
@ -363,7 +359,6 @@ done:
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 26, 2008
*
*-------------------------------------------------------------------------

532
src/H5C.c

File diff suppressed because it is too large Load Diff

View File

@ -123,8 +123,6 @@ H5CS__get_stack(void)
* Programmer: Quincey Koziol
* Thursday, February 6, 2003
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
herr_t
@ -214,8 +212,6 @@ H5CS_push(const char *func_name)
* Programmer: Quincey Koziol
* Thursday, February 6, 2003
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
herr_t

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@lbl.gov>
* Programmer: Quincey Koziol
* Monday, February 19, 2018
*
* Purpose:

View File

@ -1086,74 +1086,6 @@ H5C_stats__reset(H5C_t H5_ATTR_UNUSED * cache_ptr)
return;
} /* H5C_stats__reset() */
extern void
H5C__dump_entry(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr,
hbool_t dump_parents, const char *prefix, int indent);
static void
H5C__dump_parents(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr, const char *prefix, int indent)
{
unsigned u;
for(u = 0; u < entry_ptr->flush_dep_nparents; u++)
H5C__dump_entry(cache_ptr, entry_ptr->flush_dep_parent[u], TRUE, prefix, indent + 2);
}
typedef struct H5C__dump_child_ctx_t {
H5C_t *cache_ptr;
const H5C_cache_entry_t *parent;
hbool_t dump_parents;
const char *prefix;
int indent;
} H5C__dump_child_ctx_t;
static int
H5C__dump_children_cb(H5C_cache_entry_t *entry_ptr, void *_ctx)
{
H5C__dump_child_ctx_t *ctx = (H5C__dump_child_ctx_t *)_ctx;
if(entry_ptr->tag_info->tag != entry_ptr->addr) {
unsigned u;
HDassert(entry_ptr->flush_dep_nparents);
for(u = 0; u < entry_ptr->flush_dep_nparents; u++)
if(ctx->parent == entry_ptr->flush_dep_parent[u])
H5C__dump_entry(ctx->cache_ptr, entry_ptr, ctx->dump_parents, ctx->prefix, ctx->indent + 2);
} /* end if */
return(H5_ITER_CONT);
} /* end H5C__dump_children_cb() */
static void
H5C__dump_children(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr,
hbool_t dump_parents, const char *prefix, int indent)
{
H5C__dump_child_ctx_t ctx;
HDassert(entry_ptr->tag_info);
ctx.cache_ptr = cache_ptr;
ctx.parent = entry_ptr;
ctx.dump_parents = dump_parents;
ctx.prefix = prefix;
ctx.indent = indent;
H5C__iter_tagged_entries(cache_ptr, entry_ptr->tag_info->tag, FALSE, H5C__dump_children_cb, &ctx);
} /* end H5C__dump_children() */
void
H5C__dump_entry(H5C_t *cache_ptr, const H5C_cache_entry_t *entry_ptr,
hbool_t dump_parents, const char *prefix, int indent)
{
HDassert(cache_ptr);
HDassert(entry_ptr);
HDfprintf(stderr, "%*s%s: entry_ptr = (%a, '%s', %a, %t, %u, %u/%u)\n", indent, "", prefix, entry_ptr->addr, entry_ptr->type->name, entry_ptr->tag_info ? entry_ptr->tag_info->tag : HADDR_UNDEF, entry_ptr->is_dirty, entry_ptr->flush_dep_nparents, entry_ptr->flush_dep_nchildren, entry_ptr->flush_dep_ndirty_children);
if(dump_parents && entry_ptr->flush_dep_nparents)
H5C__dump_parents(cache_ptr, entry_ptr, "Parent", indent);
if(entry_ptr->flush_dep_nchildren)
H5C__dump_children(cache_ptr, entry_ptr, FALSE, "Child", indent);
} /* end H5C__dump_entry() */
/*-------------------------------------------------------------------------
* Function: H5C_flush_dependency_exists()

View File

@ -862,54 +862,6 @@ H5C__free_image_entries_array(H5C_t * cache_ptr)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5C__free_image_entries_array() */
/*-------------------------------------------------------------------------
* Function: H5C_force_cache_image_load()
*
* Purpose: On rare occasions, it is necessary to run
* H5MF_tidy_self_referential_fsm_hack() prior to the first
* metadata cache access. This is a problem as if there is a
* cache image at the end of the file, that routine will
* discard it.
*
* We solve this issue by calling this function, which will
* load the cache image and then call
* H5MF_tidy_self_referential_fsm_hack() to discard it.
*
* Return: SUCCEED on success, and FAIL on failure.
*
* Programmer: John Mainzer
* 1/11/17
*
*-------------------------------------------------------------------------
*/
herr_t
H5C_force_cache_image_load(H5F_t *f)
{
H5C_t *cache_ptr;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
/* Sanity checks */
HDassert(f);
HDassert(f->shared);
cache_ptr = f->shared->cache;
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(cache_ptr->load_image);
/* Load the cache image, if requested */
if(cache_ptr->load_image) {
cache_ptr->load_image = FALSE;
if(H5C__load_cache_image(f) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, FAIL, "can't load cache image")
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5C_force_cache_image_load() */
/*-------------------------------------------------------------------------
* Function: H5C_get_cache_image_config

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -4911,8 +4911,6 @@ H5_DLL herr_t H5C__mark_flush_dep_unserialized(H5C_cache_entry_t * entry_ptr);
H5_DLL herr_t H5C__make_space_in_cache(H5F_t * f, size_t space_needed,
hbool_t write_permitted);
H5_DLL herr_t H5C__flush_marked_entries(H5F_t * f);
H5_DLL herr_t H5C__generate_image(H5F_t *f, H5C_t *cache_ptr,
H5C_cache_entry_t *entry_ptr);
H5_DLL herr_t H5C__serialize_cache(H5F_t *f);
H5_DLL herr_t H5C__iter_tagged_entries(H5C_t *cache, haddr_t tag, hbool_t match_global,
H5C_tag_iter_cb_t cb, void *cb_ctx);

View File

@ -20,8 +20,6 @@
* Purpose: Constants and typedefs available to the rest of the
* library.
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
@ -2243,7 +2241,6 @@ H5_DLL herr_t H5C_expunge_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr,
unsigned flags);
H5_DLL herr_t H5C_flush_cache(H5F_t *f, unsigned flags);
H5_DLL herr_t H5C_flush_tagged_entries(H5F_t *f, haddr_t tag);
H5_DLL herr_t H5C_force_cache_image_load(H5F_t * f);
H5_DLL herr_t H5C_evict_tagged_entries(H5F_t *f, haddr_t tag, hbool_t match_global);
H5_DLL herr_t H5C_expunge_tag_type_metadata(H5F_t *f, haddr_t tag, int type_id, unsigned flags);
H5_DLL herr_t H5C_get_tag(const void *thing, /*OUT*/ haddr_t *tag);

View File

@ -19,8 +19,6 @@
*
* Purpose: Public include file for cache functions.
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
#ifndef _H5Cpublic_H

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Robb Matzke <matzke@llnl.gov>
/* Programmer: Robb Matzke
* Wednesday, October 8, 1997
*
* Purpose: v1 B-tree indexed (chunked) I/O functions. The chunks are
@ -338,7 +338,7 @@ H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
HDassert(udata->layout->ndims > 0 && udata->layout->ndims <= H5O_LAYOUT_NDIMS);
/* Compare the offsets but ignore the other fields */
ret_value = H5VM_vector_cmp_u(udata->layout->ndims, lt_key->scaled, rt_key->scaled);
ret_value = H5VM__vector_cmp_u(udata->layout->ndims, lt_key->scaled, rt_key->scaled);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__btree_cmp2() */
@ -620,8 +620,7 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Robb Matzke
* Pedro Vicente, pvn@ncsa.uiuc.edu
* Programmer: Pedro Vicente
* March 28, 2002
*
*-------------------------------------------------------------------------

View File

@ -112,7 +112,7 @@ static herr_t H5D__bt2_found_cb(const void *nrecord, void *op_data);
*/
static herr_t H5D__bt2_remove_cb(const void *nrecord, void *_udata);
/* Callback for H5B2_modify() which is called in H5D__bt2_idx_insert() */
/* Callback for H5B2_update() which is called in H5D__bt2_idx_insert() */
static herr_t H5D__bt2_mod_cb(void *_record, void *_op_data, hbool_t *changed);
/* Chunked layout indexing callbacks for v2 B-tree indexing */
@ -256,7 +256,7 @@ H5D__bt2_crt_context(void *_udata)
* Compute the size required for encoding the size of a chunk,
* allowing for an extra byte, in case the filter makes the chunk larger.
*/
ctx->chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)udata->chunk_size) + 8) / 8);
ctx->chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)udata->chunk_size) + 8) / 8);
if(ctx->chunk_size_len > 8)
ctx->chunk_size_len = 8;
@ -355,7 +355,7 @@ H5D__bt2_compare(const void *_udata, const void *_rec2, int *result)
HDassert(rec2);
/* Compare the offsets but ignore the other fields */
*result = H5VM_vector_cmp_u(udata->ndims, rec1->scaled, rec2->scaled);
*result = H5VM__vector_cmp_u(udata->ndims, rec1->scaled, rec2->scaled);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__bt2_compare() */
@ -773,7 +773,7 @@ H5D__bt2_idx_create(const H5D_chk_idx_info_t *idx_info)
* Compute the size required for encoding the size of a chunk,
* allowing for an extra byte, in case the filter makes the chunk larger.
*/
chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)idx_info->layout->size) + 8) / 8);
chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)idx_info->layout->size) + 8) / 8);
if(chunk_size_len > 8)
chunk_size_len = 8;
@ -837,7 +837,7 @@ H5D__bt2_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
* Function: H5D__bt2_mod_cb
*
* Purpose: Modify record for dataset chunk when it is found in a v2 B-tree.
* This is the callback for H5B2_modify() which is called in
* This is the callback for H5B2_update() which is called in
* H5D__bt2_idx_insert().
*
* Return: Success: non-negative
@ -1266,13 +1266,6 @@ done:
*
* Programmer: Vailin Choi; June 2010
*
* Modifications:
* Vailin Choi; March 2011
* Initialize size of an unfiltered chunk.
* This is a fix for for the assertion failure in:
* [src/H5FSsection.c:968: H5FS_sect_link_size: Assertion `bin < sinfo->nbins' failed.]
* which is uncovered by test_unlink_chunked_dataset() in test/unlink.c
*
*-------------------------------------------------------------------------
*/
static herr_t

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
/* Programmer: Quincey Koziol
* Thursday, April 24, 2008
*
* Purpose: Abstract indexed (chunked) I/O functions. The logical
@ -278,7 +278,7 @@ H5D__nonexistent_readvv(const H5D_io_info_t *io_info,
size_t chunk_max_nseq, size_t *chunk_curr_seq, size_t chunk_len_arr[], hsize_t chunk_offset_arr[],
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
/* format convert cb */
/* Format convert cb */
static int H5D__chunk_format_convert_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
/* Helper routines */
@ -300,9 +300,7 @@ static herr_t H5D__create_chunk_file_map_all(H5D_chunk_map_t *fm,
const H5D_io_info_t *io_info);
static herr_t H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm,
const H5D_io_info_t *io_info);
static herr_t H5D__create_chunk_mem_map_1d(const H5D_chunk_map_t *fm);
static herr_t H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm);
static herr_t H5D__chunk_file_cb(void *elem, const H5T_t *type, unsigned ndims,
const hsize_t *coords, void *fm);
@ -327,8 +325,8 @@ static herr_t H5D__chunk_collective_fill(const H5D_t *dset,
static int H5D__chunk_cmp_addr(const void *addr1, const void *addr2);
#endif /* H5_HAVE_PARALLEL */
static int
H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
/* Debugging helper routine callback */
static int H5D__chunk_dump_index_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata);
/*********************/
/* Package Variables */
@ -835,7 +833,7 @@ H5D__chunk_set_sizes(H5D_t *dset)
unsigned enc_bytes_per_dim; /* Number of bytes required to encode this dimension */
/* Get encoded size of dim, in bytes */
enc_bytes_per_dim = (H5VM_log2_gen(dset->shared->layout.u.chunk.dim[u]) + 8) / 8;
enc_bytes_per_dim = (H5VM__log2_gen(dset->shared->layout.u.chunk.dim[u]) + 8) / 8;
/* Check if this is the largest value so far */
if(enc_bytes_per_dim > max_enc_bytes_per_dim)
@ -999,14 +997,14 @@ H5D__chunk_init(H5F_t *f, const H5D_t * const dset, hid_t dapl_id)
rdcc->scaled_dims[u] = (dset->shared->curr_dims[u] + dset->shared->layout.u.chunk.dim[u] - 1) /
dset->shared->layout.u.chunk.dim[u];
if( !(scaled_power2up = H5VM_power2up(rdcc->scaled_dims[u])) )
if(!(scaled_power2up = H5VM__power2up(rdcc->scaled_dims[u])))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2")
/* Inital 'power2up' values for scaled dimensions */
rdcc->scaled_power2up[u] = scaled_power2up;
/* Number of bits required to encode scaled dimension size */
rdcc->scaled_encode_bits[u] = H5VM_log2_gen(rdcc->scaled_power2up[u]);
rdcc->scaled_encode_bits[u] = H5VM__log2_gen(rdcc->scaled_power2up[u]);
} /* end for */
} /* end if */
@ -2821,12 +2819,12 @@ H5D__chunk_flush(H5D_t *dset)
/* Loop over all entries in the chunk cache */
for(ent = rdcc->head; ent; ent = next) {
next = ent->next;
next = ent->next;
if(H5D__chunk_flush_entry(dset, ent, FALSE) < 0)
nerrors++;
} /* end for */
if(nerrors)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush one or more raw data chunks")
done:
FUNC_LEAVE_NOAPI(ret_value)
@ -2970,7 +2968,7 @@ H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
/* Reset index structures */
if((storage->ops->reset)(storage, reset_addr) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
HGOTO_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "unable to reset chunk index info")
done:
FUNC_LEAVE_NOAPI(ret_value)
@ -2992,7 +2990,7 @@ done:
static herr_t
H5D__chunk_cinfo_cache_reset(H5D_chunk_cached_t *last)
{
FUNC_ENTER_PACKAGE_NOERR
FUNC_ENTER_STATIC_NOERR
/* Sanity check */
HDassert(last);
@ -3615,14 +3613,14 @@ H5D__chunk_cache_evict(const H5D_t *dset, H5D_rdcc_ent_t *ent, hbool_t flush)
static herr_t
H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
{
const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
size_t total = rdcc->nbytes_max;
const int nmeth = 2; /*number of methods */
int w[1]; /*weighting as an interval */
H5D_rdcc_ent_t *p[2], *cur; /*list pointers */
H5D_rdcc_ent_t *n[2]; /*list next pointers */
int nerrors = 0; /* Accumulated error count during preemptions */
herr_t ret_value = SUCCEED; /* Return value */
const H5D_rdcc_t *rdcc = &(dset->shared->cache.chunk);
size_t total = rdcc->nbytes_max;
const int nmeth = 2; /* Number of methods */
int w[1]; /* Weighting as an interval */
H5D_rdcc_ent_t *p[2], *cur; /* List pointers */
H5D_rdcc_ent_t *n[2]; /* List next pointers */
int nerrors = 0; /* Accumulated error count during preemptions */
herr_t ret_value = SUCCEED;/* Return value */
FUNC_ENTER_STATIC
@ -3643,62 +3641,62 @@ H5D__chunk_cache_prune(const H5D_t *dset, size_t size)
while((p[0] || p[1]) && (rdcc->nbytes_used + size) > total) {
int i; /* Local index variable */
/* Introduce new pointers */
for(i = 0; i < nmeth - 1; i++)
/* Introduce new pointers */
for(i = 0; i < nmeth - 1; i++)
if(0 == w[i])
p[i + 1] = rdcc->head;
/* Compute next value for each pointer */
for(i = 0; i < nmeth; i++)
/* Compute next value for each pointer */
for(i = 0; i < nmeth; i++)
n[i] = p[i] ? p[i]->next : NULL;
/* Give each method a chance */
for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
if(0 == i && p[0] && !p[0]->locked &&
/* Give each method a chance */
for(i = 0; i < nmeth && (rdcc->nbytes_used + size) > total; i++) {
if(0 == i && p[0] && !p[0]->locked &&
((0 == p[0]->rd_count && 0 == p[0]->wr_count) ||
(0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
(dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
/*
* Method 0: Preempt entries that have been completely written
* and/or completely read but not entries that are partially
* written or partially read.
*/
cur = p[0];
} else if(1 == i && p[1] && !p[1]->locked) {
/*
* Method 1: Preempt the entry without regard to
* considerations other than being locked. This is the last
* resort preemption.
*/
cur = p[1];
} else {
/* Nothing to preempt at this point */
cur = NULL;
}
(0 == p[0]->rd_count && dset->shared->layout.u.chunk.size == p[0]->wr_count) ||
(dset->shared->layout.u.chunk.size == p[0]->rd_count && 0 == p[0]->wr_count))) {
/*
* Method 0: Preempt entries that have been completely written
* and/or completely read but not entries that are partially
* written or partially read.
*/
cur = p[0];
} else if(1 == i && p[1] && !p[1]->locked) {
/*
* Method 1: Preempt the entry without regard to
* considerations other than being locked. This is the last
* resort preemption.
*/
cur = p[1];
} else {
/* Nothing to preempt at this point */
cur = NULL;
}
if(cur) {
if(cur) {
int j; /* Local index variable */
for(j = 0; j < nmeth; j++) {
if(p[j] == cur)
for(j = 0; j < nmeth; j++) {
if(p[j] == cur)
p[j] = NULL;
if(n[j] == cur)
if(n[j] == cur)
n[j] = cur->next;
} /* end for */
if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
} /* end for */
if(H5D__chunk_cache_evict(dset, cur, TRUE) < 0)
nerrors++;
} /* end if */
} /* end for */
} /* end if */
} /* end for */
/* Advance pointers */
for(i = 0; i < nmeth; i++)
/* Advance pointers */
for(i = 0; i < nmeth; i++)
p[i] = n[i];
for(i = 0; i < nmeth - 1; i++)
for(i = 0; i < nmeth - 1; i++)
w[i] -= 1;
} /* end while */
if(nerrors)
HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
HGOTO_ERROR(H5E_IO, H5E_CANTFLUSH, FAIL, "unable to preempt one or more raw data cache entry")
done:
FUNC_LEAVE_NOAPI(ret_value)
@ -4347,7 +4345,7 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
hbool_t unfilt_edge_chunk_dim[H5O_LAYOUT_NDIMS]; /* Whether there are unfiltered edge chunks at the edge of each dimension */
hsize_t edge_chunk_scaled[H5O_LAYOUT_NDIMS]; /* Offset of the unfiltered edge chunks at the edge of each dimension */
unsigned nunfilt_edge_chunk_dims = 0; /* Number of dimensions on an edge */
const H5O_storage_chunk_t *sc = &(layout->storage.u.chunk);
H5O_storage_chunk_t *sc = &(layout->storage.u.chunk); /* Convenience variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@ -4556,9 +4554,8 @@ H5D__chunk_allocate(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "error looking up chunk address")
#ifndef NDEBUG
/* None of the chunks should be allocated */
if(H5D_CHUNK_IDX_NONE != sc->idx_type) {
if(H5D_CHUNK_IDX_NONE != sc->idx_type)
HDassert(!H5F_addr_defined(udata.chunk_block.offset));
}
/* Make sure the chunk is really in the dataset and outside the
* original dimensions */
@ -5126,8 +5123,8 @@ H5D__chunk_cmp_addr(const void *addr1, const void *addr2)
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
* March 26, 2002
* Programmer: Pedro Vicente
* March 26, 2002
*
*-------------------------------------------------------------------------
*/
@ -5252,7 +5249,7 @@ done:
*
* Return: Non-negative on success/Negative on failure
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
* Programmer: Pedro Vicente
* Algorithm: Robb Matzke
* March 27, 2002
*
@ -5405,13 +5402,13 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
elmts_per_chunk = 1;
for(u = 0; u < space_ndims; u++) {
elmts_per_chunk *= layout->u.chunk.dim[u];
chunk_dim[u] = layout->u.chunk.dim[u];
shrunk_dim[u] = (space_dim[u] < old_dim[u]);
chunk_dim[u] = layout->u.chunk.dim[u];
shrunk_dim[u] = (space_dim[u] < old_dim[u]);
} /* end for */
/* Create a dataspace for a chunk & set the extent */
if(NULL == (chunk_space = H5S_create_simple(space_ndims, chunk_dim, NULL)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Reset hyperslab start array */
/* (hyperslabs will always start from origin) */
@ -5599,7 +5596,7 @@ H5D__chunk_prune_by_extent(H5D_t *dset, const hsize_t *old_dim)
/* Remove the chunk from disk, if present */
if(H5F_addr_defined(chk_udata.chunk_block.offset)) {
/* Update the offset in idx_udata */
idx_udata.scaled = udata.common.scaled;
idx_udata.scaled = udata.common.scaled;
/* Remove the chunk from disk */
if((sc->ops->remove)(&idx_info, &idx_udata) < 0)
@ -5989,7 +5986,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
if(pline && pline->nused) {
must_filter = TRUE;
if((udata->common.layout->flags & H5O_LAYOUT_CHUNK_DONT_FILTER_PARTIAL_BOUND_CHUNKS) &&
H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, chunk_rec->scaled, udata->dset_dims))
H5D__chunk_is_partial_edge_chunk(udata->dset_ndims, udata->common.layout->dim, chunk_rec->scaled, udata->dset_dims))
must_filter = FALSE;
}
@ -6890,12 +6887,12 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
allow_chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)(idx_info->layout->size)) + 8) / 8);
allow_chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)(idx_info->layout->size)) + 8) / 8);
if(allow_chunk_size_len > 8)
allow_chunk_size_len = 8;
/* Compute encoded size of chunk */
new_chunk_size_len = (H5VM_log2_gen((uint64_t)(new_chunk->length)) + 8) / 8;
new_chunk_size_len = (H5VM__log2_gen((uint64_t)(new_chunk->length)) + 8) / 8;
if(new_chunk_size_len > 8)
HGOTO_ERROR(H5E_DATASET, H5E_BADRANGE, FAIL, "encoded chunk size is more than 8 bytes?!?")
@ -6932,9 +6929,9 @@ H5D__chunk_file_alloc(const H5D_chk_idx_info_t *idx_info, const H5F_block_t *old
} /* end else */
} /* end if */
else {
HDassert(!H5F_addr_defined(new_chunk->offset));
HDassert(new_chunk->length == idx_info->layout->size);
alloc_chunk = TRUE;
HDassert(!H5F_addr_defined(new_chunk->offset));
HDassert(new_chunk->length == idx_info->layout->size);
alloc_chunk = TRUE;
} /* end else */
/* Actually allocate space for the chunk in the file */

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
* Programmer: Raymond Lu
* August 5, 2002
*
* Purpose: Compact dataset I/O functions. These routines are similar

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Programmer: Quincey Koziol
* Thursday, September 28, 2000
*
* Purpose:

View File

@ -15,7 +15,7 @@
*
* Created: H5Ddeprec.c
* April 5 2007
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Deprecated functions from the H5D interface. These
* functions are here for compatibility purposes and may be

View File

@ -252,7 +252,7 @@ H5D__earray_crt_context(void *_udata)
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
ctx->chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)udata->chunk_size) + 8) / 8);
ctx->chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)udata->chunk_size) + 8) / 8);
if(ctx->chunk_size_len > 8)
ctx->chunk_size_len = 8;
@ -937,7 +937,7 @@ H5D__earray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)idx_info->layout->size) + 8) / 8);
chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)idx_info->layout->size) + 8) / 8);
if(chunk_size_len > 8)
chunk_size_len = 8;

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Programmer: Quincey Koziol
* Thursday, September 30, 2004
*/
@ -336,9 +336,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, March 4, 1998
*
* Modifications:
* Robb Matzke, 1999-07-28
* The ADDR argument is passed by value.
*-------------------------------------------------------------------------
*/
static herr_t

View File

@ -248,7 +248,7 @@ H5D__farray_crt_context(void *_udata)
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
ctx->chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)udata->chunk_size) + 8) / 8);
ctx->chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)udata->chunk_size) + 8) / 8);
if(ctx->chunk_size_len > 8)
ctx->chunk_size_len = 8;
@ -892,7 +892,7 @@ H5D__farray_idx_create(const H5D_chk_idx_info_t *idx_info)
/* Compute the size required for encoding the size of a chunk, allowing
* for an extra byte, in case the filter makes the chunk larger.
*/
chunk_size_len = 1 + ((H5VM_log2_gen((uint64_t)idx_info->layout->size) + 8) / 8);
chunk_size_len = 1 + ((H5VM__log2_gen((uint64_t)idx_info->layout->size) + 8) / 8);
if(chunk_size_len > 8)
chunk_size_len = 8;

View File

@ -15,7 +15,7 @@
*
* Created: H5Dfill.c
* Jun 19 2007
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Fill value operations for datasets
*
@ -647,7 +647,7 @@ done:
static herr_t
H5D__fill_release(H5D_fill_buf_info_t *fb_info)
{
FUNC_ENTER_PACKAGE_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(fb_info);

View File

@ -97,6 +97,7 @@ static herr_t H5D__vlen_get_buf_size_cb(void *elem, hid_t type_id, unsigned ndim
const hsize_t *point, void *op_data);
static herr_t H5D__vlen_get_buf_size_gen_cb(void *elem, hid_t type_id, unsigned ndim,
const hsize_t *point, void *op_data);
static herr_t H5D__check_filters(H5D_t *dataset);
/*********************/
@ -671,7 +672,7 @@ H5D__cache_dataspace_info(const H5D_t *dset)
for(u = 0; u < dset->shared->ndims; u++) {
hsize_t scaled_power2up; /* Scaled value, rounded to next power of 2 */
if( !(scaled_power2up = H5VM_power2up(dset->shared->curr_dims[u])) )
if(!(scaled_power2up = H5VM__power2up(dset->shared->curr_dims[u])))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2")
dset->shared->curr_power2up[u] = scaled_power2up;
}
@ -908,7 +909,7 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
HDassert(dset);
HDassert(oloc);
oh = H5O__create_ohdr(file, dset->shared->dcpl_id);
oh = H5O_create_ohdr(file, dset->shared->dcpl_id);
if(NULL == oh)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't instantiate object header")
@ -917,7 +918,7 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "computed header size is invalid")
/* Special allocation of space for compact datsets is handled by the call here. */
if(H5O__apply_ohdr(file, oh, dset->shared->dcpl_id, ohdr_size, (size_t)1, oloc) == FAIL)
if(H5O_apply_ohdr(file, oh, dset->shared->dcpl_id, ohdr_size, (size_t)1, oloc) == FAIL)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't apply object header to file")
done:
@ -1022,7 +1023,8 @@ H5D__update_oh_info(H5F_t *file, H5D_t *dset, hid_t dapl_id)
if(TRUE == use_minimized_header) {
if(H5D__prepare_minimized_oh(file, dset, oloc) == FAIL)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create minimized dataset object header")
} else {
} /* end if */
else {
/* Add the dataset's raw data size to the size of the header, if the
* raw data will be stored as compact
*/
@ -2960,13 +2962,13 @@ done:
* Return: Non-negative on success/Negative on failure
*-------------------------------------------------------------------------
*/
herr_t
static herr_t
H5D__check_filters(H5D_t *dataset)
{
H5O_fill_t *fill; /* Dataset's fill value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
FUNC_ENTER_STATIC
/* Check args */
HDassert(dataset);
@ -3086,14 +3088,14 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
dset->shared->cache.chunk.scaled_dims[dim_idx] > dset->shared->cache.chunk.nslots))
update_chunks = TRUE;
if(!(scaled_power2up = H5VM_power2up(scaled)))
if(!(scaled_power2up = H5VM__power2up(scaled)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "unable to get the next power of 2")
/* Check if the number of bits required to encode the scaled size value changed */
if(dset->shared->cache.chunk.scaled_power2up[dim_idx] != scaled_power2up) {
/* Update the 'power2up' & 'encode_bits' values for the current dimension */
dset->shared->cache.chunk.scaled_power2up[dim_idx] = scaled_power2up;
dset->shared->cache.chunk.scaled_encode_bits[dim_idx] = H5VM_log2_gen(scaled_power2up);
dset->shared->cache.chunk.scaled_encode_bits[dim_idx] = H5VM__log2_gen(scaled_power2up);
/* Indicate that the cached chunk indices need to be updated */
update_chunks = TRUE;

View File

@ -1342,9 +1342,9 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
HDassert(fm);
/* Obtain the current rank of the process and the number of processes */
if ((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
if((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
/* Set the actual-chunk-opt-mode property. */
@ -1356,10 +1356,10 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
H5CX_set_mpio_actual_io_mode(H5D_MPIO_CHUNK_COLLECTIVE);
/* Build a list of selected chunks in the collective io operation */
if (H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
if(H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list")
if (io_info->op_type == H5D_IO_OP_WRITE) { /* Filtered collective write */
if(io_info->op_type == H5D_IO_OP_WRITE) { /* Filtered collective write */
H5D_chk_idx_info_t index_info;
H5D_chunk_ud_t udata;
hsize_t mpi_buf_count;
@ -1379,15 +1379,15 @@ H5D__link_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_in
* updating each chunk with the data modifications from other processes,
* then re-filtering the chunk.
*/
for (i = 0; i < chunk_list_num_entries; i++)
if (mpi_rank == chunk_list[i].owners.new_owner)
if (H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
for(i = 0; i < chunk_list_num_entries; i++)
if(mpi_rank == chunk_list[i].owners.new_owner)
if(H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't process chunk entry")
/* Gather the new chunk sizes to all processes for a collective reallocation
* of the chunks in the file.
*/
if (H5D__mpio_array_gatherv(chunk_list, chunk_list_num_entries, sizeof(H5D_filtered_collective_io_info_t),
if(H5D__mpio_array_gatherv(chunk_list, chunk_list_num_entries, sizeof(H5D_filtered_collective_io_info_t),
(void **) &collective_chunk_list, &collective_chunk_list_num_entries, true, 0, io_info->comm, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, "couldn't gather new chunk sizes")
@ -1480,9 +1480,9 @@ done:
H5MM_free(collective_chunk_list);
/* Free the MPI buf and file types, if they were derived */
if (mem_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mem_type)))
if(mem_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&mem_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
if (file_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&file_type)))
if(file_type_is_derived && MPI_SUCCESS != (mpi_code = MPI_Type_free(&file_type)))
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
FUNC_LEAVE_NOAPI(ret_value)
@ -1770,9 +1770,9 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
HDassert(fm);
/* Obtain the current rank of the process and the number of processes */
if ((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
if((mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
if ((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
/* Set the actual chunk opt mode property */
@ -1784,7 +1784,7 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
H5CX_set_mpio_actual_io_mode(H5D_MPIO_CHUNK_COLLECTIVE);
/* Build a list of selected chunks in the collective IO operation */
if (H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
if(H5D__construct_filtered_io_info_list(io_info, type_info, fm, &chunk_list, &chunk_list_num_entries) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "couldn't construct filtered I/O info list")
/* Set up contiguous I/O info object */
@ -1799,9 +1799,9 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
/* Set dataset storage for I/O info */
io_info->store = &store;
if (io_info->op_type == H5D_IO_OP_READ) { /* Filtered collective read */
for (i = 0; i < chunk_list_num_entries; i++)
if (H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
if(io_info->op_type == H5D_IO_OP_READ) { /* Filtered collective read */
for(i = 0; i < chunk_list_num_entries; i++)
if(H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "couldn't process chunk entry")
} /* end if */
else { /* Filtered collective write */
@ -1852,14 +1852,14 @@ H5D__multi_chunk_filtered_collective_io(H5D_io_info_t *io_info, const H5D_type_i
/* Check if this process has a chunk to work on for this iteration */
hbool_t have_chunk_to_process = (i < chunk_list_num_entries) && (mpi_rank == chunk_list[i].owners.new_owner);
if (have_chunk_to_process)
if (H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
if(have_chunk_to_process)
if(H5D__filtered_collective_chunk_entry_io(&chunk_list[i], io_info, type_info, fm) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "couldn't process chunk entry")
/* Gather the new chunk sizes to all processes for a collective re-allocation
* of the chunks in the file
*/
if (H5D__mpio_array_gatherv(&chunk_list[i], have_chunk_to_process ? 1 : 0, sizeof(H5D_filtered_collective_io_info_t),
if(H5D__mpio_array_gatherv(&chunk_list[i], have_chunk_to_process ? 1 : 0, sizeof(H5D_filtered_collective_io_info_t),
(void **) &collective_chunk_list, &collective_chunk_list_num_entries, true, 0, io_info->comm, NULL) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGATHER, FAIL, "couldn't gather new chunk sizes")

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
/* Programmer: Vailin Choi
* September 2010
*
* Purpose: Implicit (Non Index) chunked I/O functions.

View File

@ -234,8 +234,8 @@ typedef struct H5D_io_info_t {
typedef struct H5D_chk_idx_info_t {
H5F_t *f; /* File pointer for operation */
const H5O_pline_t *pline; /* I/O pipeline info */
H5O_layout_chunk_t *layout; /* Chunk layout description */
H5O_storage_chunk_t *storage; /* Chunk storage description */
H5O_layout_chunk_t *layout; /* Chunk layout description */
H5O_storage_chunk_t *storage; /* Chunk storage description */
} H5D_chk_idx_info_t;
/*
@ -566,7 +566,6 @@ H5_DLL herr_t H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *coo
H5_DLL haddr_t H5D__get_offset(const H5D_t *dset);
H5_DLL herr_t H5D__vlen_get_buf_size(H5D_t *dset, hid_t type_id, hid_t space_id, hsize_t *size);
H5_DLL herr_t H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id, hsize_t *size);
H5_DLL herr_t H5D__check_filters(H5D_t *dataset);
H5_DLL herr_t H5D__set_extent(H5D_t *dataset, const hsize_t *size);
H5_DLL herr_t H5D__flush_sieve_buf(H5D_t *dataset);
H5_DLL herr_t H5D__flush_real(H5D_t *dataset);

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Vailin Choi <vchoi@hdfgroup.org>
/* Programmer: Vailin Choi
* May 2011; updated 10/2015
*
* Purpose: Single Chunk I/O functions.

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
/* Programmer: Quincey Koziol
* Thursday, May 27, 2004
*
* Purpose: Dataset testing functions.

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Neil Fortner <nfortne2@hdfgroup.org>
* Programmer: Neil Fortner
* Wednesday, January 28, 2015
*
* Purpose:
@ -2238,7 +2238,7 @@ H5D__virtual_is_data_cached(const H5D_shared_t *shared_dset)
size_t i, j; /* Local index variables */
hbool_t ret_value = FALSE; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
FUNC_ENTER_STATIC_NOERR
/* Sanity checks */
HDassert(shared_dset);

View File

@ -391,7 +391,7 @@ H5E__get_stack(void)
/*-------------------------------------------------------------------------
* Function: H5E_free_class
* Function: H5E__free_class
*
* Purpose: Private function to free an error class.
*
@ -403,9 +403,9 @@ H5E__get_stack(void)
*-------------------------------------------------------------------------
*/
static herr_t
H5E_free_class(H5E_cls_t *cls)
H5E__free_class(H5E_cls_t *cls)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check arguments */
HDassert(cls);
@ -417,7 +417,7 @@ H5E_free_class(H5E_cls_t *cls)
cls = H5FL_FREE(H5E_cls_t, cls);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5E_free_class() */
} /* end H5E__free_class() */
/*-------------------------------------------------------------------------
@ -502,7 +502,7 @@ H5E__register_class(const char *cls_name, const char *lib_name, const char *vers
done:
if(!ret_value)
if(cls && H5E_free_class(cls) < 0)
if(cls && H5E__free_class(cls) < 0)
HDONE_ERROR(H5E_ERROR, H5E_CANTRELEASE, NULL, "unable to free error class")
FUNC_LEAVE_NOAPI(ret_value)
@ -572,7 +572,7 @@ H5E__unregister_class(H5E_cls_t *cls)
HGOTO_ERROR(H5E_ERROR, H5E_BADITER, FAIL, "unable to free all messages in this error class")
/* Free error class structure */
if(H5E_free_class(cls) < 0)
if(H5E__free_class(cls) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTRELEASE, FAIL, "unable to free error class")
done:

View File

@ -15,7 +15,7 @@
*
* Created: H5EA.c
* Jun 17 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Implements an "extensible array" for storing elements
* in an array whose high bounds can extend and shrink.
@ -124,7 +124,6 @@ H5FL_BLK_DEFINE(ea_native_elmt);
* NULL on failure
*
* Programmer: Quincey Koziol
* koziol@lbl.gov
* Oct 10 2016
*
*-------------------------------------------------------------------------
@ -190,7 +189,6 @@ END_FUNC(STATIC) /* end H5EA__new() */
* NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Jun 17 2008
*
*-------------------------------------------------------------------------
@ -241,7 +239,6 @@ END_FUNC(PRIV) /* end H5EA_create() */
* NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 28 2008
*
*-------------------------------------------------------------------------
@ -283,7 +280,6 @@ END_FUNC(PRIV) /* end H5EA_open() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@ -314,7 +310,6 @@ END_FUNC(PRIV) /* end H5EA_get_nelmts() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@ -347,7 +342,6 @@ END_FUNC(PRIV) /* end H5EA_get_addr() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -559,7 +553,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend,
(page_idx * sblock->dblk_page_size);
/* Check if page has been initialized yet */
if(!H5VM_bit_get(sblock->page_init, page_init_idx)) {
if(!H5VM__bit_get(sblock->page_init, page_init_idx)) {
/* Check if we are allowed to create the thing */
if(0 == (thing_acc & H5AC__READ_ONLY_FLAG)) { /* i.e. r/w access */
/* Create the data block page */
@ -567,7 +561,7 @@ H5EA__lookup_elmt(const H5EA_t *ea, hsize_t idx, hbool_t will_extend,
H5E_THROW(H5E_CANTCREATE, "unable to create data block page")
/* Mark data block page as initialized in super block */
H5VM_bit_set(sblock->page_init, page_init_idx, TRUE);
H5VM__bit_set(sblock->page_init, page_init_idx, TRUE);
sblock_cache_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
else
@ -656,7 +650,6 @@ END_FUNC(STATIC) /* end H5EA__lookup_elmt() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -721,7 +714,6 @@ END_FUNC(PRIV) /* end H5EA_set() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@ -786,7 +778,6 @@ END_FUNC(PRIV) /* end H5EA_get() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* May 27 2009
*
*-------------------------------------------------------------------------
@ -836,7 +827,6 @@ END_FUNC(PRIV) /* end H5EA_depend() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@ -937,7 +927,6 @@ END_FUNC(PRIV) /* end H5EA_close() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 28 2008
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5EAcache.c
* Aug 26 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Implement extensible array metadata cache methods.
*
@ -239,7 +239,6 @@ const H5AC_class_t H5AC_EARRAY_DBLK_PAGE[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@ -305,7 +304,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@ -429,7 +427,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@ -459,7 +456,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@ -606,7 +602,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 16, 2013
*
*-------------------------------------------------------------------------
@ -635,7 +630,6 @@ END_FUNC(STATIC) /* end H5EA__cache_hdr_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -708,7 +702,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -815,7 +808,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -845,7 +837,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -932,7 +923,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1001,7 +991,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1030,7 +1019,6 @@ END_FUNC(STATIC) /* end H5EA__cache_iblock_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1122,7 +1110,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1226,7 +1213,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1256,7 +1242,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1330,7 +1315,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@ -1414,7 +1398,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1443,7 +1426,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1536,7 +1518,6 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1639,7 +1620,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1672,7 +1652,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1744,7 +1723,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@ -1828,7 +1806,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1904,7 +1881,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblock_fsf_size() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -1970,7 +1946,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -2043,7 +2018,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -2073,7 +2047,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------
@ -2125,7 +2098,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 31 2009
*
*-------------------------------------------------------------------------
@ -2209,7 +2181,6 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 17, 2013
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5EAdblkpage.c
* Nov 20 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Data block page routines for extensible arrays.
*
@ -91,7 +91,6 @@ H5FL_DEFINE_STATIC(H5EA_dblk_page_t);
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@ -141,7 +140,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@ -206,7 +204,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_create() */
* Return: Non-NULL pointer to data block page on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@ -267,7 +264,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------
@ -298,7 +294,6 @@ END_FUNC(PKG) /* end H5EA__dblk_page_unprotect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Nov 20 2008
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5EAdblock.c
* Sep 11 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Data block routines for extensible arrays.
*
@ -92,7 +92,6 @@ H5FL_DEFINE_STATIC(H5EA_dblock_t);
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@ -153,7 +152,6 @@ END_FUNC(PKG) /* end H5EA__dblock_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -248,7 +246,6 @@ END_FUNC(PKG) /* end H5EA__dblock_create() */
* Return: Super block index on success/Can't fail
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@ -269,7 +266,7 @@ H5EA__dblock_sblk_idx(const H5EA_hdr_t *hdr, hsize_t idx))
/* Determine the superblock information for the index */
H5_CHECK_OVERFLOW(idx, /*From:*/hsize_t, /*To:*/uint64_t);
sblk_idx = H5VM_log2_gen((uint64_t)((idx / hdr->cparam.data_blk_min_elmts) + 1));
sblk_idx = H5VM__log2_gen((uint64_t)((idx / hdr->cparam.data_blk_min_elmts) + 1));
/* Set return value */
ret_value = sblk_idx;
@ -285,7 +282,6 @@ END_FUNC(PKG) /* end H5EA__dblock_sblk_idx() */
* Return: Non-NULL pointer to data block on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 18 2008
*
*-------------------------------------------------------------------------
@ -348,7 +344,6 @@ END_FUNC(PKG) /* end H5EA__dblock_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------
@ -379,7 +374,6 @@ END_FUNC(PKG) /* end H5EA__dblock_unprotect() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 22 2008
*
*-------------------------------------------------------------------------
@ -442,7 +436,6 @@ END_FUNC(PKG) /* end H5EA__dblock_delete() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5EAhdr.c
* Aug 26 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Array header routines for extensible arrays.
*
@ -110,7 +110,6 @@ H5FL_SEQ_DEFINE_STATIC(H5EA_sblk_info_t);
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@ -180,7 +179,6 @@ END_FUNC(PKG) /* end H5EA__hdr_alloc() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 18 2008
*
*-------------------------------------------------------------------------
@ -201,7 +199,7 @@ H5EA__hdr_init(H5EA_hdr_t *hdr, void *ctx_udata))
HDassert(hdr->cparam.sup_blk_min_data_ptrs);
/* Compute general information */
hdr->nsblks = 1 + (hdr->cparam.max_nelmts_bits - H5VM_log2_of2(hdr->cparam.data_blk_min_elmts));
hdr->nsblks = 1 + (hdr->cparam.max_nelmts_bits - H5VM__log2_of2(hdr->cparam.data_blk_min_elmts));
hdr->dblk_page_nelmts = (size_t)1 << hdr->cparam.max_dblk_page_nelmts_bits;
hdr->arr_off_size = (unsigned char)H5EA_SIZEOF_OFFSET_BITS(hdr->cparam.max_nelmts_bits);
@ -245,7 +243,6 @@ END_FUNC(PKG) /* end H5EA__hdr_init() */
* Return: Non-NULL pointer to buffer for elements on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 16 2008
*
*-------------------------------------------------------------------------
@ -264,7 +261,7 @@ H5EA__hdr_alloc_elmts(H5EA_hdr_t *hdr, size_t nelmts))
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/size_t, /*To:*/uint32_t);
idx = H5VM_log2_of2((uint32_t)nelmts) - H5VM_log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
idx = H5VM__log2_of2((uint32_t)nelmts) - H5VM__log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
/* Check for needing to increase size of array of factories */
if(idx >= hdr->elmt_fac.nalloc) {
@ -312,7 +309,6 @@ END_FUNC(PKG) /* end H5EA__hdr_alloc_elmts() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 18 2008
*
*-------------------------------------------------------------------------
@ -331,7 +327,7 @@ H5EA__hdr_free_elmts(H5EA_hdr_t *hdr, size_t nelmts, void *elmts))
/* Compute the index of the element buffer factory */
H5_CHECK_OVERFLOW(nelmts, /*From:*/size_t, /*To:*/uint32_t);
idx = H5VM_log2_of2((uint32_t)nelmts) - H5VM_log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
idx = H5VM__log2_of2((uint32_t)nelmts) - H5VM__log2_of2((uint32_t)hdr->cparam.data_blk_min_elmts);
/* Free buffer for elements in index block */
HDassert(idx < hdr->elmt_fac.nalloc);
@ -349,7 +345,6 @@ END_FUNC(PKG) /* end H5EA__hdr_free_elmts() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Jun 17 2008
*
*-------------------------------------------------------------------------
@ -464,7 +459,6 @@ END_FUNC(PKG) /* end H5EA__hdr_create() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@ -497,7 +491,6 @@ END_FUNC(PKG) /* end H5EA__hdr_incr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@ -533,7 +526,6 @@ END_FUNC(PKG) /* end H5EA__hdr_decr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@ -559,7 +551,6 @@ END_FUNC(PKG) /* end H5EA__hdr_fuse_incr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@ -589,7 +580,6 @@ END_FUNC(PKG) /* end H5EA__hdr_fuse_decr() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -619,7 +609,6 @@ END_FUNC(PKG) /* end H5EA__hdr_modified() */
* Return: Non-NULL pointer to header on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Jul 31 2013
*
*-------------------------------------------------------------------------
@ -677,7 +666,6 @@ END_FUNC(PKG) /* end H5EA__hdr_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 1 2013
*
*-------------------------------------------------------------------------
@ -708,7 +696,6 @@ END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 26 2008
*
*-------------------------------------------------------------------------
@ -765,7 +752,6 @@ END_FUNC(PKG) /* end H5EA__hdr_delete() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5EAiblock.c
* Sep 9 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Index block routines for extensible arrays.
*
@ -42,7 +42,7 @@
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MFprivate.h" /* File memory management */
#include "H5VMprivate.h" /* Vectors and arrays */
#include "H5VMprivate.h" /* Vectors and arrays */
/****************/
@ -98,7 +98,6 @@ H5FL_SEQ_DEFINE_STATIC(haddr_t);
* Return: Non-NULL pointer to index block on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -129,11 +128,6 @@ H5EA__iblock_alloc(H5EA_hdr_t *hdr))
iblock->nsblks = H5EA_SBLK_FIRST_IDX(hdr->cparam.sup_blk_min_data_ptrs);
iblock->ndblk_addrs = 2 * ((size_t)hdr->cparam.sup_blk_min_data_ptrs - 1);
iblock->nsblk_addrs = hdr->nsblks - iblock->nsblks;
#ifdef QAK
HDfprintf(stderr, "%s: iblock->nsblks = %u\n", FUNC, iblock->nsblks);
HDfprintf(stderr, "%s: iblock->ndblk_addrs = %Zu\n", FUNC, iblock->ndblk_addrs);
HDfprintf(stderr, "%s: iblock->nsblk_addrs = %Zu\n", FUNC, iblock->nsblk_addrs);
#endif /* QAK */
/* Allocate buffer for elements in index block */
if(hdr->cparam.idx_blk_elmts > 0)
@ -169,7 +163,6 @@ END_FUNC(PKG) /* end H5EA__iblock_alloc() */
* Return: Valid file address on success/HADDR_UNDEF on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -183,10 +176,6 @@ H5EA__iblock_create(H5EA_hdr_t *hdr, hbool_t *stats_changed))
haddr_t iblock_addr; /* Extensible array index block address */
hbool_t inserted = FALSE; /* Whether the header was inserted into cache */
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
/* Sanity check */
HDassert(hdr);
HDassert(stats_changed);
@ -197,9 +186,6 @@ HDfprintf(stderr, "%s: Called\n", FUNC);
/* Set size of index block on disk */
iblock->size = H5EA_IBLOCK_SIZE(iblock);
#ifdef QAK
HDfprintf(stderr, "%s: iblock->size = %Zu\n", FUNC, iblock->size);
#endif /* QAK */
/* Allocate space for the index block on disk */
if(HADDR_UNDEF == (iblock_addr = H5MF_alloc(hdr->f, H5FD_MEM_EARRAY_IBLOCK, (hsize_t)iblock->size)))
@ -284,7 +270,6 @@ END_FUNC(PKG) /* end H5EA__iblock_create() */
* Return: Non-NULL pointer to index block on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -296,10 +281,6 @@ H5EA__iblock_protect(H5EA_hdr_t *hdr, unsigned flags))
/* Local variables */
H5EA_iblock_t *iblock = NULL; /* Pointer to index block */
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
/* Sanity check */
HDassert(hdr);
@ -340,7 +321,6 @@ END_FUNC(PKG) /* end H5EA__iblock_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -351,10 +331,6 @@ H5EA__iblock_unprotect(H5EA_iblock_t *iblock, unsigned cache_flags))
/* Local variables */
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
/* Sanity check */
HDassert(iblock);
@ -375,7 +351,6 @@ END_FUNC(PKG) /* end H5EA__iblock_unprotect() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 9 2008
*
*-------------------------------------------------------------------------
@ -387,10 +362,6 @@ H5EA__iblock_delete(H5EA_hdr_t *hdr))
/* Local variables */
H5EA_iblock_t *iblock = NULL; /* Pointer to index block */
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
/* Sanity check */
HDassert(hdr);
HDassert(H5F_addr_defined(hdr->idx_blk_addr));
@ -459,7 +430,6 @@ END_FUNC(PKG) /* end H5EA__iblock_delete() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Sep 11 2008
*
*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5EAint.c
* Jun 17 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Internal routines for extnsible arrays.
*
@ -86,7 +86,6 @@
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 26 2009
*
*-------------------------------------------------------------------------
@ -116,7 +115,6 @@ END_FUNC(PKG) /* end H5EA__create_flush_depend() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Mar 26 2009
*
*-------------------------------------------------------------------------

View File

@ -146,7 +146,7 @@
#define H5EA_SIZEOF_OFFSET_BITS(b) (((b) + 7) / 8)
/* Compute the first super block index that will hold a certain # of data block pointers */
#define H5EA_SBLK_FIRST_IDX(m) (2 * H5VM_log2_of2((uint32_t)m))
#define H5EA_SBLK_FIRST_IDX(m) (2 * H5VM__log2_of2((uint32_t)m))
/****************************/
/* Package Private Typedefs */

View File

@ -42,7 +42,7 @@
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
#include "H5MFprivate.h" /* File memory management */
#include "H5VMprivate.h" /* Vectors and arrays */
#include "H5VMprivate.h" /* Vectors and arrays */
/****************/

View File

@ -15,7 +15,7 @@
*
* Created: H5EAstat.c
* Sep 11 2008
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Extensible array metadata statistics functions.
*
@ -87,7 +87,6 @@
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 21 2008
*
*-------------------------------------------------------------------------
@ -98,10 +97,6 @@ H5EA_get_stats(const H5EA_t *ea, H5EA_stat_t *stats))
/* Local variables */
#ifdef QAK
HDfprintf(stderr, "%s: Called\n", FUNC);
#endif /* QAK */
/*
* Check arguments.
*/

View File

@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* Programmer: Quincey Koziol <koziol@hdfgroup.org>
/* Programmer: Quincey Koziol
* Thursday, August 28, 2008
*
* Purpose: Extensible array testing functions.
@ -38,7 +38,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5EApkg.h" /* Extensible Arrays */
#include "H5FLprivate.h" /* Free Lists */
#include "H5VMprivate.h" /* Vector functions */
#include "H5VMprivate.h" /* Vector functions */
/****************/

View File

@ -15,7 +15,7 @@
*
* Created: H5Edeprec.c
* April 11 2007
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Deprecated functions from the H5E interface. These
* functions are here for compatibility purposes and may be

View File

@ -15,7 +15,7 @@
*
* Created: H5Eint.c
* April 11 2007
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: General use, "internal" routines for error handling.
*

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Wednesday, April 11, 2007
*
* Purpose: This file contains declarations which are visible only within

View File

@ -15,7 +15,7 @@
*
* Created: H5FA.c
* April 2009
* Vailin Choi <vchoi@hdfgroup.org>
* Vailin Choi
*
* Purpose: Implements a Fixed Array for storing elements
* of datasets with fixed dimensions.
@ -112,7 +112,6 @@ H5FL_BLK_DEFINE(fa_native_elmt);
* NULL on failure
*
* Programmer: Quincey Koziol
* koziol@lbl.gov
* Oct 17 2016
*
*-------------------------------------------------------------------------
@ -396,13 +395,13 @@ H5FA_set(const H5FA_t *fa, hsize_t idx, const void *elmt))
dblk_page_nelmts = dblock->dblk_page_nelmts;
/* Check if the page has been created yet */
if(!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
if(!H5VM__bit_get(dblock->dblk_page_init, page_idx)) {
/* Create the data block page */
if(H5FA__dblk_page_create(hdr, dblk_page_addr, dblk_page_nelmts) < 0)
H5E_THROW(H5E_CANTCREATE, "unable to create data block page")
/* Mark data block page as initialized in data block */
H5VM_bit_set(dblock->dblk_page_init, page_idx, TRUE);
H5VM__bit_set(dblock->dblk_page_init, page_idx, TRUE);
dblock_cache_flags |= H5AC__DIRTIED_FLAG;
} /* end if */
@ -483,7 +482,7 @@ H5FA_get(const H5FA_t *fa, hsize_t idx, void *elmt))
page_idx = (size_t)(idx / dblock->dblk_page_nelmts);
/* Check if the page is defined yet */
if(!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
if(!H5VM__bit_get(dblock->dblk_page_init, page_idx)) {
/* Call the class's 'fill' callback */
if((hdr->cparam.cls->fill)(elmt, (size_t)1) < 0)
H5E_THROW(H5E_CANTSET, "can't set element to class's fill value")

View File

@ -15,7 +15,7 @@
*
* Created: H5FAcache.c
* Jul 2 2009
* Quincey Koziol <koziol@hdfgroup.org>
* Quincey Koziol
*
* Purpose: Implement fixed array metadata cache methods.
*
@ -180,7 +180,6 @@ const H5AC_class_t H5AC_FARRAY_DBLK_PAGE[1] = {{
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* July 31, 2013
*
*-------------------------------------------------------------------------
@ -246,7 +245,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@ -359,7 +357,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@ -389,7 +386,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@ -527,7 +523,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_notify() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@ -556,7 +551,6 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_free_icr() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 12, 2013
*
*-------------------------------------------------------------------------
@ -644,7 +638,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -744,7 +737,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -777,7 +769,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_image_len() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -924,7 +915,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_notify() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -1001,7 +991,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_fsf_size() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -1068,7 +1057,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_verify_chksum() */
* Failure: NULL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -1141,7 +1129,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_deserialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -1171,7 +1158,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */
* Return: SUCCEED/FAIL
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------
@ -1223,7 +1209,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_serialize() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@lbl.gov
* Oct 17 2016
*
*-------------------------------------------------------------------------
@ -1286,7 +1271,6 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_notify() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* August 14, 2013
*
*-------------------------------------------------------------------------

View File

@ -229,7 +229,7 @@ H5FA__dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent,
/* Read and print each page's elements in the data block */
for(page_idx = 0; page_idx < dblock->npages; page_idx++) {
if(!H5VM_bit_get(dblock->dblk_page_init, page_idx)) {
if(!H5VM__bit_get(dblock->dblk_page_init, page_idx)) {
HDfprintf(stream, "%*s%-*s %Hu %s\n", indent, "", fwidth,
"Page %Zu:", page_idx, "empty");

View File

@ -414,7 +414,6 @@ END_FUNC(PKG) /* end H5FA__hdr_modified() */
* Return: Non-NULL pointer to header on success/NULL on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 12 2013
*
*-------------------------------------------------------------------------
@ -471,7 +470,6 @@ END_FUNC(PKG) /* end H5FA__hdr_protect() */
* Return: Non-negative on success/Negative on failure
*
* Programmer: Quincey Koziol
* koziol@hdfgroup.org
* Aug 12 2013
*
*-------------------------------------------------------------------------
@ -491,7 +489,7 @@ H5FA__hdr_unprotect(H5FA_hdr_t *hdr, unsigned cache_flags))
CATCH
END_FUNC(PKG) /* end H5EA__hdr_unprotect() */
END_FUNC(PKG) /* end H5FA__hdr_unprotect() */
/*-------------------------------------------------------------------------

View File

@ -15,7 +15,7 @@
*
* Created: H5FAint.c
* Fall 2012
* Dana Robinson <derobins@hdfgroup.org>
* Dana Robinson
*
* Purpose: Internal routines for fixed arrays.
*

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -35,9 +35,9 @@
/***********/
/* Headers */
/***********/
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5FApkg.h" /* Fixed Arrays */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5FApkg.h" /* Fixed Arrays */
#include "H5MMprivate.h" /* Memory management */

View File

@ -36,7 +36,7 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5FApkg.h" /* Fixed Arrays */
#include "H5FLprivate.h" /* Free Lists */
#include "H5VMprivate.h" /* Vector functions */
#include "H5VMprivate.h" /* Vector functions */
/****************/

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Tuesday, August 10, 1999
*
* Purpose: A driver which stores the HDF5 data in main memory using
@ -144,8 +144,8 @@ static herr_t H5FD__core_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, ha
size_t size, const void *buf);
static herr_t H5FD__core_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__core_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_core_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD_core_unlock(H5FD_t *_file);
static herr_t H5FD__core_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD__core_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_core_g = {
"core", /* name */
@ -177,8 +177,8 @@ static const H5FD_class_t H5FD_core_g = {
H5FD__core_write, /* write */
H5FD__core_flush, /* flush */
H5FD__core_truncate, /* truncate */
H5FD_core_lock, /* lock */
H5FD_core_unlock, /* unlock */
H5FD__core_lock, /* lock */
H5FD__core_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@ -345,7 +345,7 @@ H5FD__core_write_to_bstore(H5FD_core_t *file, haddr_t addr, size_t size)
HDoff_t offset = (HDoff_t)addr; /* Offset to write at */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
@ -414,7 +414,7 @@ H5FD__init_package(void)
{
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
if(H5FD_core_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "unable to initialize core VFD")
@ -1581,7 +1581,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_core_lock
* Function: H5FD__core_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@ -1595,13 +1595,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_core_lock(H5FD_t *_file, hbool_t rw)
H5FD__core_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
@ -1609,7 +1609,6 @@ H5FD_core_lock(H5FD_t *_file, hbool_t rw)
* descriptor, this is a no-op.
*/
if(file->fd >= 0) {
/* Set exclusive or shared lock based on rw status */
lock_flags = rw ? LOCK_EX : LOCK_SH;
@ -1620,16 +1619,15 @@ H5FD_core_lock(H5FD_t *_file, hbool_t rw)
else
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to lock file")
} /* end if */
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_lock() */
} /* end H5FD__core_lock() */
/*-------------------------------------------------------------------------
* Function: H5FD_core_unlock
* Function: H5FD__core_unlock
*
* Purpose: To remove the existing lock on the file
*
@ -1640,17 +1638,16 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_core_unlock(H5FD_t *_file)
H5FD__core_unlock(H5FD_t *_file)
{
H5FD_core_t *file = (H5FD_core_t*)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
if(file->fd >= 0) {
if(file->fd >= 0)
if(HDflock(file->fd, LOCK_UN) < 0) {
if(ENOSYS == errno)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "file locking disabled on this file system (use HDF5_USE_FILE_LOCKING environment variable to override)")
@ -1658,9 +1655,7 @@ H5FD_core_unlock(H5FD_t *_file)
HSYS_GOTO_ERROR(H5E_FILE, H5E_BADFILE, FAIL, "unable to unlock file")
} /* end if */
} /* end if */
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_core_unlock() */
} /* end H5FD__core_unlock() */

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the core driver.

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Purpose: The Direct I/O file driver forces the data to be written to
@ -23,15 +23,15 @@
#include "H5FDdrvr_module.h" /* This source code file is part of the H5FD driver module */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* File access */
#include "H5FDprivate.h" /* File drivers */
#include "H5FDdirect.h" /* Direct file driver */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fprivate.h" /* File access */
#include "H5FDprivate.h" /* File drivers */
#include "H5FDdirect.h" /* Direct file driver */
#include "H5FLprivate.h" /* Free Lists */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
#ifdef H5_HAVE_DIRECT
@ -109,69 +109,68 @@ typedef struct H5FD_direct_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
((A) & ~(haddr_t)MAXADDR))
#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
HADDR_UNDEF==(A)+(Z) || \
(HDoff_t)((A)+(Z))<(HDoff_t)(A))
#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
HADDR_UNDEF == (A) + (Z) || \
(HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
static herr_t H5FD_direct_term(void);
static void *H5FD_direct_fapl_get(H5FD_t *file);
static void *H5FD_direct_fapl_copy(const void *_old_fa);
static H5FD_t *H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id,
static herr_t H5FD__direct_term(void);
static void *H5FD__direct_fapl_get(H5FD_t *file);
static void *H5FD__direct_fapl_copy(const void *_old_fa);
static H5FD_t *H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
static herr_t H5FD_direct_close(H5FD_t *_file);
static int H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_direct_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_direct_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
static herr_t H5FD__direct_close(H5FD_t *_file);
static int H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD__direct_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD__direct_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__direct_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD__direct_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__direct_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD__direct_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
static herr_t H5FD_direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
static herr_t H5FD__direct_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, const void *buf);
static herr_t H5FD_direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_direct_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD_direct_unlock(H5FD_t *_file);
static herr_t H5FD__direct_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__direct_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD__direct_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_direct_g = {
"direct", /*name */
MAXADDR, /*maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
H5FD_direct_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
sizeof(H5FD_direct_fapl_t), /*fapl_size */
H5FD_direct_fapl_get, /*fapl_get */
H5FD_direct_fapl_copy, /*fapl_copy */
NULL, /*fapl_free */
0, /*dxpl_size */
NULL, /*dxpl_copy */
NULL, /*dxpl_free */
H5FD_direct_open, /*open */
H5FD_direct_close, /*close */
H5FD_direct_cmp, /*cmp */
H5FD_direct_query, /*query */
NULL, /*get_type_map */
NULL, /*alloc */
NULL, /*free */
H5FD_direct_get_eoa, /*get_eoa */
H5FD_direct_set_eoa, /*set_eoa */
H5FD_direct_get_eof, /*get_eof */
H5FD_direct_get_handle, /*get_handle */
H5FD_direct_read, /*read */
H5FD_direct_write, /*write */
NULL, /*flush */
H5FD_direct_truncate, /*truncate */
H5FD_direct_lock, /*lock */
H5FD_direct_unlock, /*unlock */
H5FD_FLMAP_DICHOTOMY /*fl_map */
"direct", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
H5FD__direct_term, /* terminate */
NULL, /* sb_size */
NULL, /* sb_encode */
NULL, /* sb_decode */
sizeof(H5FD_direct_fapl_t), /* fapl_size */
H5FD__direct_fapl_get, /* fapl_get */
H5FD__direct_fapl_copy, /* fapl_copy */
NULL, /* fapl_free */
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
H5FD__direct_open, /* open */
H5FD__direct_close, /* close */
H5FD__direct_cmp, /* cmp */
H5FD__direct_query, /* query */
NULL, /* get_type_map */
NULL, /* alloc */
NULL, /* free */
H5FD__direct_get_eoa, /* get_eoa */
H5FD__direct_set_eoa, /* set_eoa */
H5FD__direct_get_eof, /* get_eof */
H5FD__direct_get_handle, /* get_handle */
H5FD__direct_read, /* read */
H5FD__direct_write, /* write */
NULL, /* flush */
H5FD__direct_truncate, /* truncate */
H5FD__direct_lock, /* lock */
H5FD__direct_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Declare a free list to manage the H5FD_direct_t struct */
@ -238,7 +237,7 @@ done:
/*---------------------------------------------------------------------------
* Function: H5FD_direct_term
* Function: H5FD__direct_term
*
* Purpose: Shut down the VFD
*
@ -250,15 +249,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_term(void)
H5FD__direct_term(void)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_DIRECT_g=0;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_direct_term() */
} /* end H5FD__direct_term() */
/*-------------------------------------------------------------------------
@ -361,7 +360,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_direct_fapl_get
* Function: H5FD__direct_fapl_get
*
* Purpose: Returns a file access property list which indicates how the
* specified file is being accessed. The return list could be
@ -375,28 +374,26 @@ done:
* Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static void *
H5FD_direct_fapl_get(H5FD_t *_file)
H5FD__direct_fapl_get(H5FD_t *_file)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Set return value */
ret_value= H5FD_direct_fapl_copy(&(file->fa));
ret_value= H5FD__direct_fapl_copy(&(file->fa));
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_direct_fapl_get() */
} /* end H5FD__direct_fapl_get() */
/*-------------------------------------------------------------------------
* Function: H5FD_direct_fapl_copy
* Function: H5FD__direct_fapl_copy
*
* Purpose: Copies the direct-specific file access properties.
*
@ -407,17 +404,15 @@ done:
* Programmer: Raymond Lu
* Wednesday, 18 October 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static void *
H5FD_direct_fapl_copy(const void *_old_fa)
H5FD__direct_fapl_copy(const void *_old_fa)
{
const H5FD_direct_fapl_t *old_fa = (const H5FD_direct_fapl_t*)_old_fa;
H5FD_direct_fapl_t *new_fa = H5MM_calloc(sizeof(H5FD_direct_fapl_t));
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(new_fa);
@ -425,11 +420,11 @@ H5FD_direct_fapl_copy(const void *_old_fa)
H5MM_memcpy(new_fa, old_fa, sizeof(H5FD_direct_fapl_t));
FUNC_LEAVE_NOAPI(new_fa)
} /* end H5FD_direct_fapl_copy() */
} /* end H5FD__direct_fapl_copy() */
/*-------------------------------------------------------------------------
* Function: H5FD_direct_open
* Function: H5FD__direct_open
*
* Purpose: Create and/or opens a Unix file for direct I/O as an HDF5 file.
*
@ -442,12 +437,10 @@ H5FD_direct_fapl_copy(const void *_old_fa)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static H5FD_t *
H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
int o_flags;
int fd=(-1);
@ -462,7 +455,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd
void *buf1, *buf2;
H5FD_t *ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Sanity check on file offsets */
HDassert(sizeof(HDoff_t)>=sizeof(size_t));
@ -577,7 +570,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_direct_close
* Function: H5FD__direct_close
*
* Purpose: Closes the file.
*
@ -588,17 +581,15 @@ done:
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_close(H5FD_t *_file)
H5FD__direct_close(H5FD_t *_file)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
if (HDclose(file->fd)<0)
HSYS_GOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file")
@ -611,7 +602,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_direct_cmp
* Function: H5FD__direct_cmp
*
* Purpose: Compares two files belonging to this driver using an
* arbitrary (but consistent) ordering.
@ -624,18 +615,16 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static int
H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
H5FD__direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_direct_t *f1 = (const H5FD_direct_t*)_f1;
const H5FD_direct_t *f2 = (const H5FD_direct_t*)_f2;
int ret_value=0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
#ifdef H5_HAVE_WIN32_API
if (f1->fileindexhi < f2->fileindexhi) HGOTO_DONE(-1)
@ -668,7 +657,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_direct_query
* Function: H5FD__direct_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@ -680,14 +669,12 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out */)
H5FD__direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out */)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@ -704,7 +691,7 @@ H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out
/*-------------------------------------------------------------------------
* Function: H5FD_direct_get_eoa
* Function: H5FD__direct_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
* is the first address past the last byte allocated in the
@ -717,26 +704,21 @@ H5FD_direct_query(const H5FD_t H5_ATTR_UNUSED * _f, unsigned long *flags /* out
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
* Raymond Lu
* 21 Dec. 2006
* Added the parameter TYPE. It's only used for MULTI driver.
*
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD__direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
/*-------------------------------------------------------------------------
* Function: H5FD_direct_set_eoa
* Function: H5FD__direct_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@ -749,19 +731,14 @@ H5FD_direct_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
* Raymond Lu
* 21 Dec. 2006
* Added the parameter TYPE. It's only used for MULTI driver.
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
H5FD__direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
file->eoa = addr;
@ -770,7 +747,7 @@ H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
/*-------------------------------------------------------------------------
* Function: H5FD_direct_get_eof
* Function: H5FD__direct_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the Unix end-of-file or the HDF5 end-of-address
@ -785,16 +762,14 @@ H5FD_direct_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD__direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_direct_t *file = (const H5FD_direct_t*)_file;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
FUNC_LEAVE_NOAPI(file->eof)
}
@ -810,17 +785,15 @@ H5FD_direct_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Raymond Lu
* 21 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle)
H5FD__direct_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void** file_handle)
{
H5FD_direct_t *file = (H5FD_direct_t *)_file;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@ -832,7 +805,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_direct_read
* Function: H5FD__direct_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@ -846,12 +819,10 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
H5FD__direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, void *buf/*out*/)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
@ -867,7 +838,7 @@ H5FD_direct_read(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UN
size_t copy_size = size; /* Size remaining to read when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the requested data */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@ -1018,7 +989,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_direct_write
* Function: H5FD__direct_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@ -1031,12 +1002,10 @@ done:
* Programmer: Raymond Lu
* Thursday, 21 September 2006
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
H5FD__direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, const void *buf)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
@ -1055,7 +1024,7 @@ H5FD_direct_write(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, hid_t H5_ATTR_U
size_t copy_size = size; /* Size remaining to write when using copy buffer */
size_t copy_offset; /* Offset into copy buffer of the data to write */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@ -1253,7 +1222,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_direct_truncate
* Function: H5FD__direct_truncate
*
* Purpose: Makes sure that the true file size is the same (or larger)
* than the end-of-address.
@ -1268,12 +1237,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
H5FD__direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
@ -1314,11 +1283,11 @@ H5FD_direct_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATT
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_direct_truncate() */
} /* end H5FD__direct_truncate() */
/*-------------------------------------------------------------------------
* Function: H5FD_direct_lock
* Function: H5FD__direct_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@ -1332,13 +1301,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_lock(H5FD_t *_file, hbool_t rw)
H5FD__direct_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file; /* VFD file struct */
const int lock = rw ? LOCK_EX : LOCK_SH;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
@ -1348,11 +1317,11 @@ H5FD_direct_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_direct_lock() */
} /* end H5FD__direct_lock() */
/*-------------------------------------------------------------------------
* Function: H5FD_direct_unlock
* Function: H5FD__direct_unlock
*
* Purpose: To remove the existing lock on the file
*
@ -1363,12 +1332,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_direct_unlock(H5FD_t *_file)
H5FD__direct_unlock(H5FD_t *_file)
{
H5FD_direct_t *file = (H5FD_direct_t*)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
@ -1377,7 +1346,7 @@ H5FD_direct_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_direct_unlock() */
} /* end H5FD__direct_unlock() */
#endif /* H5_HAVE_DIRECT */

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Raymond Lu <slu@hdfgroup.uiuc.edu>
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
* Purpose: The public header file for the direct driver.

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Monday, November 10, 1997
*
* Purpose: Implements a family of files that acts as a single hdf5
@ -79,67 +79,67 @@ typedef struct H5FD_family_fapl_t {
} H5FD_family_fapl_t;
/* Callback prototypes */
static herr_t H5FD_family_term(void);
static void *H5FD_family_fapl_get(H5FD_t *_file);
static void *H5FD_family_fapl_copy(const void *_old_fa);
static herr_t H5FD_family_fapl_free(void *_fa);
static hsize_t H5FD_family_sb_size(H5FD_t *_file);
static herr_t H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/,
static herr_t H5FD__family_term(void);
static void *H5FD__family_fapl_get(H5FD_t *_file);
static void *H5FD__family_fapl_copy(const void *_old_fa);
static herr_t H5FD__family_fapl_free(void *_fa);
static hsize_t H5FD__family_sb_size(H5FD_t *_file);
static herr_t H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/,
unsigned char *buf/*out*/);
static herr_t H5FD_family_sb_decode(H5FD_t *_file, const char *name,
static herr_t H5FD__family_sb_decode(H5FD_t *_file, const char *name,
const unsigned char *buf);
static H5FD_t *H5FD_family_open(const char *name, unsigned flags,
static H5FD_t *H5FD__family_open(const char *name, unsigned flags,
hid_t fapl_id, haddr_t maxaddr);
static herr_t H5FD_family_close(H5FD_t *_file);
static int H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_family_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
static haddr_t H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
static herr_t H5FD__family_close(H5FD_t *_file);
static int H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD__family_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa);
static haddr_t H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, void *_buf/*out*/);
static herr_t H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
static herr_t H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
size_t size, const void *_buf);
static herr_t H5FD_family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_family_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD_family_unlock(H5FD_t *_file);
static herr_t H5FD__family_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__family_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__family_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD__family_unlock(H5FD_t *_file);
/* The class struct */
static const H5FD_class_t H5FD_family_g = {
"family", /*name */
HADDR_MAX, /*maxaddr */
H5F_CLOSE_WEAK, /*fc_degree */
H5FD_family_term, /*terminate */
H5FD_family_sb_size, /*sb_size */
H5FD_family_sb_encode, /*sb_encode */
H5FD_family_sb_decode, /*sb_decode */
sizeof(H5FD_family_fapl_t), /*fapl_size */
H5FD_family_fapl_get, /*fapl_get */
H5FD_family_fapl_copy, /*fapl_copy */
H5FD_family_fapl_free, /*fapl_free */
0, /*dxpl_size */
NULL, /*dxpl_copy */
NULL, /*dxpl_free */
H5FD_family_open, /*open */
H5FD_family_close, /*close */
H5FD_family_cmp, /*cmp */
H5FD_family_query, /*query */
NULL, /*get_type_map */
NULL, /*alloc */
NULL, /*free */
H5FD_family_get_eoa, /*get_eoa */
H5FD_family_set_eoa, /*set_eoa */
H5FD_family_get_eof, /*get_eof */
H5FD_family_get_handle, /*get_handle */
H5FD_family_read, /*read */
H5FD_family_write, /*write */
H5FD_family_flush, /*flush */
H5FD_family_truncate, /*truncate */
H5FD_family_lock, /*lock */
H5FD_family_unlock, /*unlock */
H5FD_FLMAP_DICHOTOMY /*fl_map */
"family", /* name */
HADDR_MAX, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
H5FD__family_term, /* terminate */
H5FD__family_sb_size, /* sb_size */
H5FD__family_sb_encode, /* sb_encode */
H5FD__family_sb_decode, /* sb_decode */
sizeof(H5FD_family_fapl_t), /* fapl_size */
H5FD__family_fapl_get, /* fapl_get */
H5FD__family_fapl_copy, /* fapl_copy */
H5FD__family_fapl_free, /* fapl_free */
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
H5FD__family_open, /* open */
H5FD__family_close, /* close */
H5FD__family_cmp, /* cmp */
H5FD__family_query, /* query */
NULL, /* get_type_map */
NULL, /* alloc */
NULL, /* free */
H5FD__family_get_eoa, /* get_eoa */
H5FD__family_set_eoa, /* set_eoa */
H5FD__family_get_eof, /* get_eof */
H5FD__family_get_handle, /* get_handle */
H5FD__family_read, /* read */
H5FD__family_write, /* write */
H5FD__family_flush, /* flush */
H5FD__family_truncate, /* truncate */
H5FD__family_lock, /* lock */
H5FD__family_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
@ -203,7 +203,7 @@ done:
/*---------------------------------------------------------------------------
* Function: H5FD_family_term
* Function: H5FD__family_term
*
* Purpose: Shut down the VFD
*
@ -215,15 +215,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
H5FD_family_term(void)
H5FD__family_term(void)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_FAMILY_g=0;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_family_term() */
} /* end H5FD__family_term() */
/*-------------------------------------------------------------------------
@ -242,13 +242,6 @@ H5FD_family_term(void)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
* Raymond Lu
* Tuesday, Oct 23, 2001
* Changed the file access list to the new generic property
* list.
*
*-------------------------------------------------------------------------
*/
herr_t
@ -296,13 +289,6 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
* Raymond Lu
* Tuesday, Oct 23, 2001
* Changed the file access list to the new generic property
* list.
*
*-------------------------------------------------------------------------
*/
herr_t
@ -335,7 +321,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_family_fapl_get
* Function: H5FD__family_fapl_get
*
* Purpose: Gets a file access property list which could be used to
* create an identical file.
@ -347,19 +333,17 @@ done:
* Programmer: Robb Matzke
* Friday, August 13, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static void *
H5FD_family_fapl_get(H5FD_t *_file)
H5FD__family_fapl_get(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
H5FD_family_fapl_t *fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
if(NULL == (fa = (H5FD_family_fapl_t *)H5MM_calloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@ -373,16 +357,16 @@ H5FD_family_fapl_get(H5FD_t *_file)
ret_value=fa;
done:
if(ret_value==NULL) {
if(ret_value==NULL)
if(fa!=NULL)
H5MM_xfree(fa);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
* Function: H5FD_family_fapl_copy
* Function: H5FD__family_fapl_copy
*
* Purpose: Copies the family-specific file access properties.
*
@ -393,19 +377,17 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static void *
H5FD_family_fapl_copy(const void *_old_fa)
H5FD__family_fapl_copy(const void *_old_fa)
{
const H5FD_family_fapl_t *old_fa = (const H5FD_family_fapl_t*)_old_fa;
H5FD_family_fapl_t *new_fa = NULL;
H5P_genplist_t *plist; /* Property list pointer */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
if(NULL == (new_fa = (H5FD_family_fapl_t *)H5MM_malloc(sizeof(H5FD_family_fapl_t))))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
@ -428,16 +410,16 @@ H5FD_family_fapl_copy(const void *_old_fa)
ret_value=new_fa;
done:
if(ret_value==NULL) {
if(ret_value==NULL)
if(new_fa!=NULL)
H5MM_xfree(new_fa);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
* Function: H5FD_family_fapl_free
* Function: H5FD__family_fapl_free
*
* Purpose: Frees the family-specific file access properties.
*
@ -448,17 +430,15 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_fapl_free(void *_fa)
H5FD__family_fapl_free(void *_fa)
{
H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
if(H5I_dec_ref(fa->memb_fapl_id) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTDEC, FAIL, "can't close driver ID")
@ -470,7 +450,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_family_sb_size
* Function: H5FD__family_sb_size
*
* Purpose: Returns the size of the private information to be stored in
* the superblock.
@ -482,14 +462,12 @@ done:
* Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static hsize_t
H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
H5FD__family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* 8 bytes field for the size of member file size field should be
* enough for now. */
@ -498,7 +476,7 @@ H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
/*-------------------------------------------------------------------------
* Function: H5FD_family_sb_encode
* Function: H5FD__family_sb_encode
*
* Purpose: Encode driver information for the superblock. The NAME
* argument is a nine-byte buffer which will be initialized with
@ -513,16 +491,14 @@ H5FD_family_sb_size(H5FD_t H5_ATTR_UNUSED *_file)
* Programmer: Raymond Lu
* Tuesday, May 10, 2005
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
H5FD__family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*/)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Name and version number */
HDstrncpy(name, "NCSAfami", (size_t)9);
@ -532,18 +508,18 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
* This is to guarantee backward compatibility. If a file is created with
* v1.6 library and the driver info isn't saved in the superblock. We open
* it with v1.8, the FILE->MEMB_SIZE will be the actual size of the first
* member file (see H5FD_family_open). So it isn't safe to use FILE->MEMB_SIZE.
* member file (see H5FD__family_open). So it isn't safe to use FILE->MEMB_SIZE.
* If the file is created with v1.8, the correctness of FILE->PMEM_SIZE is
* checked in H5FD_family_sb_decode. SLU - 2009/3/21
* checked in H5FD__family_sb_decode. SLU - 2009/3/21
*/
UINT64ENCODE(buf, (uint64_t)file->pmem_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_family_sb_encode() */
} /* end H5FD__family_sb_encode() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_sb_decode
* Function: H5FD__family_sb_decode
*
* Purpose: This function has 2 separate purpose. One is to decodes the
* superblock information for this driver. The NAME argument is
@ -561,13 +537,13 @@ H5FD_family_sb_encode(H5FD_t *_file, char *name/*out*/, unsigned char *buf/*out*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
H5FD__family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsigned char *buf)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
uint64_t msize;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Read member file size. Skip name template for now although it's saved. */
UINT64DECODE(buf, msize);
@ -594,11 +570,11 @@ H5FD_family_sb_decode(H5FD_t *_file, const char H5_ATTR_UNUSED *name, const unsi
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_sb_decode() */
} /* end H5FD__family_sb_decode() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_open
* Function: H5FD__family_open
*
* Purpose: Creates and/or opens a family of files as an HDF5 file.
*
@ -621,7 +597,7 @@ done:
*/
H5_GCC_DIAG_OFF(format-nonliteral)
static H5FD_t *
H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr)
{
H5FD_family_t *file = NULL;
@ -630,7 +606,7 @@ H5FD_family_open(const char *name, unsigned flags, hid_t fapl_id,
unsigned t_flags = flags & ~H5F_ACC_CREAT;
H5FD_t *ret_value = NULL;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Check arguments */
if(!name || !*name)
@ -769,12 +745,12 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_open() */
} /* end H5FD__family_open() */
H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
* Function: H5FD_family_close
* Function: H5FD__family_close
*
* Purpose: Closes a family of files.
*
@ -790,14 +766,14 @@ H5_GCC_DIAG_ON(format-nonliteral)
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_close(H5FD_t *_file)
H5FD__family_close(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned nerrors = 0; /* Number of errors while closing member files */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Close as many members as possible. Use private function here to avoid clearing
* the error stack. We need the error message to indicate wrong member file size. */
@ -822,11 +798,11 @@ H5FD_family_close(H5FD_t *_file)
H5MM_xfree(file);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_close() */
} /* end H5FD__family_close() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_cmp
* Function: H5FD__family_cmp
*
* Purpose: Compares two file families to see if they are the same. It
* does this by comparing the first member of the two families.
@ -839,18 +815,16 @@ H5FD_family_close(H5FD_t *_file)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static int
H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
H5FD__family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_family_t *f1 = (const H5FD_family_t*)_f1;
const H5FD_family_t *f2 = (const H5FD_family_t*)_f2;
int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(f1->nmembs >= 1 && f1->memb[0]);
HDassert(f2->nmembs >= 1 && f2->memb[0]);
@ -858,11 +832,11 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
ret_value = H5FDcmp(f1->memb[0], f2->memb[0]);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_cmp() */
} /* end H5FD__family_cmp() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_query
* Function: H5FD__family_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@ -876,11 +850,11 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
H5FD__family_query(const H5FD_t * _file, unsigned long *flags /* out */)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file; /* Family VFD info */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@ -896,11 +870,11 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_family_query() */
} /* end H5FD__family_query() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_get_eoa
* Function: H5FD__family_get_eoa
*
* Purpose: Returns the end-of-address marker for the file. The EOA
* marker is the first address past the last byte allocated in
@ -913,26 +887,21 @@ H5FD_family_query(const H5FD_t * _file, unsigned long *flags /* out */)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
* Raymond Lu
* 21 Dec. 2006
* Added the parameter TYPE. It's only used for MULTI driver.
*
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD__family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
}
/*-------------------------------------------------------------------------
* Function: H5FD_family_set_eoa
* Function: H5FD__family_set_eoa
*
* Purpose: Set the end-of-address marker for the file.
*
@ -943,11 +912,6 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
* Raymond Lu
* 21 Dec. 2006
* Added the parameter TYPE. It's only used for MULTI driver.
*
*-------------------------------------------------------------------------
*/
/* Disable warning for "format not a string literal" here -QAK */
@ -958,7 +922,7 @@ H5FD_family_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*/
H5_GCC_DIAG_OFF(format-nonliteral)
static herr_t
H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
haddr_t addr = abs_eoa;
@ -966,7 +930,7 @@ H5FD_family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Allocate space for the member name buffer */
if(NULL == (memb_name = (char *)H5MM_malloc(H5FD_FAM_MEMB_NAME_BUF_SIZE)))
@ -1027,7 +991,7 @@ H5_GCC_DIAG_ON(format-nonliteral)
/*-------------------------------------------------------------------------
* Function: H5FD_family_get_eof
* Function: H5FD__family_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the total family size or the current EOA marker.
@ -1041,19 +1005,17 @@ H5_GCC_DIAG_ON(format-nonliteral)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
H5FD__family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
const H5FD_family_t *file = (const H5FD_family_t*)_file;
haddr_t eof=0;
int i; /* Local index variable */
haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/*
* Find the last member that has a non-zero EOF and break out of the loop
@ -1085,7 +1047,7 @@ H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
/*-------------------------------------------------------------------------
* Function: H5FD_family_get_handle
* Function: H5FD__family_get_handle
*
* Purpose: Returns the file handle of FAMILY file driver.
*
@ -1094,12 +1056,10 @@ H5FD_family_get_eof(const H5FD_t *_file, H5FD_mem_t type)
* Programmer: Raymond Lu
* Sept. 16, 2002
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
{
H5FD_family_t *file = (H5FD_family_t *)_file;
H5P_genplist_t *plist;
@ -1107,7 +1067,7 @@ H5FD_family_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle)
int memb;
herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Get the plist structure and family offset */
if(NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
@ -1127,7 +1087,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_family_read
* Function: H5FD__family_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@ -1141,12 +1101,10 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
H5FD__family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
void *_buf/*out*/)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
@ -1158,7 +1116,7 @@ H5FD_family_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, si
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/*
* Get the member data transfer property list. If the transfer property
@ -1197,7 +1155,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_family_write
* Function: H5FD__family_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@ -1210,12 +1168,10 @@ done:
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
H5FD__family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size,
const void *_buf)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
@ -1227,7 +1183,7 @@ H5FD_family_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, s
H5P_genplist_t *plist; /* Property list pointer */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/*
* Get the member data transfer property list. If the transfer property
@ -1266,7 +1222,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_family_flush
* Function: H5FD__family_flush
*
* Purpose: Flushes all family members.
*
@ -1279,13 +1235,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
H5FD__family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_flush(file->memb[u], closing) < 0)
@ -1296,11 +1252,11 @@ H5FD_family_flush(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_flush() */
} /* end H5FD__family_flush() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_truncate
* Function: H5FD__family_truncate
*
* Purpose: Truncates all family members.
*
@ -1314,13 +1270,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
H5FD__family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
unsigned u, nerrors = 0;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
for(u = 0; u < file->nmembs; u++)
if(file->memb[u] && H5FD_truncate(file->memb[u], closing) < 0)
@ -1331,11 +1287,11 @@ H5FD_family_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closin
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_truncate() */
} /* end H5FD__family_truncate() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_lock
* Function: H5FD__family_lock
*
* Purpose: To place an advisory lock on a file.
* The lock type to apply depends on the parameter "rw":
@ -1349,13 +1305,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_lock(H5FD_t *_file, hbool_t rw)
H5FD__family_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Place the lock on all the member files */
for(u = 0; u < file->nmembs; u++)
@ -1379,11 +1335,11 @@ H5FD_family_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_lock() */
} /* end H5FD__family_lock() */
/*-------------------------------------------------------------------------
* Function: H5FD_family_unlock
* Function: H5FD__family_unlock
*
* Purpose: To remove the existing lock on the file
*
@ -1394,13 +1350,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_unlock(H5FD_t *_file)
H5FD__family_unlock(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t *)_file; /* VFD file struct */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Remove the lock on the member files */
for(u = 0; u < file->nmembs; u++)
@ -1410,5 +1366,5 @@ H5FD_family_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_family_unlock() */
} /* end H5FD__family_unlock() */

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Monday, August 4, 1999
*
* Purpose: The public header file for the family driver.

File diff suppressed because it is too large Load Diff

View File

@ -22,8 +22,13 @@
#ifndef H5FDhdfs_H
#define H5FDhdfs_H
#define H5FD_HDFS (H5FD_hdfs_init())
#ifdef H5_HAVE_LIBHDFS
#define H5FD_HDFS (H5FD_hdfs_init())
#else /* H5_HAVE_LIBHDFS */
#define H5FD_HDFS (-1)
#endif /* H5_HAVE_LIBHDFS */
#ifdef H5_HAVE_LIBHDFS
#ifdef __cplusplus
extern "C" {
#endif
@ -90,8 +95,6 @@ extern "C" {
* Programmer: Jacob Smith
* 2018-04-23
*
* Changes: None
*
****************************************************************************/
#define H5FD__CURR_HDFS_FAPL_T_VERSION 1
@ -116,7 +119,7 @@ H5_DLL herr_t H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa);
#ifdef __cplusplus
}
#endif
#endif /* H5_HAVE_LIBHDFS */
#endif /* ifndef H5FDhdfs_H */

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Monday, April 17, 2000
*
* Purpose: The POSIX unbuffered file driver using only the HDF5 public
@ -151,71 +151,71 @@ typedef struct H5FD_log_t {
* which can be addressed entirely by the second
* argument of the file seek function.
*/
#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || ((A) & ~(haddr_t)MAXADDR))
#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
#define ADDR_OVERFLOW(A) (HADDR_UNDEF == (A) || ((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
#define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \
HADDR_UNDEF==(A)+(Z) || \
(HDoff_t)((A)+(Z))<(HDoff_t)(A))
HADDR_UNDEF == (A) + (Z) || \
(HDoff_t)((A) + (Z)) < (HDoff_t)(A))
/* Prototypes */
static herr_t H5FD_log_term(void);
static void *H5FD_log_fapl_get(H5FD_t *file);
static void *H5FD_log_fapl_copy(const void *_old_fa);
static herr_t H5FD_log_fapl_free(void *_fa);
static H5FD_t *H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id,
static herr_t H5FD__log_term(void);
static void *H5FD__log_fapl_get(H5FD_t *file);
static void *H5FD__log_fapl_copy(const void *_old_fa);
static herr_t H5FD__log_fapl_free(void *_fa);
static H5FD_t *H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
static herr_t H5FD_log_close(H5FD_t *_file);
static int H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD_log_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static herr_t H5FD__log_close(H5FD_t *_file);
static int H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2);
static herr_t H5FD__log_query(const H5FD_t *_f1, unsigned long *flags);
static haddr_t H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size);
static herr_t H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
hsize_t size);
static haddr_t H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD_log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
static haddr_t H5FD__log_get_eoa(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr);
static haddr_t H5FD__log_get_eof(const H5FD_t *_file, H5FD_mem_t type);
static herr_t H5FD__log_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle);
static herr_t H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, void *buf);
static herr_t H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
static herr_t H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, const void *buf);
static herr_t H5FD_log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD_log_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD_log_unlock(H5FD_t *_file);
static herr_t H5FD__log_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing);
static herr_t H5FD__log_lock(H5FD_t *_file, hbool_t rw);
static herr_t H5FD__log_unlock(H5FD_t *_file);
static const H5FD_class_t H5FD_log_g = {
"log", /*name */
MAXADDR, /*maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
H5FD_log_term, /*terminate */
NULL, /*sb_size */
NULL, /*sb_encode */
NULL, /*sb_decode */
sizeof(H5FD_log_fapl_t), /*fapl_size */
H5FD_log_fapl_get, /*fapl_get */
H5FD_log_fapl_copy, /*fapl_copy */
H5FD_log_fapl_free, /*fapl_free */
0, /*dxpl_size */
NULL, /*dxpl_copy */
NULL, /*dxpl_free */
H5FD_log_open, /*open */
H5FD_log_close, /*close */
H5FD_log_cmp, /*cmp */
H5FD_log_query, /*query */
NULL, /*get_type_map */
H5FD_log_alloc, /*alloc */
H5FD__log_free, /*free */
H5FD_log_get_eoa, /*get_eoa */
H5FD_log_set_eoa, /*set_eoa */
H5FD_log_get_eof, /*get_eof */
H5FD_log_get_handle, /*get_handle */
H5FD_log_read, /*read */
H5FD_log_write, /*write */
NULL, /*flush */
H5FD_log_truncate, /*truncate */
H5FD_log_lock, /*lock */
H5FD_log_unlock, /*unlock */
H5FD_FLMAP_DICHOTOMY /*fl_map */
"log", /* name */
MAXADDR, /* maxaddr */
H5F_CLOSE_WEAK, /* fc_degree */
H5FD__log_term, /* terminate */
NULL, /* sb_size */
NULL, /* sb_encode */
NULL, /* sb_decode */
sizeof(H5FD_log_fapl_t), /* fapl_size */
H5FD__log_fapl_get, /* fapl_get */
H5FD__log_fapl_copy, /* fapl_copy */
H5FD__log_fapl_free, /* fapl_free */
0, /* dxpl_size */
NULL, /* dxpl_copy */
NULL, /* dxpl_free */
H5FD__log_open, /* open */
H5FD__log_close, /* close */
H5FD__log_cmp, /* cmp */
H5FD__log_query, /* query */
NULL, /* get_type_map */
H5FD__log_alloc, /* alloc */
H5FD__log_free, /* free */
H5FD__log_get_eoa, /* get_eoa */
H5FD__log_set_eoa, /* set_eoa */
H5FD__log_get_eof, /* get_eof */
H5FD__log_get_handle, /* get_handle */
H5FD__log_read, /* read */
H5FD__log_write, /* write */
NULL, /* flush */
H5FD__log_truncate, /* truncate */
H5FD__log_lock, /* lock */
H5FD__log_unlock, /* unlock */
H5FD_FLMAP_DICHOTOMY /* fl_map */
};
/* Declare a free list to manage the H5FD_log_t struct */
@ -279,7 +279,7 @@ done:
/*---------------------------------------------------------------------------
* Function: H5FD_log_term
* Function: H5FD__log_term
*
* Purpose: Shut down the VFD
*
@ -291,15 +291,15 @@ done:
*---------------------------------------------------------------------------
*/
static herr_t
H5FD_log_term(void)
H5FD__log_term(void)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Reset VFL ID */
H5FD_LOG_g = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_term() */
} /* end H5FD__log_term() */
/*-------------------------------------------------------------------------
@ -352,7 +352,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5FD_log_fapl_get
* Function: H5FD__log_fapl_get
*
* Purpose: Returns a file access property list which indicates how the
* specified file is being accessed. The return list could be
@ -368,22 +368,22 @@ done:
*-------------------------------------------------------------------------
*/
static void *
H5FD_log_fapl_get(H5FD_t *_file)
H5FD__log_fapl_get(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Set return value */
ret_value = H5FD_log_fapl_copy(&(file->fa));
ret_value = H5FD__log_fapl_copy(&(file->fa));
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_fapl_get() */
} /* end H5FD__log_fapl_get() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_fapl_copy
* Function: H5FD__log_fapl_copy
*
* Purpose: Copies the log-specific file access properties.
*
@ -396,13 +396,13 @@ H5FD_log_fapl_get(H5FD_t *_file)
*-------------------------------------------------------------------------
*/
static void *
H5FD_log_fapl_copy(const void *_old_fa)
H5FD__log_fapl_copy(const void *_old_fa)
{
const H5FD_log_fapl_t *old_fa = (const H5FD_log_fapl_t*)_old_fa;
H5FD_log_fapl_t *new_fa = NULL; /* New FAPL info */
void *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(old_fa);
@ -430,11 +430,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_fapl_copy() */
} /* end H5FD__log_fapl_copy() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_fapl_free
* Function: H5FD__log_fapl_free
*
* Purpose: Frees the log-specific file access properties.
*
@ -446,11 +446,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_fapl_free(void *_fa)
H5FD__log_fapl_free(void *_fa)
{
H5FD_log_fapl_t *fa = (H5FD_log_fapl_t*)_fa;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Free the fapl information */
if(fa->logfile)
@ -458,11 +458,11 @@ H5FD_log_fapl_free(void *_fa)
H5MM_xfree(fa);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_fapl_free() */
} /* end H5FD__log_fapl_free() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_open
* Function: H5FD__log_open
*
* Purpose: Create and/or opens a file as an HDF5 file.
*
@ -477,7 +477,7 @@ H5FD_log_fapl_free(void *_fa)
*-------------------------------------------------------------------------
*/
static H5FD_t *
H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
{
H5FD_log_t *file = NULL;
H5P_genplist_t *plist; /* Property list */
@ -492,7 +492,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
h5_stat_t sb;
H5FD_t *ret_value = NULL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Sanity check on file offsets */
HDcompile_assert(sizeof(HDoff_t) >= sizeof(size_t));
@ -649,11 +649,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_open() */
} /* end H5FD__log_open() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_close
* Function: H5FD__log_close
*
* Purpose: Closes an HDF5 file.
*
@ -666,13 +666,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_close(H5FD_t *_file)
H5FD__log_close(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
H5_timer_t close_timer; /* Timer for close() call */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Sanity check */
HDassert(file);
@ -794,11 +794,11 @@ H5FD_log_close(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_close() */
} /* end H5FD__log_close() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_cmp
* Function: H5FD__log_cmp
*
* Purpose: Compares two files belonging to this driver using an
* arbitrary (but consistent) ordering.
@ -813,13 +813,13 @@ done:
*-------------------------------------------------------------------------
*/
static int
H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
H5FD__log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
{
const H5FD_log_t *f1 = (const H5FD_log_t *)_f1;
const H5FD_log_t *f2 = (const H5FD_log_t *)_f2;
int ret_value = 0;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
#ifdef H5_HAVE_WIN32_API
if(f1->dwVolumeSerialNumber < f2->dwVolumeSerialNumber) HGOTO_DONE(-1)
@ -850,11 +850,11 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_cmp() */
} /* end H5FD__log_cmp() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_query
* Function: H5FD__log_query
*
* Purpose: Set the flags that this VFL driver is capable of supporting.
* (listed in H5FDpublic.h)
@ -867,11 +867,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
H5FD__log_query(const H5FD_t *_file, unsigned long *flags /* out */)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Set the VFL feature flags that this driver supports */
if(flags) {
@ -890,11 +890,11 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_query() */
} /* end H5FD__log_query() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_alloc
* Function: H5FD__log_alloc
*
* Purpose: Allocate file memory.
*
@ -907,13 +907,13 @@ H5FD_log_query(const H5FD_t *_file, unsigned long *flags /* out */)
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsize_t size)
H5FD__log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsize_t size)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
haddr_t addr;
haddr_t ret_value = HADDR_UNDEF; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Compute the address for the block to allocate */
addr = file->eoa;
@ -937,7 +937,7 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hsi
ret_value = addr;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_alloc() */
} /* end H5FD__log_alloc() */
/*-------------------------------------------------------------------------
@ -978,7 +978,7 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
/*-------------------------------------------------------------------------
* Function: H5FD_log_get_eoa
* Function: H5FD__log_get_eoa
*
* Purpose: Gets the end-of-address marker for the file. The EOA marker
* is the first address past the last byte allocated in the
@ -993,18 +993,18 @@ H5FD__log_free(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD__log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eoa)
} /* end H5FD_log_get_eoa() */
} /* end H5FD__log_get_eoa() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_set_eoa
* Function: H5FD__log_set_eoa
*
* Purpose: Set the end-of-address marker for the file. This function is
* called shortly after an existing HDF5 file is opened in order
@ -1018,11 +1018,11 @@ H5FD_log_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
H5FD__log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
if(file->fa.flags != 0) {
/* Check for increasing file size */
@ -1061,11 +1061,11 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
file->eoa = addr;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD_log_set_eoa() */
} /* end H5FD__log_set_eoa() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_get_eof
* Function: H5FD__log_get_eof
*
* Purpose: Returns the end-of-file marker, which is the greater of
* either the filesystem end-of-file or the HDF5 end-of-address
@ -1082,18 +1082,18 @@ H5FD_log_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr)
*-------------------------------------------------------------------------
*/
static haddr_t
H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
H5FD__log_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_log_t *file = (const H5FD_log_t *)_file;
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
FUNC_LEAVE_NOAPI(file->eof)
} /* end H5FD_log_get_eof() */
} /* end H5FD__log_get_eof() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_get_handle
* Function: H5FD__log_get_handle
*
* Purpose: Returns the file handle of LOG file driver.
*
@ -1105,12 +1105,12 @@ H5FD_log_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
H5FD__log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED;
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
if(!file_handle)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid")
@ -1119,11 +1119,11 @@ H5FD_log_get_handle(H5FD_t *_file, hid_t H5_ATTR_UNUSED fapl, void **file_handle
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_get_handle() */
} /* end H5FD__log_get_handle() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_read
* Function: H5FD__log_read
*
* Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR
* into buffer BUF according to data transfer properties in
@ -1139,7 +1139,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
H5FD__log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, void *buf/*out*/)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
@ -1154,7 +1154,7 @@ H5FD_log_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, hadd
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(buf);
@ -1325,11 +1325,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_read() */
} /* end H5FD__log_read() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_write
* Function: H5FD__log_write
*
* Purpose: Writes SIZE bytes of data to FILE beginning at address ADDR
* from buffer BUF according to data transfer properties in
@ -1343,7 +1343,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
H5FD__log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr,
size_t size, const void *buf)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
@ -1358,7 +1358,7 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, had
HDoff_t offset = (HDoff_t)addr;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file && file->pub.cls);
HDassert(size > 0);
@ -1531,11 +1531,11 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_write() */
} /* end H5FD__log_write() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_truncate
* Function: H5FD__log_truncate
*
* Purpose: Makes sure that the true file size is the same (or larger)
* than the end-of-address.
@ -1548,12 +1548,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
H5FD__log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_UNUSED closing)
{
H5FD_log_t *file = (H5FD_log_t *)_file;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
@ -1639,11 +1639,11 @@ H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_U
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_truncate() */
} /* end H5FD__log_truncate() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_lock
* Function: H5FD__log_lock
*
* Purpose: Place a lock on the file
*
@ -1655,13 +1655,13 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_lock(H5FD_t *_file, hbool_t rw)
H5FD__log_lock(H5FD_t *_file, hbool_t rw)
{
H5FD_log_t *file = (H5FD_log_t *)_file; /* VFD file struct */
int lock_flags; /* file locking flags */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Sanity check */
HDassert(file);
@ -1679,11 +1679,11 @@ H5FD_log_lock(H5FD_t *_file, hbool_t rw)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_lock() */
} /* end H5FD__log_lock() */
/*-------------------------------------------------------------------------
* Function: H5FD_log_unlock
* Function: H5FD__log_unlock
*
* Purpose: Remove the existing lock on the file
*
@ -1694,12 +1694,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_unlock(H5FD_t *_file)
H5FD__log_unlock(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t *)_file; /* VFD file struct */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
HDassert(file);
@ -1712,5 +1712,5 @@ H5FD_log_unlock(H5FD_t *_file)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_log_unlock() */
} /* end H5FD__log_unlock() */

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Programmer: Quincey Koziol
* Monday, April 17, 2000
*
* Purpose: The public header file for the log driver.

File diff suppressed because it is too large Load Diff

View File

@ -65,297 +65,6 @@ H5_DLL hid_t H5FD_mirror_init(void);
H5_DLL herr_t H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_out);
H5_DLL herr_t H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa);
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
* IPC - Mirror VFD and Remote Worker application.
* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
*/
/* The maximum allowed size for a receiving buffer when accepting bytes to
* write. Writes larger than this size are performed by multiple accept-write
* steps by the Writer. */
#define H5FD_MIRROR_DATA_BUFFER_MAX H5_GB /* 1 Gigabyte */
#define H5FD_MIRROR_XMIT_CURR_VERSION 1
#define H5FD_MIRROR_XMIT_MAGIC 0x87F8005B
#define H5FD_MIRROR_OP_OPEN 1
#define H5FD_MIRROR_OP_CLOSE 2
#define H5FD_MIRROR_OP_WRITE 3
#define H5FD_MIRROR_OP_TRUNCATE 4
#define H5FD_MIRROR_OP_REPLY 5
#define H5FD_MIRROR_OP_SET_EOA 6
#define H5FD_MIRROR_OP_LOCK 7
#define H5FD_MIRROR_OP_UNLOCK 8
#define H5FD_MIRROR_STATUS_OK 0
#define H5FD_MIRROR_STATUS_ERROR 1
#define H5FD_MIRROR_STATUS_MESSAGE_MAX 256 /* Dedicated error message size */
/* Maximum length of a path/filename string, including the NULL-terminator.
* Must not be smaller than H5FD_SPLITTER_PATH_MAX. */
#define H5FD_MIRROR_XMIT_FILEPATH_MAX 4097
/* Define the exact sizes of the various xmit blobs as sent over the wire.
* This is used to minimize the number of bytes transmitted as well as to
* sanity-check received bytes.
* Any modifications to the xmit structures and/or the encode/decode functions
* must be reflected here.
* */
#define H5FD_MIRROR_XMIT_HEADER_SIZE 14
#define H5FD_MIRROR_XMIT_EOA_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 9)
#define H5FD_MIRROR_XMIT_LOCK_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 8)
#define H5FD_MIRROR_XMIT_OPEN_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 20 + H5FD_MIRROR_XMIT_FILEPATH_MAX)
#define H5FD_MIRROR_XMIT_REPLY_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 4 + H5FD_MIRROR_STATUS_MESSAGE_MAX)
#define H5FD_MIRROR_XMIT_WRITE_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 17)
/* Maximum length of any xmit. */
#define H5FD_MIRROR_XMIT_BUFFER_MAX MAX2( MAX3(H5FD_MIRROR_XMIT_HEADER_SIZE, \
H5FD_MIRROR_XMIT_EOA_SIZE, \
H5FD_MIRROR_XMIT_LOCK_SIZE), \
MAX3(H5FD_MIRROR_XMIT_OPEN_SIZE, \
H5FD_MIRROR_XMIT_REPLY_SIZE, \
H5FD_MIRROR_XMIT_WRITE_SIZE) ) \
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_t
*
* Common structure 'header' for all mirror VFD/worker IPC.
* Must be the first component of a derived operation xmit structure,
* such as file-open or write command.
*
* `magic` (uint32_t)
* A "unique" number identifying the structure and endianness of
* transmitting maching.
* Must be set to H5FD_MIRROR_XMIT_MAGIC native to the VFD "sender".
*
* `version` (uint8_t)
* Number used to identify the structure membership.
* Allows sane modifications to this structure in the future.
* Must be set to H5FD_MIRROR_XMIT_CURR_VERSION.
*
* `session_token` (uint32_t)
* A "unique" number identifying the session between VFD sender and
* remote receiver/worker/writer. Exists to help sanity-check.
*
* `xmit_count` (uint32_t)
* Which transmission this is since the session began.
* Used to sanity-check transmission errors.
* First xmit (file-open) must be 0.
*
* `op` (uint8_t)
* Number identifying which operation to perform.
* Corresponds with the extended structure outside of this xmit header.
* Possible values are all defined H5FD_MIRROR_OP_* constants.
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_t {
uint32_t magic;
uint8_t version;
uint32_t session_token;
uint32_t xmit_count;
uint8_t op;
} H5FD_mirror_xmit_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_eoa_t
*
* Structure containing eoa-set information from VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `type` (uint8_t)
* System-independent alias for H5F[D]_mem_t.
* Specifies datatype to be written.
*
* `eoa_addr` (uint64_t)
* New address for eoa.
* (Natively 'haddr_t', always a 64-bit field)
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_eoa_t {
H5FD_mirror_xmit_t pub;
uint8_t type;
uint64_t eoa_addr;
} H5FD_mirror_xmit_eoa_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_lock_t
*
* Structure containing eoa-set information from VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `rw` (uint64_t)
* The Read/Write mode flag passed into H5FDlock().
* (Natively `hbool_t`, an 'int') TODO: native int may be 64-bit?
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_lock_t {
H5FD_mirror_xmit_t pub;
uint64_t rw;
} H5FD_mirror_xmit_lock_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_open_t
*
* Structure containing file-open information from the VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `flags` (uint32_t)
* VFL-layer file-open flags passed directly to H5FDopen().
* (Natively 'unsigned [int]') TODO: native int may be 64-bit?
*
* `maxaddr` (uint64_t)
* VFL-layer maximum allowed address space for the file to open passed
* directly to H5FDopen().
* (Natively 'haddr_t', always a 64-bit field)
*
* `size_t_blob` (uint64_t)
* A number indicating how large a size_t is on the sending system.
* Must be set to (uint64_t)((size_t)(-1))
* (maximum possible value of size_t, cast to uint64_t).
* The receiving system inspects this value -- if the local (remote)
* size_t is smaller than that of the Sender, issues a warning.
* Not an error, as:
* 1. It is assumed that underlying file systems/drivers have become
* smart enough to handle file sizes that otherwise might be
* constrained.
* 2. The Mirror Writer ingests bytes to write multiple 'slices' if the
* size is greater than H5FD_MIRROR_DATA_BUFFER_MAX, regardless of
* any size_t storage size disparity.
*
* `filename` (char[])
* String giving the filename and path of file to open.
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_open_t {
H5FD_mirror_xmit_t pub;
uint32_t flags;
uint64_t maxaddr;
uint64_t size_t_blob;
char filename[H5FD_MIRROR_XMIT_FILEPATH_MAX];
} H5FD_mirror_xmit_open_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_reply_t
*
* Structure used by the remote receiver/worker/writer to respond to
* a command from the VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `status` (uint32_t)
* Number indicating whether the command was successful or if an
* occured.
* Allowed values are H5FD_MIRROR_STATUS_OK and
* H5FD_MIRROR_STATUS_ERROR.
*
* `message` (char[])
* Error message. Populated if and only if there was a problem.
* It is possible that a message may reach the end of the alloted
* space without a NULL terminator -- the onus is on the programmer to
* handle this situation.
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_reply_t {
H5FD_mirror_xmit_t pub;
uint32_t status;
char message[H5FD_MIRROR_STATUS_MESSAGE_MAX];
} H5FD_mirror_xmit_reply_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_write_t
*
* Structure containing data-write information from VFD sender.
*
* The data to be written is transmitted in subsequent, packets
* and may be broken up into more than one transmission buffer.
* The VFD sender and remote receiver/worker/writer must coordinate
* the receipt of data.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `type` (uint8_t)
* Specifies datatype to be written.
* (Natively 'H5FD_mem_t', an enumerated type in H5Fpublic.h)
*
* `offset` (uint64_t)
* Start location of write in file.
* (Natively 'haddr_t', always a 64-bit field)
*
* `size` (uint64_t)
* Size of the data to be written, in bytes.
* (Natively 'size_t', accommodate the largest possible as 64-bits)
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_write_t {
H5FD_mirror_xmit_t pub;
uint8_t type;
uint64_t offset;
uint64_t size;
} H5FD_mirror_xmit_write_t;
/* Encode/decode routines are required to "pack" the xmit data into a known
* byte format for transmission over the wire.
*
* All component numbers must be stored in "network" word order (Big-Endian).
*
* All components must be packed in the order given in the structure definition.
*
* All components must be packed with zero padding between.
*/
H5_DLL size_t H5FD__mirror_xmit_decode_uint16(uint16_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_decode_uint8(uint8_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_encode_uint16(unsigned char *dest, uint16_t v);
H5_DLL size_t H5FD__mirror_xmit_encode_uint32(unsigned char *dest, uint32_t v);
H5_DLL size_t H5FD__mirror_xmit_encode_uint64(unsigned char *dest, uint64_t v);
H5_DLL size_t H5FD__mirror_xmit_encode_uint8(unsigned char *dest, uint8_t v);
H5_DLL size_t H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_lock(H5FD_mirror_xmit_lock_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_set_eoa(H5FD_mirror_xmit_eoa_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_write(H5FD_mirror_xmit_write_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_encode_header(unsigned char *dest, const H5FD_mirror_xmit_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_lock(unsigned char *dest, const H5FD_mirror_xmit_lock_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest, const H5FD_mirror_xmit_eoa_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_t *x);
H5_DLL hbool_t H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
#ifdef __cplusplus
}
#endif
@ -368,4 +77,3 @@ H5_DLL hbool_t H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
#endif /* H5FDmirror_H */

323
src/H5FDmirror_priv.h Normal file
View File

@ -0,0 +1,323 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* 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 COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Purpose: Public, shared definitions for Mirror VFD & remote Writer.
*/
#ifndef H5FDmirror_priv_H
#define H5FDmirror_priv_H
#ifdef H5_HAVE_MIRROR_VFD
#ifdef __cplusplus
extern "C" {
#endif
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
* IPC - Mirror VFD and Remote Worker application.
* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
*/
/* The maximum allowed size for a receiving buffer when accepting bytes to
* write. Writes larger than this size are performed by multiple accept-write
* steps by the Writer. */
#define H5FD_MIRROR_DATA_BUFFER_MAX H5_GB /* 1 Gigabyte */
#define H5FD_MIRROR_XMIT_CURR_VERSION 1
#define H5FD_MIRROR_XMIT_MAGIC 0x87F8005B
#define H5FD_MIRROR_OP_OPEN 1
#define H5FD_MIRROR_OP_CLOSE 2
#define H5FD_MIRROR_OP_WRITE 3
#define H5FD_MIRROR_OP_TRUNCATE 4
#define H5FD_MIRROR_OP_REPLY 5
#define H5FD_MIRROR_OP_SET_EOA 6
#define H5FD_MIRROR_OP_LOCK 7
#define H5FD_MIRROR_OP_UNLOCK 8
#define H5FD_MIRROR_STATUS_OK 0
#define H5FD_MIRROR_STATUS_ERROR 1
#define H5FD_MIRROR_STATUS_MESSAGE_MAX 256 /* Dedicated error message size */
/* Maximum length of a path/filename string, including the NULL-terminator.
* Must not be smaller than H5FD_SPLITTER_PATH_MAX. */
#define H5FD_MIRROR_XMIT_FILEPATH_MAX 4097
/* Define the exact sizes of the various xmit blobs as sent over the wire.
* This is used to minimize the number of bytes transmitted as well as to
* sanity-check received bytes.
* Any modifications to the xmit structures and/or the encode/decode functions
* must be reflected here.
* */
#define H5FD_MIRROR_XMIT_HEADER_SIZE 14
#define H5FD_MIRROR_XMIT_EOA_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 9)
#define H5FD_MIRROR_XMIT_LOCK_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 8)
#define H5FD_MIRROR_XMIT_OPEN_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 20 + H5FD_MIRROR_XMIT_FILEPATH_MAX)
#define H5FD_MIRROR_XMIT_REPLY_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 4 + H5FD_MIRROR_STATUS_MESSAGE_MAX)
#define H5FD_MIRROR_XMIT_WRITE_SIZE (H5FD_MIRROR_XMIT_HEADER_SIZE + 17)
/* Maximum length of any xmit. */
#define H5FD_MIRROR_XMIT_BUFFER_MAX MAX2( MAX3(H5FD_MIRROR_XMIT_HEADER_SIZE, \
H5FD_MIRROR_XMIT_EOA_SIZE, \
H5FD_MIRROR_XMIT_LOCK_SIZE), \
MAX3(H5FD_MIRROR_XMIT_OPEN_SIZE, \
H5FD_MIRROR_XMIT_REPLY_SIZE, \
H5FD_MIRROR_XMIT_WRITE_SIZE) ) \
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_t
*
* Common structure 'header' for all mirror VFD/worker IPC.
* Must be the first component of a derived operation xmit structure,
* such as file-open or write command.
*
* `magic` (uint32_t)
* A "unique" number identifying the structure and endianness of
* transmitting maching.
* Must be set to H5FD_MIRROR_XMIT_MAGIC native to the VFD "sender".
*
* `version` (uint8_t)
* Number used to identify the structure membership.
* Allows sane modifications to this structure in the future.
* Must be set to H5FD_MIRROR_XMIT_CURR_VERSION.
*
* `session_token` (uint32_t)
* A "unique" number identifying the session between VFD sender and
* remote receiver/worker/writer. Exists to help sanity-check.
*
* `xmit_count` (uint32_t)
* Which transmission this is since the session began.
* Used to sanity-check transmission errors.
* First xmit (file-open) must be 0.
*
* `op` (uint8_t)
* Number identifying which operation to perform.
* Corresponds with the extended structure outside of this xmit header.
* Possible values are all defined H5FD_MIRROR_OP_* constants.
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_t {
uint32_t magic;
uint8_t version;
uint32_t session_token;
uint32_t xmit_count;
uint8_t op;
} H5FD_mirror_xmit_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_eoa_t
*
* Structure containing eoa-set information from VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `type` (uint8_t)
* System-independent alias for H5F[D]_mem_t.
* Specifies datatype to be written.
*
* `eoa_addr` (uint64_t)
* New address for eoa.
* (Natively 'haddr_t', always a 64-bit field)
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_eoa_t {
H5FD_mirror_xmit_t pub;
uint8_t type;
uint64_t eoa_addr;
} H5FD_mirror_xmit_eoa_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_lock_t
*
* Structure containing eoa-set information from VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `rw` (uint64_t)
* The Read/Write mode flag passed into H5FDlock().
* (Natively `hbool_t`, an 'int') TODO: native int may be 64-bit?
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_lock_t {
H5FD_mirror_xmit_t pub;
uint64_t rw;
} H5FD_mirror_xmit_lock_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_open_t
*
* Structure containing file-open information from the VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `flags` (uint32_t)
* VFL-layer file-open flags passed directly to H5FDopen().
* (Natively 'unsigned [int]') TODO: native int may be 64-bit?
*
* `maxaddr` (uint64_t)
* VFL-layer maximum allowed address space for the file to open passed
* directly to H5FDopen().
* (Natively 'haddr_t', always a 64-bit field)
*
* `size_t_blob` (uint64_t)
* A number indicating how large a size_t is on the sending system.
* Must be set to (uint64_t)((size_t)(-1))
* (maximum possible value of size_t, cast to uint64_t).
* The receiving system inspects this value -- if the local (remote)
* size_t is smaller than that of the Sender, issues a warning.
* Not an error, as:
* 1. It is assumed that underlying file systems/drivers have become
* smart enough to handle file sizes that otherwise might be
* constrained.
* 2. The Mirror Writer ingests bytes to write multiple 'slices' if the
* size is greater than H5FD_MIRROR_DATA_BUFFER_MAX, regardless of
* any size_t storage size disparity.
*
* `filename` (char[])
* String giving the filename and path of file to open.
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_open_t {
H5FD_mirror_xmit_t pub;
uint32_t flags;
uint64_t maxaddr;
uint64_t size_t_blob;
char filename[H5FD_MIRROR_XMIT_FILEPATH_MAX];
} H5FD_mirror_xmit_open_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_reply_t
*
* Structure used by the remote receiver/worker/writer to respond to
* a command from the VFD sender.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `status` (uint32_t)
* Number indicating whether the command was successful or if an
* occured.
* Allowed values are H5FD_MIRROR_STATUS_OK and
* H5FD_MIRROR_STATUS_ERROR.
*
* `message` (char[])
* Error message. Populated if and only if there was a problem.
* It is possible that a message may reach the end of the alloted
* space without a NULL terminator -- the onus is on the programmer to
* handle this situation.
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_reply_t {
H5FD_mirror_xmit_t pub;
uint32_t status;
char message[H5FD_MIRROR_STATUS_MESSAGE_MAX];
} H5FD_mirror_xmit_reply_t;
/* ---------------------------------------------------------------------------
* Structure: H5FD_mirror_xmit_write_t
*
* Structure containing data-write information from VFD sender.
*
* The data to be written is transmitted in subsequent, packets
* and may be broken up into more than one transmission buffer.
* The VFD sender and remote receiver/worker/writer must coordinate
* the receipt of data.
*
* `pub` (H5FD_mirror_xmit_t)
* Common transmission header, containing session information.
* Must be first.
*
* `type` (uint8_t)
* Specifies datatype to be written.
* (Natively 'H5FD_mem_t', an enumerated type in H5Fpublic.h)
*
* `offset` (uint64_t)
* Start location of write in file.
* (Natively 'haddr_t', always a 64-bit field)
*
* `size` (uint64_t)
* Size of the data to be written, in bytes.
* (Natively 'size_t', accommodate the largest possible as 64-bits)
*
* ---------------------------------------------------------------------------
*/
typedef struct H5FD_mirror_xmit_write_t {
H5FD_mirror_xmit_t pub;
uint8_t type;
uint64_t offset;
uint64_t size;
} H5FD_mirror_xmit_write_t;
/* Encode/decode routines are required to "pack" the xmit data into a known
* byte format for transmission over the wire.
*
* All component numbers must be stored in "network" word order (Big-Endian).
*
* All components must be packed in the order given in the structure definition.
*
* All components must be packed with zero padding between.
*/
H5_DLL size_t H5FD__mirror_xmit_decode_uint16(uint16_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_decode_uint32(uint32_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_decode_uint64(uint64_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_decode_uint8(uint8_t *out, const unsigned char *buf);
H5_DLL size_t H5FD__mirror_xmit_encode_uint16(unsigned char *dest, uint16_t v);
H5_DLL size_t H5FD__mirror_xmit_encode_uint32(unsigned char *dest, uint32_t v);
H5_DLL size_t H5FD__mirror_xmit_encode_uint64(unsigned char *dest, uint64_t v);
H5_DLL size_t H5FD__mirror_xmit_encode_uint8(unsigned char *dest, uint8_t v);
H5_DLL size_t H5FD_mirror_xmit_decode_header(H5FD_mirror_xmit_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_lock(H5FD_mirror_xmit_lock_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_open(H5FD_mirror_xmit_open_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_reply(H5FD_mirror_xmit_reply_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_set_eoa(H5FD_mirror_xmit_eoa_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_decode_write(H5FD_mirror_xmit_write_t *out, const unsigned char *buf);
H5_DLL size_t H5FD_mirror_xmit_encode_header(unsigned char *dest, const H5FD_mirror_xmit_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_lock(unsigned char *dest, const H5FD_mirror_xmit_lock_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_open(unsigned char *dest, const H5FD_mirror_xmit_open_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_reply(unsigned char *dest, const H5FD_mirror_xmit_reply_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_set_eoa(unsigned char *dest, const H5FD_mirror_xmit_eoa_t *x);
H5_DLL size_t H5FD_mirror_xmit_encode_write(unsigned char *dest, const H5FD_mirror_xmit_write_t *x);
H5_DLL hbool_t H5FD_mirror_xmit_is_close(const H5FD_mirror_xmit_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_lock(const H5FD_mirror_xmit_lock_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_open(const H5FD_mirror_xmit_open_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_reply(const H5FD_mirror_xmit_reply_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_set_eoa(const H5FD_mirror_xmit_eoa_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_write(const H5FD_mirror_xmit_write_t *xmit);
H5_DLL hbool_t H5FD_mirror_xmit_is_xmit(const H5FD_mirror_xmit_t *xmit);
#ifdef __cplusplus
}
#endif
#endif /* H5_HAVE_MIRROR_VFD */
#endif /* H5FDmirror_priv_H */

View File

@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Saturday, September 12, 2015
*
* Purpose: This file contains declarations which define macros for the

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Purpose: Common routines for all MPI-based VFL drivers.
@ -43,8 +43,6 @@
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
int
@ -82,8 +80,6 @@ done:
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
int
@ -120,8 +116,6 @@ done:
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
MPI_Comm
@ -158,8 +152,6 @@ done:
* Programmer: John Mainzer
* 4/4/17
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
herr_t
@ -197,13 +189,6 @@ done:
* Programmer: Unknown
* January 30, 1998
*
* Modifications:
* Robb Matzke, 1999-04-23
* An error is reported for address overflows. The ADDR output
* argument is optional.
*
* Robb Matzke, 1999-08-06
* Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
haddr_t
@ -235,16 +220,6 @@ H5FD_mpi_MPIOff_to_haddr(MPI_Offset mpi_off)
* Programmer: Unknown
* January 30, 1998
*
* Modifications:
* Robb Matzke, 1999-04-23
* An error is reported for address overflows. The ADDR output
* argument is optional.
*
* Robb Matzke, 1999-07-28
* The ADDR argument is passed by value.
*
* Robb Matzke, 1999-08-06
* Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
@ -290,9 +265,6 @@ H5FD_mpi_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off/*out*/)
* Programmer: rky
* 19981207
*
* Modifications:
* Robb Matzke, 1999-08-09
* Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t
@ -345,9 +317,6 @@ done:
* Programmer: rky
* 19981207
*
* Modifications:
* Robb Matzke, 1999-08-09
* Modified to work with the virtual file layer.
*-------------------------------------------------------------------------
*/
herr_t

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Programmer: Quincey Koziol
* Friday, January 30, 2004
*
* Purpose: The public header file for common items for all MPI VFL drivers

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Thursday, July 29, 1999
*
* Purpose: This is the MPI-2 I/O driver.

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the mpio driver.

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Monday, November 10, 1997
*
* Purpose: Implements a file driver which dispatches I/O requests to
@ -1234,14 +1234,6 @@ H5FD_multi_get_type_map(const H5FD_t *_file, H5FD_mem_t *type_map)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
* Raymond Lu
* 21 Dec. 2006
* Added the parameter TYPE. It's only used for MULTI driver.
* If the TYPE is H5FD_MEM_DEFAULT, simply find the biggest
* EOA of individual file because the EOA for the whole file
* is meaningless.
*
*-------------------------------------------------------------------------
*/
static haddr_t
@ -1334,17 +1326,6 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
* Programmer: Robb Matzke
* Wednesday, August 4, 1999
*
* Modifications:
* Raymond Lu
* 10 January 2007
* EOA for the whole file is discarded because it's meaningless
* for MULTI file. This function only sets eoa for individual
* file.
*
* Raymond Lu
* 21 June 2011
* Backward compatibility of EOA. Please the comment in the
* code.
*-------------------------------------------------------------------------
*/
static herr_t

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Monday, August 2, 1999
*
* Purpose: The public header file for the "multi" driver.

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* Programmer: Quincey Koziol
* Thursday, January 3, 2008
*
* Purpose: This file contains declarations which are visible only within

View File

@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Programmer: Robb Matzke
* Monday, July 26, 1999
*/
#ifndef _H5FDprivate_H

Some files were not shown because too many files have changed in this diff Show More