diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-11-08 17:11:22 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-11-08 17:11:22 (GMT) |
commit | 5717239a98f61dab289ce7c79d7768dc59755e3a (patch) | |
tree | 5e775fdd49376282f7c1e0f6969da15987143276 | |
parent | 480fc373a07e4b9a3aefd51f82accbc9411146b3 (diff) | |
download | hdf5-5717239a98f61dab289ce7c79d7768dc59755e3a.zip hdf5-5717239a98f61dab289ce7c79d7768dc59755e3a.tar.gz hdf5-5717239a98f61dab289ce7c79d7768dc59755e3a.tar.bz2 |
Remove tabs
-rw-r--r-- | src/H5F.c | 694 | ||||
-rw-r--r-- | src/H5Fint.c | 787 | ||||
-rw-r--r-- | src/H5Fquery.c | 625 |
3 files changed, 809 insertions, 1297 deletions
@@ -21,20 +21,20 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Aprivate.h" /* Attributes */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5SMprivate.h" /* Shared Object Header Messages */ -#include "H5Tprivate.h" /* Datatypes */ +#include "H5private.h" /* Generic Functions */ +#include "H5Aprivate.h" /* Attributes */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MFprivate.h" /* File memory management */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5SMprivate.h" /* Shared Object Header Messages */ +#include "H5Tprivate.h" /* Datatypes */ /****************/ @@ -76,10 +76,10 @@ hbool_t H5_PKG_INIT_VAR = FALSE; /* File ID class */ static const H5I_class_t H5I_FILE_CLS[1] = {{ - H5I_FILE, /* ID class value */ - 0, /* Class flags */ - 0, /* # of reserved IDs for class */ - (H5I_free_t)H5F_close /* Callback routine for closing objects of this class */ + H5I_FILE, /* ID class value */ + 0, /* Class flags */ + 0, /* # of reserved IDs for class */ + (H5I_free_t)H5F_close /* Callback routine for closing objects of this class */ }}; @@ -113,27 +113,22 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_term_package + * Function: H5F_term_package * - * Purpose: Terminate this interface: free all memory and reset global - * variables to their initial values. Release all ID groups - * associated with this interface. - * - * Return: Success: Positive if anything was done that might - * have affected other interfaces; zero - * otherwise. - * - * Failure: Never fails. - * - * Programmer: Robb Matzke - * Friday, February 19, 1999 + * Purpose: Terminate this interface: free all memory and reset global + * variables to their initial values. Release all ID groups + * associated with this interface. * + * Return: Success: Positive if anything was done that might + * have affected other interfaces; + * zero otherwise. + * Failure: Never fails. *------------------------------------------------------------------------- */ int H5F_term_package(void) { - int n = 0; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -141,7 +136,7 @@ H5F_term_package(void) if(H5I_nmembers(H5I_FILE) > 0) { (void)H5I_clear_type(H5I_FILE, FALSE, FALSE); n++; /*H5I*/ - } /* end if */ + } /* end if */ else { /* Make certain we've cleaned up all the shared file objects */ H5F_sfile_assert_num(0); @@ -160,18 +155,14 @@ H5F_term_package(void) /*------------------------------------------------------------------------- - * Function: H5Fget_create_plist - * - * Purpose: Get an atom for a copy of the file-creation property list for - * this file. This function returns an atom with a copy of the - * properties used to create a file. - * - * Return: Success: template ID + * Function: H5Fget_create_plist * - * Failure: FAIL - * - * Programmer: Unknown + * Purpose: Get an atom for a copy of the file-creation property list for + * this file. This function returns an atom with a copy of the + * properties used to create a file. * + * Return: Success: template ID + * Failure: FAIL *------------------------------------------------------------------------- */ hid_t @@ -200,24 +191,19 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fget_access_plist + * Function: H5Fget_access_plist * - * Purpose: Returns a copy of the file access property list of the - * specified file. + * Purpose: Returns a copy of the file access property list of the + * specified file. * * NOTE: Make sure that, if you are going to overwrite * information in the copied property list that was * previously opened and assigned to the property list, then * you must close it before overwriting the values. * - * Return: Success: Object ID for a copy of the file access - * property list. - * - * Failure: FAIL - * - * Programmer: Robb Matzke - * Wednesday, February 18, 1998 - * + * Return: Success: Object ID for a copy of the file access + * property list. + * Failure: FAIL *------------------------------------------------------------------------- */ hid_t @@ -243,23 +229,19 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fget_obj_count - * - * Purpose: Public function returning the number of opened object IDs - * (files, datasets, groups and datatypes) in the same file. + * Function: H5Fget_obj_count * - * Return: Non-negative on success; negative on failure. - * - * Programmer: Raymond Lu - * Wednesday, Dec 5, 2001 + * Purpose: Public function returning the number of opened object IDs + * (files, datasets, groups and datatypes) in the same file. * + * Return: Non-negative on success; negative on failure. *------------------------------------------------------------------------- */ ssize_t H5Fget_obj_count(hid_t file_id, unsigned types) { H5F_t *f = NULL; /* File to query */ - size_t obj_count = 0; /* Number of opened objects */ + size_t obj_count = 0; /* Number of opened objects */ ssize_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) @@ -284,21 +266,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fget_object_ids - * - * Purpose: Public function to return a list of opened object IDs. - * - * Return: Non-negative on success; negative on failure. + * Function: H5Fget_object_ids * - * Programmer: Raymond Lu - * Wednesday, Dec 5, 2001 - * - * Modification: - * Raymond Lu - * 24 September 2008 - * Changed the return value to ssize_t and MAX_OBJTS to size_t to - * accommadate potential large number of objects. + * Purpose: Public function to return a list of opened object IDs. * + * Return: Non-negative on success; negative on failure. *------------------------------------------------------------------------- */ ssize_t @@ -339,10 +311,6 @@ done: * * Return: Success: non-negative value. * Failure: negative. - * - * Programmer: Raymond Lu - * Sep. 16, 2002 - * *------------------------------------------------------------------------- */ herr_t @@ -372,23 +340,16 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fis_hdf5 + * Function: H5Fis_hdf5 * - * Purpose: Check the file signature to detect an HDF5 file. + * Purpose: Check the file signature to detect an HDF5 file. * - * Bugs: This function is not robust: it only uses the default file - * driver when attempting to open the file when in fact it - * should use all known file drivers. + * Bugs: This function is not robust: it only uses the default file + * driver when attempting to open the file when in fact it + * should use all known file drivers. * - * Return: Success: TRUE/FALSE - * - * Failure: Negative - * - * Programmer: Unknown - * - * Modifications: - * Robb Matzke, 1999-08-02 - * Rewritten to use the virtual file layer. + * Return: Success: TRUE/FALSE + * Failure: Negative *------------------------------------------------------------------------- */ htri_t @@ -414,38 +375,34 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fcreate - * - * Purpose: This is the primary function for creating HDF5 files . The - * flags parameter determines whether an existing file will be - * overwritten or not. All newly created files are opened for - * both reading and writing. All flags may be combined with the - * bit-wise OR operator (`|') to change the behavior of the file - * create call. - * - * The more complex behaviors of a file's creation and access - * are controlled through the file-creation and file-access - * property lists. The value of H5P_DEFAULT for a template - * value indicates that the library should use the default - * values for the appropriate template. - * - * See also: H5Fpublic.h for the list of supported flags. H5Ppublic.h for - * the list of file creation and file access properties. - * - * Return: Success: A file ID - * - * Failure: FAIL - * - * Programmer: Unknown - * + * Function: H5Fcreate + * + * Purpose: This is the primary function for creating HDF5 files . The + * flags parameter determines whether an existing file will be + * overwritten or not. All newly created files are opened for + * both reading and writing. All flags may be combined with the + * bit-wise OR operator (`|') to change the behavior of the file + * create call. + * + * The more complex behaviors of a file's creation and access + * are controlled through the file-creation and file-access + * property lists. The value of H5P_DEFAULT for a template + * value indicates that the library should use the default + * values for the appropriate template. + * + * See also: H5Fpublic.h for the list of supported flags. H5Ppublic.h for + * the list of file creation and file access properties. + * + * Return: Success: A file ID + * Failure: FAIL *------------------------------------------------------------------------- */ hid_t H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) { - H5F_t *new_file = NULL; /*file struct for new file */ - hid_t dxpl_id = H5AC_ind_read_dxpl_id; /*dxpl used by library */ - hid_t ret_value; /*return value */ + H5F_t *new_file = NULL; /*file struct for new file */ + hid_t dxpl_id = H5AC_ind_read_dxpl_id; /*dxpl used by library */ + hid_t ret_value; /*return value */ FUNC_ENTER_API(FAIL) H5TRACE4("i", "*sIuii", filename, flags, fcpl_id, fapl_id); @@ -479,7 +436,7 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) * reading and writing. */ if (0==(flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC))) - flags |= H5F_ACC_EXCL; /*default*/ + flags |= H5F_ACC_EXCL; /*default*/ flags |= H5F_ACC_RDWR | H5F_ACC_CREAT; /* @@ -504,51 +461,48 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fopen + * Function: H5Fopen * - * Purpose: This is the primary function for accessing existing HDF5 - * files. The FLAGS argument determines whether writing to an - * existing file will be allowed or not. All flags may be - * combined with the bit-wise OR operator (`|') to change the - * behavior of the file open call. The more complex behaviors - * of a file's access are controlled through the file-access - * property list. + * Purpose: This is the primary function for accessing existing HDF5 + * files. The FLAGS argument determines whether writing to an + * existing file will be allowed or not. All flags may be + * combined with the bit-wise OR operator (`|') to change the + * behavior of the file open call. The more complex behaviors + * of a file's access are controlled through the file-access + * property list. * - * See Also: H5Fpublic.h for a list of possible values for FLAGS. + * See Also: H5Fpublic.h for a list of possible values for FLAGS. * - * Return: Success: A file ID - * - * Failure: FAIL - * - * Programmer: Unknown + * Return: Success: A file ID + * Failure: FAIL * * Modifications: - * Robb Matzke, 1997-07-18 - * File struct creation and destruction is through H5F_new() and - * H5F__dest(). Reading the root symbol table entry is done with - * H5G_decode(). - * - * Robb Matzke, 1997-09-23 - * Most of the work is now done by H5F_open() since H5Fcreate() - * and H5Fopen() originally contained almost identical code. - * - * Robb Matzke, 1998-02-18 - * Added better error checking for the flags and the file access - * property list. It used to be possible to make the library - * dump core by passing an object ID that was not a file access - * property list. - * - * Robb Matzke, 1999-08-02 - * The file access property list is passed to the H5F_open() as - * object IDs. + * Robb Matzke, 1997-07-18 + * File struct creation and destruction is through H5F_new() and + * H5F__dest(). Reading the root symbol table entry is done with + * H5G_decode(). + * + * Robb Matzke, 1997-09-23 + * Most of the work is now done by H5F_open() since H5Fcreate() + * and H5Fopen() originally contained almost identical code. + * + * Robb Matzke, 1998-02-18 + * Added better error checking for the flags and the file access + * property list. It used to be possible to make the library + * dump core by passing an object ID that was not a file access + * property list. + * + * Robb Matzke, 1999-08-02 + * The file access property list is passed to the H5F_open() as + * object IDs. *------------------------------------------------------------------------- */ hid_t H5Fopen(const char *filename, unsigned flags, hid_t fapl_id) { - H5F_t *new_file = NULL; /*file struct for new file */ - hid_t dxpl_id = H5AC_ind_read_dxpl_id; /*dxpl used by library */ - hid_t ret_value; /*return value */ + H5F_t *new_file = NULL; /* file struct for new file */ + hid_t dxpl_id = H5AC_ind_read_dxpl_id; /* dxpl used by library */ + hid_t ret_value; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("i", "*sIui", filename, flags, fapl_id); @@ -591,25 +545,21 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fflush - * - * Purpose: Flushes all outstanding buffers of a file to disk but does - * not remove them from the cache. The OBJECT_ID can be a file, - * dataset, group, attribute, or named data type. + * Function: H5Fflush * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * Thursday, August 6, 1998 + * Purpose: Flushes all outstanding buffers of a file to disk but does + * not remove them from the cache. The OBJECT_ID can be a file, + * dataset, group, attribute, or named data type. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t H5Fflush(hid_t object_id, H5F_scope_t scope) { - H5F_t *f = NULL; /* File to flush */ - H5O_loc_t *oloc = NULL; /* Object location for ID */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t *f = NULL; /* File to flush */ + H5O_loc_t *oloc = NULL; /* Object location for ID */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "iFs", object_id, scope); @@ -622,7 +572,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) case H5I_GROUP: { - H5G_t *grp; + H5G_t *grp; if(NULL == (grp = (H5G_t *)H5I_object(object_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid group identifier") @@ -632,7 +582,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) case H5I_DATATYPE: { - H5T_t *type; + H5T_t *type; if(NULL == (type = (H5T_t *)H5I_object(object_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid type identifier") @@ -642,7 +592,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) case H5I_DATASET: { - H5D_t *dset; + H5D_t *dset; if(NULL == (dset = (H5D_t *)H5I_object(object_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataset identifier") @@ -652,7 +602,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) case H5I_ATTR: { - H5A_t *attr; + H5A_t *attr; if(NULL == (attr = (H5A_t *)H5I_object(object_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid attribute identifier") @@ -685,7 +635,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) /* Flush the file */ /* - * Nothing to do if the file is read only. This determination is + * Nothing to do if the file is read only. This determination is * made at the shared open(2) flags level, implying that opening a * file twice, once for read-only and once for read-write, and then * calling H5Fflush() with the read-only handle, still causes data @@ -711,24 +661,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fclose + * Function: H5Fclose * - * Purpose: This function closes the file specified by FILE_ID by - * flushing all data to storage, and terminating access to the - * file through FILE_ID. If objects (e.g., datasets, groups, - * etc.) are open in the file then the underlying storage is not - * closed until those objects are closed; however, all data for - * the file and the open objects is flushed. - * - * Return: Success: Non-negative - * - * Failure: Negative - * - * Programmer: Robb Matzke - * Saturday, February 20, 1999 - * - * Modifications: + * Purpose: This function closes the file specified by FILE_ID by + * flushing all data to storage, and terminating access to the + * file through FILE_ID. If objects (e.g., datasets, groups, + * etc.) are open in the file then the underlying storage is not + * closed until those objects are closed; however, all data for + * the file and the open objects is flushed. * + * Return: Success: Non-negative + * Failure: Negative *------------------------------------------------------------------------- */ herr_t @@ -736,7 +679,7 @@ H5Fclose(hid_t file_id) { H5F_t *f = NULL; int nref; - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", file_id); @@ -772,29 +715,24 @@ done: /*------------------------------------------------------------------------- - * Function: H5Freopen - * - * Purpose: Reopen a file. The new file handle which is returned points - * to the same file as the specified file handle. Both handles - * share caches and other information. The only difference - * between the handles is that the new handle is not mounted - * anywhere and no files are mounted on it. + * Function: H5Freopen * - * Return: Success: New file ID - * - * Failure: FAIL - * - * Programmer: Robb Matzke - * Friday, October 16, 1998 + * Purpose: Reopen a file. The new file handle which is returned points + * to the same file as the specified file handle. Both handles + * share caches and other information. The only difference + * between the handles is that the new handle is not mounted + * anywhere and no files are mounted on it. * + * Return: Success: New file ID + * Failure: FAIL *------------------------------------------------------------------------- */ hid_t H5Freopen(hid_t file_id) { - H5F_t *old_file = NULL; - H5F_t *new_file = NULL; - hid_t ret_value; + H5F_t *old_file = NULL; + H5F_t *new_file = NULL; + hid_t ret_value; FUNC_ENTER_API(FAIL) H5TRACE1("i", "i", file_id); @@ -828,16 +766,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fget_intent - * - * Purpose: Public API to retrieve the file's 'intent' flags passed - * during H5Fopen() + * Function: H5Fget_intent * - * Return: Non-negative on success/negative on failure - * - * Programmer: James Laird - * August 23, 2006 + * Purpose: Public API to retrieve the file's 'intent' flags passed + * during H5Fopen() * + * Return: Non-negative on success/negative on failure *------------------------------------------------------------------------- */ herr_t @@ -850,7 +784,7 @@ H5Fget_intent(hid_t file_id, unsigned *intent_flags) /* If no intent flags were passed in, exit quietly */ if(intent_flags) { - H5F_t * file; /* Pointer to file structure */ + H5F_t *file; /* Pointer to file structure */ /* Get the internal file structure */ if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) @@ -888,18 +822,13 @@ done: * * Return: Success: Amount of free space for type * Failure: Negative - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Oct 6, 2003 - * *------------------------------------------------------------------------- */ hssize_t H5Fget_freespace(hid_t file_id) { H5F_t *file; /* File object for file ID */ - hsize_t tot_space; /* Amount of free space in the file */ + hsize_t tot_space; /* Amount of free space in the file */ hssize_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) @@ -925,15 +854,10 @@ done: * * Purpose: Retrieves the file size of the HDF5 file. This function * is called after an existing file is opened in order - * to learn the true size of the underlying file. + * to learn the true size of the underlying file. * * Return: Success: Non-negative * Failure: Negative - * - * Programmer: David Pitt - * david.pitt@bigpond.com - * Apr 27, 2004 - * *------------------------------------------------------------------------- */ herr_t @@ -972,42 +896,38 @@ done: /*------------------------------------------------------------------------- * Function: H5Fget_file_image * - * Purpose: If a buffer is provided (via the buf_ptr argument) and is - * big enough (size in buf_len argument), load *buf_ptr with - * an image of the open file whose ID is provided in the - * file_id parameter, and return the number of bytes copied - * to the buffer. + * Purpose: If a buffer is provided (via the buf_ptr argument) and is + * big enough (size in buf_len argument), load *buf_ptr with + * an image of the open file whose ID is provided in the + * file_id parameter, and return the number of bytes copied + * to the buffer. * - * If the buffer exists, but is too small to contain an image - * of the indicated file, return a negative number. + * If the buffer exists, but is too small to contain an image + * of the indicated file, return a negative number. * - * Finally, if no buffer is provided, return the size of the - * buffer needed. This value is simply the eoa of the target - * file. + * Finally, if no buffer is provided, return the size of the + * buffer needed. This value is simply the eoa of the target + * file. * - * Note that any user block is skipped. + * Note that any user block is skipped. * - * Also note that the function may not be used on files - * opened with either the split/multi file driver or the - * family file driver. + * Also note that the function may not be used on files + * opened with either the split/multi file driver or the + * family file driver. * - * In the former case, the sparse address space makes the - * get file image operation impractical, due to the size of - * the image typically required. + * In the former case, the sparse address space makes the + * get file image operation impractical, due to the size of + * the image typically required. * - * In the case of the family file driver, the problem is - * the driver message in the super block, which will prevent - * the image being opened with any driver other than the - * family file driver -- which negates the purpose of the - * operation. This can be fixed, but no resources for - * this now. + * In the case of the family file driver, the problem is + * the driver message in the super block, which will prevent + * the image being opened with any driver other than the + * family file driver -- which negates the purpose of the + * operation. This can be fixed, but no resources for + * this now. * * Return: Success: Bytes copied / number of bytes needed. * Failure: negative value - * - * Programmer: John Mainzer - * 11/15/11 - * *------------------------------------------------------------------------- */ ssize_t @@ -1033,21 +953,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fget_mdc_config + * Function: H5Fget_mdc_config * - * Purpose: Retrieves the current automatic cache resize configuration - * from the metadata cache, and return it in *config_ptr. + * Purpose: Retrieves the current automatic cache resize configuration + * from the metadata cache, and return it in *config_ptr. * - * Note that the version field of *config_Ptr must be correctly - * filled in by the caller. This allows us to adapt for - * obsolete versions of the structure. - * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: John Mainzer - * 3/24/05 + * Note that the version field of *config_Ptr must be correctly + * filled in by the caller. This allows us to adapt for + * obsolete versions of the structure. * + * Return: Success: SUCCEED + * Failure: FAIL *------------------------------------------------------------------------- */ herr_t @@ -1078,15 +994,11 @@ done: * Function: H5Fset_mdc_config * * Purpose: Sets the current metadata cache automatic resize - * configuration, using the contents of the instance of - * H5AC_cache_config_t pointed to by config_ptr. + * configuration, using the contents of the instance of + * H5AC_cache_config_t pointed to by config_ptr. * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: John Mainzer - * 3/24/05 - * *------------------------------------------------------------------------- */ herr_t @@ -1115,16 +1027,12 @@ done: * Function: H5Fget_mdc_hit_rate * * Purpose: Retrieves the current hit rate from the metadata cache. - * This rate is the overall hit rate since the last time - * the hit rate statistics were reset either manually or - * automatically. + * This rate is the overall hit rate since the last time + * the hit rate statistics were reset either manually or + * automatically. * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: John Mainzer - * 3/24/05 - * *------------------------------------------------------------------------- */ herr_t @@ -1156,17 +1064,13 @@ done: * Function: H5Fget_mdc_size * * Purpose: Retrieves the maximum size, minimum clean size, current - * size, and current number of entries from the metadata - * cache associated with the specified file. If any of - * the ptr parameters are NULL, the associated datum is - * not returned. + * size, and current number of entries from the metadata + * cache associated with the specified file. If any of + * the ptr parameters are NULL, the associated datum is + * not returned. * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: John Mainzer - * 3/24/05 - * *------------------------------------------------------------------------- */ herr_t @@ -1202,20 +1106,16 @@ done: * Function: H5Freset_mdc_hit_rate_stats * * Purpose: Reset the hit rate statistic whose current value can - * be obtained via the H5Fget_mdc_hit_rate() call. Note - * that this statistic will also be reset once per epoch - * by the automatic cache resize code if it is enabled. + * be obtained via the H5Fget_mdc_hit_rate() call. Note + * that this statistic will also be reset once per epoch + * by the automatic cache resize code if it is enabled. * - * It is probably a bad idea to call this function unless - * you are controlling cache size from your program instead - * of using our cache size control code. + * It is probably a bad idea to call this function unless + * you are controlling cache size from your program instead + * of using our cache size control code. * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: John Mainzer - * 3/24/05 - * *------------------------------------------------------------------------- */ herr_t @@ -1251,15 +1151,11 @@ done: * If an error occurs then the buffer pointed to by `name' (NULL or non-NULL) * is unchanged and the function returns a negative value. * - * Note: This routine returns the name that was used to open the file, - * not the actual name after resolving symlinks, etc. + * Note: This routine returns the name that was used to open the file, + * not the actual name after resolving symlinks, etc. * * Return: Success: The length of the file name * Failure: Negative - * - * Programmer: Raymond Lu - * June 29, 2004 - * *------------------------------------------------------------------------- */ ssize_t @@ -1309,17 +1205,13 @@ done: * Function: H5Fget_info2 * * Purpose: Gets general information about the file, including: - * 1. Get storage size for superblock extension if there is one. + * 1. Get storage size for superblock extension if there is one. * 2. Get the amount of btree and heap storage for entries * in the SOHM table if there is one. - * 3. The amount of free space tracked in the file. + * 3. The amount of free space tracked in the file. * * Return: Success: non-negative on success * Failure: Negative - * - * Programmer: Vailin Choi - * July 11, 2007 - * *------------------------------------------------------------------------- */ herr_t @@ -1386,18 +1278,15 @@ done: * * Return: Success: non-negative on success * Failure: Negative - * - * Programmer: Vailin Choi; October 2013 - * *------------------------------------------------------------------------- */ herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info) { - H5F_t *file; /* File object for file ID */ - unsigned i, j; /* Local index variable */ - size_t tot_size; /* Size of each retries[i] */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t *file; /* File object for file ID */ + unsigned i, j; /* Local index variable */ + size_t tot_size; /* Size of each retries[i] */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*x", file_id, info); @@ -1417,8 +1306,8 @@ H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info) HDmemset(info->retries, 0, sizeof(info->retries)); /* Return if there are no bins -- no retries */ - if(!info->nbins) - HGOTO_DONE(SUCCEED); + if(!info->nbins) + HGOTO_DONE(SUCCEED); /* Calculate size for each retries[i] */ tot_size = info->nbins * sizeof(uint32_t); @@ -1477,18 +1366,15 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fget_free_sections - * - * Purpose: To get free-space section information for free-space manager with - * TYPE that is associated with file FILE_ID. - * If SECT_INFO is null, this routine returns the total # of free-space - * sections. - * - * Return: Success: non-negative, the total # of free space sections - * Failure: negative + * Function: H5Fget_free_sections * - * Programmer: Vailin Choi; July 1st, 2009 + * Purpose: To get free-space section information for free-space manager with + * TYPE that is associated with file FILE_ID. + * If SECT_INFO is null, this routine returns the total # of free-space + * sections. * + * Return: Success: non-negative, the total # of free space sections + * Failure: negative *------------------------------------------------------------------------- */ ssize_t @@ -1525,9 +1411,6 @@ done: * * Return: Success: non-negative * Failure: negative - * - * Programmer: Neil Fortner; December 30, 2010 - * *------------------------------------------------------------------------- */ herr_t @@ -1554,37 +1437,33 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fstart_swmr_write - * - * Purpose: To enable SWMR writing mode for the file - * 1) Refresh opened objects: part 1 - * 2) Flush & reset accumulator - * 3) Mark the file in SWMR writing mode - * 4) Set metadata read attempts and retries info - * 5) Disable accumulator - * 6) Evict all cache entries except the superblock - * 7) Refresh opened objects (part 2) - * 8) Unlock the file - * - * Pre-conditions: - * 1) The file being opened has v3 superblock - * 2) The file is opened with H5F_ACC_RDWR - * 3) The file is not already marked for SWMR writing - * 4) Current implementaion for opened objects: - * --only allow datasets and groups without attributes - * --disallow named datatype with/without attributes - * --disallow opened attributes attached to objects - * NOTE: Currently, only opened groups and datasets are allowed - * when enabling SWMR via H5Fstart_swmr_write(). - * Will later implement a different approach-- - * set up flush dependency/proxy even for file opened without - * SWMR to resolve issues with opened objects. - * - * Return: Non-negative on success/negative on failure - * - * Programmer: - * Vailin Choi; Feb 2014 - * + * Function: H5Fstart_swmr_write + * + * Purpose: To enable SWMR writing mode for the file + * 1) Refresh opened objects: part 1 + * 2) Flush & reset accumulator + * 3) Mark the file in SWMR writing mode + * 4) Set metadata read attempts and retries info + * 5) Disable accumulator + * 6) Evict all cache entries except the superblock + * 7) Refresh opened objects (part 2) + * 8) Unlock the file + * + * Pre-conditions: + * 1) The file being opened has v3 superblock + * 2) The file is opened with H5F_ACC_RDWR + * 3) The file is not already marked for SWMR writing + * 4) Current implementaion for opened objects: + * --only allow datasets and groups without attributes + * --disallow named datatype with/without attributes + * --disallow opened attributes attached to objects + * NOTE: Currently, only opened groups and datasets are allowed + * when enabling SWMR via H5Fstart_swmr_write(). + * Will later implement a different approach-- + * set up flush dependency/proxy even for file opened without + * SWMR to resolve issues with opened objects. + * + * Return: Non-negative on success/negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1593,16 +1472,16 @@ H5Fstart_swmr_write(hid_t file_id) hbool_t ci_load = FALSE; /* whether MDC ci load requested */ hbool_t ci_write = FALSE; /* whether MDC CI write requested */ H5F_t *file = NULL; /* File info */ - size_t grp_dset_count=0; /* # of open objects: groups & datasets */ - size_t nt_attr_count=0; /* # of opened named datatypes + opened attributes */ - hid_t *obj_ids=NULL; /* List of ids */ - H5G_loc_t *obj_glocs=NULL; /* Group location of the object */ - H5O_loc_t *obj_olocs=NULL; /* Object location */ - H5G_name_t *obj_paths=NULL; /* Group hierarchy path */ - size_t u; /* Local index variable */ - hbool_t setup = FALSE; /* Boolean flag to indicate whether SWMR setting is enabled */ + size_t grp_dset_count=0; /* # of open objects: groups & datasets */ + size_t nt_attr_count=0; /* # of opened named datatypes + opened attributes */ + hid_t *obj_ids=NULL; /* List of ids */ + H5G_loc_t *obj_glocs=NULL; /* Group location of the object */ + H5O_loc_t *obj_olocs=NULL; /* Object location */ + H5G_name_t *obj_paths=NULL; /* Group hierarchy path */ + size_t u; /* Local index variable */ + hbool_t setup = FALSE; /* Boolean flag to indicate whether SWMR setting is enabled */ H5F_io_info2_t fio_info; /* I/O info for operation */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", file_id); @@ -1651,18 +1530,18 @@ H5Fstart_swmr_write(hid_t file_id) if(grp_dset_count) { /* Allocate space for group and object locations */ - if((obj_ids = (hid_t *) H5MM_malloc(grp_dset_count * sizeof(hid_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for hid_t") - if((obj_glocs = (H5G_loc_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_loc_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5G_loc_t") - if((obj_olocs = (H5O_loc_t *) H5MM_malloc(grp_dset_count * sizeof(H5O_loc_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5O_loc_t") - if((obj_paths = (H5G_name_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_name_t))) == NULL) - HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5G_name_t") + if((obj_ids = (hid_t *) H5MM_malloc(grp_dset_count * sizeof(hid_t))) == NULL) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for hid_t") + if((obj_glocs = (H5G_loc_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_loc_t))) == NULL) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5G_loc_t") + if((obj_olocs = (H5O_loc_t *) H5MM_malloc(grp_dset_count * sizeof(H5O_loc_t))) == NULL) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5O_loc_t") + if((obj_paths = (H5G_name_t *) H5MM_malloc(grp_dset_count * sizeof(H5G_name_t))) == NULL) + HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, FAIL, "can't allocate buffer for H5G_name_t") /* Get the list of opened object ids (groups & datasets) */ - if(H5F_get_obj_ids(file, H5F_OBJ_GROUP|H5F_OBJ_DATASET, grp_dset_count, obj_ids, FALSE, &grp_dset_count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5F_get_obj_ids failed") + if(H5F_get_obj_ids(file, H5F_OBJ_GROUP|H5F_OBJ_DATASET, grp_dset_count, obj_ids, FALSE, &grp_dset_count) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "H5F_get_obj_ids failed") /* Refresh opened objects (groups, datasets) in the file */ for(u = 0; u < grp_dset_count; u++) { @@ -1790,14 +1669,13 @@ done: * - Logging must have been set up via the fapl. * * Return: Non-negative on success/Negative on errors - * *------------------------------------------------------------------------- */ herr_t H5Fstart_mdc_logging(hid_t file_id) { - H5F_t *file; /* File info */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t *file; /* File info */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", file_id); @@ -1823,14 +1701,13 @@ done: * - Logging must have been set up via the fapl. * * Return: Non-negative on success/Negative on errors - * *------------------------------------------------------------------------- */ herr_t H5Fstop_mdc_logging(hid_t file_id) { - H5F_t *file; /* File info */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t *file; /* File info */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", file_id); @@ -1856,15 +1733,14 @@ done: * log messages are being recorded at this time. * * Return: Non-negative on success/Negative on errors - * *------------------------------------------------------------------------- */ herr_t H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled, hbool_t *is_currently_logging) { - H5F_t *file; /* File info */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t *file; /* File info */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "i*b*b", file_id, is_enabled, is_currently_logging); @@ -1888,9 +1764,6 @@ done: * Purpose: Enable switching the "latest format" flag while a file is open. * * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Monday, September 21, 2015 *------------------------------------------------------------------------- */ herr_t @@ -1924,17 +1797,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5Fformat_convert_super (Internal) + * Function: H5Fformat_convert_super (Internal) * - * Purpose: Downgrade the superblock version to v2 and - * downgrade persistent file space to non-persistent - * for 1.8 library. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Vailin Choi - * Jan 2016 + * Purpose: Downgrade the superblock version to v2 and + * downgrade persistent file space to non-persistent + * for 1.8 library. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1946,8 +1815,8 @@ H5Fformat_convert(hid_t fid) H5TRACE1("e", "i", fid); if(H5I_FILE == H5I_get_type(fid)) { - H5F_t *f; /* File to flush */ - hbool_t mark_dirty = FALSE; + H5F_t *f; /* File to flush */ + hbool_t mark_dirty = FALSE; /* Get file object */ if(NULL == (f = (H5F_t *)H5I_object(fid))) @@ -1961,9 +1830,9 @@ H5Fformat_convert(hid_t fid) /* Check for persistent freespace manager, which needs to be downgraded */ if(!(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF && - f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF && - f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF && - f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF)) { + f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF && + f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF && + f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF)) { /* Check to remove free-space manager info message from superblock extension */ if(H5F_addr_defined(f->shared->sblock->ext_addr)) if(H5F_super_ext_remove_msg(f, H5AC_ind_read_dxpl_id, H5O_FSINFO_ID) < 0) @@ -2004,9 +1873,6 @@ done: * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Mohamad Chaarawi - * *------------------------------------------------------------------------- */ herr_t @@ -2040,9 +1906,6 @@ done: * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Mohamad Chaarawi - * *------------------------------------------------------------------------- */ herr_t @@ -2084,9 +1947,6 @@ done: * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Vailin Choi; March 2017 - * *------------------------------------------------------------------------- */ herr_t diff --git a/src/H5Fint.c b/src/H5Fint.c index 7371c46..a48e41c 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -21,20 +21,20 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Aprivate.h" /* Attributes */ -#include "H5ACprivate.h" /* Metadata cache */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ -#include "H5FDprivate.h" /* File drivers */ -#include "H5Gprivate.h" /* Groups */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MFprivate.h" /* File memory management */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5SMprivate.h" /* Shared Object Header Messages */ -#include "H5Tprivate.h" /* Datatypes */ +#include "H5private.h" /* Generic Functions */ +#include "H5Aprivate.h" /* Attributes */ +#include "H5ACprivate.h" /* Metadata cache */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ +#include "H5FDprivate.h" /* File drivers */ +#include "H5Gprivate.h" /* Groups */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MFprivate.h" /* File memory management */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5SMprivate.h" /* Shared Object Header Messages */ +#include "H5Tprivate.h" /* Datatypes */ /****************/ @@ -100,26 +100,19 @@ H5FL_DEFINE(H5F_file_t); /*------------------------------------------------------------------------- - * Function: H5F_get_access_plist + * Function: H5F_get_access_plist * - * Purpose: Returns a copy of the file access property list of the - * specified file. + * Purpose: Returns a copy of the file access property list of the + * specified file. * * NOTE: Make sure that, if you are going to overwrite * information in the copied property list that was * previously opened and assigned to the property list, then * you must close it before overwriting the values. * - * Return: Success: Object ID for a copy of the file access - * property list. - * - * Failure: FAIL - * - * Programmer: Quincey Koziol - * Wednesday, May 25, 2005 - * - * Modifications: - * + * Return: Success: Object ID for a copy of the file access + * property list. + * Failure: FAIL *------------------------------------------------------------------------- */ hid_t @@ -129,9 +122,9 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) H5P_genplist_t *old_plist; /* Old property list */ H5FD_driver_prop_t driver_prop; /* Property for driver ID & info */ hbool_t driver_prop_copied = FALSE; /* Whether the driver property has been set up */ - unsigned efc_size = 0; - hbool_t latest_format = FALSE; /* Always use the latest format? */ - hid_t ret_value = SUCCEED; /* Return value */ + unsigned efc_size = 0; + hbool_t latest_format = FALSE; /* Always use the latest format? */ + hid_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -142,7 +135,7 @@ H5F_get_access_plist(H5F_t *f, hbool_t app_ref) if(NULL == (old_plist = (H5P_genplist_t *)H5I_object(H5P_LST_FILE_ACCESS_ID_g))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") if((ret_value = H5P_copy_plist(old_plist, app_ref)) < 0) - HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list") + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTINIT, FAIL, "can't copy file access property list") if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(ret_value))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") @@ -222,16 +215,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_get_obj_count + * Function: H5F_get_obj_count * - * Purpose: Private function return the number of opened object IDs - * (files, datasets, groups, datatypes) in the same file. + * Purpose: Private function return the number of opened object IDs + * (files, datasets, groups, datatypes) in the same file. * * Return: SUCCEED on success, FAIL on failure. - * - * Programmer: Raymond Lu - * Wednesday, Dec 5, 2001 - * *------------------------------------------------------------------------- */ herr_t @@ -259,10 +248,6 @@ done: * Purpose: Private function to return a list of opened object IDs. * * Return: Non-negative on success; can't fail. - * - * Programmer: Raymond Lu - * Wednesday, Dec 5, 2001 - * *------------------------------------------------------------------------- */ herr_t @@ -285,16 +270,13 @@ done: /*--------------------------------------------------------------------------- - * Function: H5F_get_objects + * Function: H5F_get_objects * - * Purpose: This function is called by H5F_get_obj_count or - * H5F_get_obj_ids to get number of object IDs and/or a - * list of opened object IDs (in return value). - * Return: Non-negative on success; Can't fail. - * - * Programmer: Raymond Lu - * Wednesday, Dec 5, 2001 + * Purpose: This function is called by H5F_get_obj_count or + * H5F_get_obj_ids to get number of object IDs and/or a + * list of opened object IDs (in return value). * + * Return: Non-negative on success; Can't fail. *--------------------------------------------------------------------------- */ herr_t @@ -313,7 +295,7 @@ H5F_get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_ olist.obj_id_list = (max_nobjs==0 ? NULL : obj_id_list); olist.obj_id_count = &obj_id_count; olist.list_index = 0; - olist.max_nobjs = max_nobjs; + olist.max_nobjs = max_nobjs; /* Determine if we are searching for local or global objects */ if(types & H5F_OBJ_LOCAL) { @@ -337,37 +319,37 @@ H5F_get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_ * or the caller wants to get the list of IDs and the list isn't full, * search through dataset IDs to count number of datasets, and put their * IDs on the object list */ - if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) { + if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) { if (types & H5F_OBJ_DATASET) { olist.obj_type = H5I_DATASET; if(H5I_iterate(H5I_DATASET, H5F_get_objects_cb, &olist, app_ref) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(2)") } /* end if */ - } + } /* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero), * or the caller wants to get the list of IDs and the list isn't full, * search through group IDs to count number of groups, and put their * IDs on the object list */ - if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) { + if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) { if(types & H5F_OBJ_GROUP) { olist.obj_type = H5I_GROUP; if(H5I_iterate(H5I_GROUP, H5F_get_objects_cb, &olist, app_ref) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(3)") } /* end if */ - } + } /* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero), * or the caller wants to get the list of IDs and the list isn't full, * search through datatype IDs to count number of named datatypes, and put their * IDs on the object list */ - if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) { + if(!olist.max_nobjs || (olist.max_nobjs && olist.list_index<olist.max_nobjs)) { if(types & H5F_OBJ_DATATYPE) { olist.obj_type = H5I_DATATYPE; if(H5I_iterate(H5I_DATATYPE, H5F_get_objects_cb, &olist, app_ref) < 0) HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(4)") } /* end if */ - } + } /* If the caller just wants to count the number of objects (OLIST.MAX_NOBJS is zero), * or the caller wants to get the list of IDs and the list isn't full, @@ -380,7 +362,7 @@ H5F_get_objects(const H5F_t *f, unsigned types, size_t max_nobjs, hid_t *obj_id_ HGOTO_ERROR(H5E_FILE, H5E_BADITER, FAIL, "iteration failed(5)") } /* end if */ } - + /* Set the number of objects currently open */ *obj_id_count_ptr = obj_id_count; @@ -390,18 +372,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_get_objects_cb - * - * Purpose: H5F_get_objects' callback function. It verifies if an - * object is in the file, and either count it or put its ID - * on the list. + * Function: H5F_get_objects_cb * - * Return: H5_ITER_STOP if the array of object IDs is filled up. - * H5_ITER_CONT otherwise. - * - * Programmer: Raymond Lu - * Wednesday, Dec 5, 2001 + * Purpose: H5F_get_objects' callback function. It verifies if an + * object is in the file, and either count it or put its ID + * on the list. * + * Return: H5_ITER_STOP if the array of object IDs is filled up. + * H5_ITER_CONT otherwise. *------------------------------------------------------------------------- */ static int @@ -419,77 +397,79 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) /* Count file IDs */ if(olist->obj_type == H5I_FILE) { if((olist->file_info.local && - (!olist->file_info.ptr.file || (olist->file_info.ptr.file && (H5F_t*)obj_ptr == olist->file_info.ptr.file) )) - || (!olist->file_info.local && - ( !olist->file_info.ptr.shared || (olist->file_info.ptr.shared && ((H5F_t*)obj_ptr)->shared == olist->file_info.ptr.shared) ))) { + (!olist->file_info.ptr.file || + (olist->file_info.ptr.file && (H5F_t*)obj_ptr == olist->file_info.ptr.file))) || + (!olist->file_info.local && + (!olist->file_info.ptr.shared || + (olist->file_info.ptr.shared && ((H5F_t*)obj_ptr)->shared == olist->file_info.ptr.shared)))) { add_obj = TRUE; - } /* end if */ + } /* end if */ } /* end if */ else { /* either count opened object IDs or put the IDs on the list */ H5O_loc_t *oloc; /* Group entry info for object */ - switch(olist->obj_type) { - case H5I_ATTR: - oloc = H5A_oloc((H5A_t *)obj_ptr); - break; - - case H5I_GROUP: - oloc = H5G_oloc((H5G_t *)obj_ptr); - break; - - case H5I_DATASET: - oloc = H5D_oloc((H5D_t *)obj_ptr); - break; - - case H5I_DATATYPE: - if(H5T_is_named((H5T_t*)obj_ptr)==TRUE) - oloc = H5T_oloc((H5T_t*)obj_ptr); - else - oloc = NULL; - break; - - case H5I_UNINIT: - case H5I_BADID: - case H5I_FILE: - case H5I_DATASPACE: - case H5I_REFERENCE: - case H5I_VFL: - case H5I_GENPROP_CLS: - case H5I_GENPROP_LST: - case H5I_ERROR_CLASS: - case H5I_ERROR_MSG: - case H5I_ERROR_STACK: - case H5I_NTYPES: + switch(olist->obj_type) { + case H5I_ATTR: + oloc = H5A_oloc((H5A_t *)obj_ptr); + break; + + case H5I_GROUP: + oloc = H5G_oloc((H5G_t *)obj_ptr); + break; + + case H5I_DATASET: + oloc = H5D_oloc((H5D_t *)obj_ptr); + break; + + case H5I_DATATYPE: + if(H5T_is_named((H5T_t*)obj_ptr)==TRUE) + oloc = H5T_oloc((H5T_t*)obj_ptr); + else + oloc = NULL; + break; + + case H5I_UNINIT: + case H5I_BADID: + case H5I_FILE: + case H5I_DATASPACE: + case H5I_REFERENCE: + case H5I_VFL: + case H5I_GENPROP_CLS: + case H5I_GENPROP_LST: + case H5I_ERROR_CLASS: + case H5I_ERROR_MSG: + case H5I_ERROR_STACK: + case H5I_NTYPES: default: HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5_ITER_ERROR, "unknown data object") - } /* end switch */ + } /* end switch */ if((olist->file_info.local && - ( (!olist->file_info.ptr.file && olist->obj_type == H5I_DATATYPE && H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) - || (!olist->file_info.ptr.file && olist->obj_type != H5I_DATATYPE) - || (oloc && oloc->file == olist->file_info.ptr.file))) - || (!olist->file_info.local && - ((!olist->file_info.ptr.shared && olist->obj_type == H5I_DATATYPE && H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) - || (!olist->file_info.ptr.shared && olist->obj_type != H5I_DATATYPE) - || (oloc && oloc->file && oloc->file->shared == olist->file_info.ptr.shared)))) { + ((!olist->file_info.ptr.file && olist->obj_type == H5I_DATATYPE && H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) || + (!olist->file_info.ptr.file && olist->obj_type != H5I_DATATYPE) || + (oloc && oloc->file == olist->file_info.ptr.file))) || + (!olist->file_info.local && + ((!olist->file_info.ptr.shared && olist->obj_type == H5I_DATATYPE && H5T_is_immutable((H5T_t *)obj_ptr) == FALSE) || + (!olist->file_info.ptr.shared && olist->obj_type != H5I_DATATYPE) || + (oloc && oloc->file && oloc->file->shared == olist->file_info.ptr.shared)))) { add_obj = TRUE; - } /* end if */ + } /* end if */ } /* end else */ if(add_obj) { /* Add the object's ID to the ID list, if appropriate */ if(olist->obj_id_list) { olist->obj_id_list[olist->list_index] = obj_id; - olist->list_index++; - } /* end if */ + olist->list_index++; + } /* end if */ /* Increment the number of open objects */ - if(olist->obj_id_count) + if(olist->obj_id_count) (*olist->obj_id_count)++; /* Check if we've filled up the array. Return H5_ITER_STOP only if * we have filled up the array. Otherwise return H5_ITER_CONT(RET_VALUE is - * preset to H5_ITER_CONT) because H5I_iterate needs the return value of + * preset to H5_ITER_CONT) because H5I_iterate needs the return value of * H5_ITER_CONT to continue the iteration. */ if(olist->max_nobjs > 0 && olist->list_index >= olist->max_nobjs) HGOTO_DONE(H5_ITER_STOP) /* Indicate that the iterator should stop */ @@ -501,35 +481,31 @@ done: /*------------------------------------------------------------------------- - * Function: H5F__is_hdf5 - * - * Purpose: Check the file signature to detect an HDF5 file. - * - * Bugs: This function is not robust: it only uses the default file - * driver when attempting to open the file when in fact it - * should use all known file drivers. - * - * Return: Success: TRUE/FALSE + * Function: H5F__is_hdf5 * - * Failure: Negative + * Purpose: Check the file signature to detect an HDF5 file. * - * Programmer: Unknown + * Bugs: This function is not robust: it only uses the default file + * driver when attempting to open the file when in fact it + * should use all known file drivers. * + * Return: Success: TRUE/FALSE + * * Failure: Negative *------------------------------------------------------------------------- */ htri_t H5F__is_hdf5(const char *name, hid_t meta_dxpl_id, hid_t raw_dxpl_id) { - H5FD_t *file = NULL; /* Low-level file struct */ - H5FD_io_info_t fdio_info; /* File driver I/O info */ - haddr_t sig_addr; /* Addess of hdf5 file signature */ - htri_t ret_value = FAIL; /* Return value */ + H5FD_t *file = NULL; /* Low-level file struct */ + H5FD_io_info_t fdio_info; /* File driver I/O info */ + haddr_t sig_addr; /* Addess of hdf5 file signature */ + htri_t ret_value = FAIL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Open the file at the virtual file layer */ if(NULL == (file = H5FD_open(name, H5F_ACC_RDONLY, H5P_FILE_ACCESS_DEFAULT, HADDR_UNDEF))) - HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file") + HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file") /* Set up the file driver info */ fdio_info.file = file; @@ -554,31 +530,23 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_new - * - * Purpose: Creates a new file object and initializes it. The - * H5Fopen and H5Fcreate functions then fill in various - * fields. If SHARED is a non-null pointer then the shared info - * to which it points has the reference count incremented. - * Otherwise a new, empty shared info struct is created and - * initialized with the specified file access property list. - * - * Errors: - * - * Return: Success: Ptr to a new file struct. + * Function: H5F_new * - * Failure: NULL - * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 18 1997 + * Purpose: Creates a new file object and initializes it. The + * H5Fopen and H5Fcreate functions then fill in various fields. + * If SHARED is a non-null pointer then the shared info + * to which it points has the reference count incremented. + * Otherwise a new, empty shared info struct is created and + * initialized with the specified file access property list. * + * Return: Success: Ptr to a new file struct. + * Failure: NULL *------------------------------------------------------------------------- */ H5F_t * H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf) { - H5F_t *f = NULL, *ret_value = NULL; + H5F_t *f = NULL, *ret_value = NULL; FUNC_ENTER_NOAPI_NOINIT @@ -592,8 +560,8 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t } /* end if */ else { H5P_genplist_t *plist; /* Property list */ - unsigned efc_size; /* External file cache size */ - hbool_t latest_format; /* Always use the latest format? */ + unsigned efc_size; /* External file cache size */ + hbool_t latest_format; /* Always use the latest format? */ size_t u; /* Local index variable */ HDassert(lf != NULL); @@ -650,7 +618,7 @@ H5F_new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get file space page size") HDassert(f->shared->fs_page_size >= H5F_FILE_SPACE_PAGE_SIZE_MIN); - /* Temporary for multi/split drivers: fail file creation + /* Temporary for multi/split drivers: fail file creation when persisting free-space or using paged aggregation strategy */ if(H5F_HAS_FEATURE(f, H5FD_FEAT_PAGED_AGGR)) if(f->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE || f->shared->fs_persist) @@ -826,25 +794,20 @@ done: /*------------------------------------------------------------------------- - * Function: H5F__dest - * - * Purpose: Destroys a file structure. This function flushes the cache - * but doesn't do any other cleanup other than freeing memory - * for the file struct. The shared info for the file is freed - * only when its reference count reaches zero. + * Function: H5F__dest * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jul 18 1997 + * Purpose: Destroys a file structure. This function flushes the cache + * but doesn't do any other cleanup other than freeing memory + * for the file struct. The shared info for the file is freed + * only when its reference count reaches zero. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -866,7 +829,7 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) HDONE_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cached data (phase 1)") /* Notify the metadata cache that the file is about to be closed. - * This allows the cache to set up for creating a metadata cache + * This allows the cache to set up for creating a metadata cache * image if this has been requested. */ if(H5AC_prep_for_file_close(f, meta_dxpl_id) < 0) @@ -883,7 +846,7 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) HDONE_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cached data (phase 2)") /* With the shutdown modifications, the contents of the metadata cache - * should be clean at this point, with the possible exception of the + * should be clean at this point, with the possible exception of the * the superblock and superblock extension. * * Verify this. @@ -909,10 +872,10 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) /* Release objects that depend on the superblock being initialized */ if(f->shared->sblock) { /* Shutdown file free space manager(s) */ - /* (We should release the free space information now (before - * truncating the file and before the metadata cache is shut - * down) since the free space manager is holding some data - * structures in memory and also because releasing free space + /* (We should release the free space information now (before + * truncating the file and before the metadata cache is shut + * down) since the free space manager is holding some data + * structures in memory and also because releasing free space * can shrink the file's 'eoa' value) * * Update 11/1/16: @@ -938,7 +901,7 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) * free space manager may dirty some data structures again. */ if(flush) { - /* Clear status_flags */ + /* Clear status_flags */ f->shared->sblock->status_flags &= (uint8_t)(~H5F_SUPER_WRITE_ACCESS); f->shared->sblock->status_flags &= (uint8_t)(~H5F_SUPER_SWMR_WRITE_ACCESS); @@ -947,8 +910,8 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) /* Push error, but keep going*/ HDONE_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") - /* Release any space allocated to space aggregators, - * so that the eoa value corresponds to the end of the + /* Release any space allocated to space aggregators, + * so that the eoa value corresponds to the end of the * space written to in the file. * * At most, this should change the superblock or the @@ -967,11 +930,11 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) * extension should be dirty. */ HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM)); - } /* end if */ + } /* end if */ } /* end if */ /* if it exists, unpin the driver information block cache entry, - * since we're about to destroy the cache + * since we're about to destroy the cache */ if(f->shared->drvinfo) if(H5AC_unpin_entry(f->shared->drvinfo) < 0) @@ -991,7 +954,7 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) * Verify this. */ HDassert(H5AC_cache_is_clean(f, H5AC_RING_MDFSM)); - + /* Remove shared file struct from list of open files */ if(H5F_sfile_remove(f->shared) < 0) /* Push error, but keep going*/ @@ -1067,7 +1030,8 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) /* Destroy shared file struct */ f->shared = (H5F_file_t *)H5FL_FREE(H5F_file_t, f->shared); - } else if(f->shared->nrefs > 0) { + } + else if(f->shared->nrefs > 0) { /* * There are other references to the shared part of the file. * Only decrement the reference count. @@ -1089,42 +1053,42 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) /*------------------------------------------------------------------------- - * Function: H5F_open + * Function: H5F_open * - * Purpose: Opens (or creates) a file. This function understands the - * following flags which are similar in nature to the Posix - * open(2) flags. + * Purpose: Opens (or creates) a file. This function understands the + * following flags which are similar in nature to the Posix + * open(2) flags. * - * H5F_ACC_RDWR: Open with read/write access. If the file is - * currently open for read-only access then it - * will be reopened. Absence of this flag - * implies read-only access. + * H5F_ACC_RDWR: Open with read/write access. If the file is + * currently open for read-only access then it + * will be reopened. Absence of this flag + * implies read-only access. * - * H5F_ACC_CREAT: Create a new file if it doesn't exist yet. - * The permissions are 0666 bit-wise AND with - * the current umask. H5F_ACC_WRITE must also - * be specified. + * H5F_ACC_CREAT: Create a new file if it doesn't exist yet. + * The permissions are 0666 bit-wise AND with + * the current umask. H5F_ACC_WRITE must also + * be specified. * - * H5F_ACC_EXCL: This flag causes H5F_open() to fail if the - * file already exists. + * H5F_ACC_EXCL: This flag causes H5F_open() to fail if the + * file already exists. * - * H5F_ACC_TRUNC: The file is truncated and a new HDF5 superblock - * is written. This operation will fail if the - * file is already open. + * H5F_ACC_TRUNC: The file is truncated and a new HDF5 superblock + * is written. This operation will fail if the + * file is already open. * - * Unlinking the file name from the group directed graph while - * the file is opened causes the file to continue to exist but - * one will not be able to upgrade the file from read-only - * access to read-write access by reopening it. Disk resources - * for the file are released when all handles to the file are - * closed. NOTE: This paragraph probably only applies to Unix; - * deleting the file name in other OS's has undefined results. + * Unlinking the file name from the group directed graph while + * the file is opened causes the file to continue to exist but + * one will not be able to upgrade the file from read-only + * access to read-write access by reopening it. Disk resources + * for the file are released when all handles to the file are + * closed. NOTE: This paragraph probably only applies to Unix; + * deleting the file name in other OS's has undefined results. * - * The CREATE_PARMS argument is optional. A null pointer will - * cause the default file creation parameters to be used. + * The CREATE_PARMS argument is optional. A null pointer will + * cause the default file creation parameters to be used. * - * The ACCESS_PARMS argument is optional. A null pointer will - * cause the default file access parameters to be used. + * The ACCESS_PARMS argument is optional. A null pointer will + * cause the default file access parameters to be used. * * The following two tables show results of file opens for single and concurrent access: * @@ -1157,12 +1121,8 @@ H5F__dest(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t flush) * s: the open succeeds with flags combination from both the first and second opens * * - * Return: Success: A new file pointer. - * Failure: NULL - * - * Programmer: Robb Matzke - * Tuesday, September 23, 1997 - * + * Return: Success: A new file pointer. + * Failure: NULL *------------------------------------------------------------------------- */ H5F_t * @@ -1181,7 +1141,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, unsigned page_buf_min_meta_perc; unsigned page_buf_min_raw_perc; hbool_t set_flag = FALSE; /*set the status_flags in the superblock */ - hbool_t clear = FALSE; /*clear the status_flags */ + hbool_t clear = FALSE; /*clear the status_flags */ hbool_t evict_on_close; /* evict on close value from plist */ H5F_t *ret_value = NULL; /*actual return value */ char *lock_env_var = NULL;/*env var pointer */ @@ -1210,7 +1170,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, if(lock_env_var && !HDstrcmp(lock_env_var, "FALSE")) use_file_locking = FALSE; else - use_file_locking = TRUE; + use_file_locking = TRUE; /* * Opening a file is a two step process. First we try to open the @@ -1299,8 +1259,8 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, /* Place an advisory lock on the file */ if(use_file_locking) if(H5FD_lock(lf, (hbool_t)((flags & H5F_ACC_RDWR) ? TRUE : FALSE)) < 0) { - /* Locking failed - Closing will remove the lock */ - if(H5FD_close(lf) < 0) + /* Locking failed - Closing will remove the lock */ + if(H5FD_close(lf) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info") HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to lock the file") } /* end if */ @@ -1311,7 +1271,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, * returned is NULL, H5FD_close() will never be called via H5F_dest() * so we have to close lf here before heading to the error handling. */ - if(H5FD_close(lf) < 0) + if(H5FD_close(lf) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to close low-level file info") HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to initialize file structure") } /* end if */ @@ -1475,7 +1435,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, NULL, "unable to flush superblock extension") /* Remove the file lock for SWMR_WRITE */ - if(use_file_locking && (H5F_INTENT(file) & H5F_ACC_SWMR_WRITE)) { + if(use_file_locking && (H5F_INTENT(file) & H5F_ACC_SWMR_WRITE)) { if(H5FD_unlock(file->shared->lf) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to unlock the file") } /* end if */ @@ -1483,11 +1443,11 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, else { /* H5F_ACC_RDONLY: check consistency of status_flags */ /* Skip check of status_flags for file with < superblock version 3 */ if(file->shared->sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_3) { - if(H5F_INTENT(file) & H5F_ACC_SWMR_READ) { - if((file->shared->sblock->status_flags & H5F_SUPER_WRITE_ACCESS && + if(H5F_INTENT(file) & H5F_ACC_SWMR_READ) { + if((file->shared->sblock->status_flags & H5F_SUPER_WRITE_ACCESS && !(file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS)) - || - (!(file->shared->sblock->status_flags & H5F_SUPER_WRITE_ACCESS) && + || + (!(file->shared->sblock->status_flags & H5F_SUPER_WRITE_ACCESS) && file->shared->sblock->status_flags & H5F_SUPER_SWMR_WRITE_ACCESS)) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "file is not already open for SWMR writing") } /* end if */ @@ -1511,16 +1471,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_flush_phase1 - * - * Purpose: First phase of flushing cached data. + * Function: H5F_flush_phase1 * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * koziol@lbl.gov - * Jan 1 2017 + * Purpose: First phase of flushing cached data. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ static herr_t @@ -1553,16 +1508,11 @@ H5F__flush_phase1(H5F_t *f, hid_t meta_dxpl_id) /*------------------------------------------------------------------------- - * Function: H5F__flush_phase2 - * - * Purpose: Second phase of flushing cached data. - * - * Return: Non-negative on success/Negative on failure + * Function: H5F__flush_phase2 * - * Programmer: Quincey Koziol - * koziol@lbl.gov - * Jan 1 2017 + * Purpose: Second phase of flushing cached data. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ static herr_t @@ -1620,16 +1570,11 @@ H5F__flush_phase2(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t closi /*------------------------------------------------------------------------- - * Function: H5F__flush + * Function: H5F__flush * - * Purpose: Flushes cached data. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Aug 29 1997 + * Purpose: Flushes cached data. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1657,33 +1602,29 @@ H5F__flush(H5F_t *f, hid_t meta_dxpl_id, hid_t raw_dxpl_id, hbool_t closing) /*------------------------------------------------------------------------- - * Function: H5F_close - * - * Purpose: Closes a file or causes the close operation to be pended. - * This function is called two ways: from the API it gets called - * by H5Fclose->H5I_dec_ref->H5F_close when H5I_dec_ref() - * decrements the file ID reference count to zero. The file ID - * is removed from the H5I_FILE group by H5I_dec_ref() just - * before H5F_close() is called. If there are open object - * headers then the close is pended by moving the file to the - * H5I_FILE_CLOSING ID group (the f->closing contains the ID - * assigned to file). - * - * This function is also called directly from H5O_close() when - * the last object header is closed for the file and the file - * has a pending close. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Robb Matzke - * Tuesday, September 23, 1997 - * + * Function: H5F_close + * + * Purpose: Closes a file or causes the close operation to be pended. + * This function is called two ways: from the API it gets called + * by H5Fclose->H5I_dec_ref->H5F_close when H5I_dec_ref() + * decrements the file ID reference count to zero. The file ID + * is removed from the H5I_FILE group by H5I_dec_ref() just + * before H5F_close() is called. If there are open object + * headers then the close is pended by moving the file to the + * H5I_FILE_CLOSING ID group (the f->closing contains the ID + * assigned to file). + * + * This function is also called directly from H5O_close() when + * the last object header is closed for the file and the file + * has a pending close. + * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t H5F_close(H5F_t *f) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1722,18 +1663,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_try_close + * Function: H5F_try_close * - * Purpose: Attempts to close a file due to one of several actions: + * Purpose: Attempts to close a file due to one of several actions: * - The reference count on the file ID dropped to zero * - The last open object was closed in the file * - The file was unmounted * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Tuesday, July 19, 2005 - * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -1741,7 +1678,7 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) { unsigned nopen_files = 0; /* Number of open files in file/mount hierarchy */ unsigned nopen_objs = 0; /* Number of open objects in file/mount hierarchy */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1772,12 +1709,12 @@ H5F_try_close(H5F_t *f, hbool_t *was_closed /*out*/) /* * Close file according to close degree: * - * H5F_CLOSE_WEAK: if there are still objects open, wait until - * they are all closed. - * H5F_CLOSE_SEMI: if there are still objects open, return fail; - * otherwise, close file. - * H5F_CLOSE_STRONG: if there are still objects open, close them - * first, then close file. + * H5F_CLOSE_WEAK: if there are still objects open, wait until + * they are all closed. + * H5F_CLOSE_SEMI: if there are still objects open, return fail; + * otherwise, close file. + * H5F_CLOSE_STRONG: if there are still objects open, close them + * first, then close file. */ switch(f->shared->fc_degree) { case H5F_CLOSE_WEAK: @@ -1899,16 +1836,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_get_id - * - * Purpose: Get the file ID, incrementing it, or "resurrecting" it as - * appropriate. - * - * Return: Non-negative on success/Negative on failure + * Function: H5F_get_id * - * Programmer: Raymond Lu - * Oct 29, 2003 + * Purpose: Get the file ID, incrementing it, or "resurrecting" it as + * appropriate. * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ hid_t @@ -1923,8 +1856,9 @@ H5F_get_id(H5F_t *file, hbool_t app_ref) if(file->file_id == -1) { /* Get an atom for the file */ if((file->file_id = H5I_register(H5I_FILE, file, app_ref)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file") - } else { + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file") + } + else { /* Increment reference count on atom. */ if(H5I_inc_ref(file->file_id, app_ref) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTSET, FAIL, "incrementing file ID failed") @@ -1938,18 +1872,12 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_incr_nopen_objs - * - * Purpose: Increment the number of open objects for a file. - * - * Return: Success: The number of open objects, after the increment + * Function: H5F_incr_nopen_objs * - * Failure: (can't happen) - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 6 2007 + * Purpose: Increment the number of open objects for a file. * + * Return: Success: The number of open objects, after the increment + * Failure: (can't happen) *------------------------------------------------------------------------- */ unsigned @@ -1965,18 +1893,12 @@ H5F_incr_nopen_objs(H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_decr_nopen_objs - * - * Purpose: Decrement the number of open objects for a file. - * - * Return: Success: The number of open objects, after the decrement - * - * Failure: (can't happen) + * Function: H5F_decr_nopen_objs * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 6 2007 + * Purpose: Decrement the number of open objects for a file. * + * Return: Success: The number of open objects, after the decrement + * Failure: (can't happen) *------------------------------------------------------------------------- */ unsigned @@ -1992,18 +1914,14 @@ H5F_decr_nopen_objs(H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_build_actual_name + * Function: H5F_build_actual_name * - * Purpose: Retrieve the name of a file, after following symlinks, etc. + * Purpose: Retrieve the name of a file, after following symlinks, etc. * - * Note: Currently only working for "POSIX I/O compatible" VFDs - * - * Return: Success: 0 - * Failure: -1 - * - * Programmer: Quincey Koziol - * November 25, 2009 + * Note: Currently only working for "POSIX I/O compatible" VFDs * + * Return: Success: 0 + * Failure: -1 *------------------------------------------------------------------------- */ static herr_t @@ -2118,17 +2036,13 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_addr_encode_len - * - * Purpose: Encodes an address into the buffer pointed to by *PP and - * then increments the pointer to the first byte after the - * address. An undefined value is stored as all 1's. + * Function: H5F_addr_encode_len * - * Return: void - * - * Programmer: Robb Matzke - * Friday, November 7, 1997 + * Purpose: Encodes an address into the buffer pointed to by *PP and + * then increments the pointer to the first byte after the + * address. An undefined value is stored as all 1's. * + * Return: void *------------------------------------------------------------------------- */ void @@ -2143,15 +2057,15 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr) HDassert(pp && *pp); if(H5F_addr_defined(addr)) { - for(u = 0; u < addr_len; u++) { - *(*pp)++ = (uint8_t)(addr & 0xff); - addr >>= 8; - } /* end for */ - HDassert("overflow" && 0 == addr); + for(u = 0; u < addr_len; u++) { + *(*pp)++ = (uint8_t)(addr & 0xff); + addr >>= 8; + } /* end for */ + HDassert("overflow" && 0 == addr); } /* end if */ else { - for(u = 0; u < addr_len; u++) - *(*pp)++ = 0xff; + for(u = 0; u < addr_len; u++) + *(*pp)++ = 0xff; } /* end else */ FUNC_LEAVE_NOAPI_VOID @@ -2159,17 +2073,13 @@ H5F_addr_encode_len(size_t addr_len, uint8_t **pp/*in,out*/, haddr_t addr) /*------------------------------------------------------------------------- - * Function: H5F_addr_encode - * - * Purpose: Encodes an address into the buffer pointed to by *PP and - * then increments the pointer to the first byte after the - * address. An undefined value is stored as all 1's. - * - * Return: void + * Function: H5F_addr_encode * - * Programmer: Robb Matzke - * Friday, November 7, 1997 + * Purpose: Encodes an address into the buffer pointed to by *PP and + * then increments the pointer to the first byte after the + * address. An undefined value is stored as all 1's. * + * Return: void *------------------------------------------------------------------------- */ void @@ -2187,27 +2097,23 @@ H5F_addr_encode(const H5F_t *f, uint8_t **pp/*in,out*/, haddr_t addr) /*------------------------------------------------------------------------- - * Function: H5F_addr_decode_len + * Function: H5F_addr_decode_len * - * Purpose: Decodes an address from the buffer pointed to by *PP and - * updates the pointer to point to the next byte after the - * address. + * Purpose: Decodes an address from the buffer pointed to by *PP and + * updates the pointer to point to the next byte after the + * address. * - * If the value read is all 1's then the address is returned - * with an undefined value. - * - * Return: void - * - * Programmer: Robb Matzke - * Friday, November 7, 1997 + * If the value read is all 1's then the address is returned + * with an undefined value. * + * Return: void *------------------------------------------------------------------------- */ void H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*out*/) { - hbool_t all_zero = TRUE; /* True if address was all zeroes */ - unsigned u; /* Local index variable */ + hbool_t all_zero = TRUE; /* True if address was all zeroes */ + unsigned u; /* Local index variable */ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -2221,27 +2127,27 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr /* Decode bytes from address */ for(u = 0; u < addr_len; u++) { - uint8_t c; /* Local decoded byte */ + uint8_t c; /* Local decoded byte */ /* Get decoded byte (and advance pointer) */ - c = *(*pp)++; + c = *(*pp)++; /* Check for non-undefined address byte value */ - if(c != 0xff) + if(c != 0xff) all_zero = FALSE; - if(u < sizeof(*addr_p)) { - haddr_t tmp = c; /* Local copy of address, for casting */ + if(u < sizeof(*addr_p)) { + haddr_t tmp = c; /* Local copy of address, for casting */ /* Shift decoded byte to correct position */ - tmp <<= (u * 8); /*use tmp to get casting right */ + tmp <<= (u * 8); /*use tmp to get casting right */ /* Merge into already decoded bytes */ - *addr_p |= tmp; - } /* end if */ + *addr_p |= tmp; + } /* end if */ else if(!all_zero) - HDassert(0 == **pp); /*overflow */ + HDassert(0 == **pp); /*overflow */ } /* end for */ /* If 'all_zero' is still TRUE, the address was entirely composed of '0xff' @@ -2255,20 +2161,16 @@ H5F_addr_decode_len(size_t addr_len, const uint8_t **pp/*in,out*/, haddr_t *addr /*------------------------------------------------------------------------- - * Function: H5F_addr_decode + * Function: H5F_addr_decode * - * Purpose: Decodes an address from the buffer pointed to by *PP and - * updates the pointer to point to the next byte after the - * address. + * Purpose: Decodes an address from the buffer pointed to by *PP and + * updates the pointer to point to the next byte after the + * address. * - * If the value read is all 1's then the address is returned - * with an undefined value. - * - * Return: void - * - * Programmer: Robb Matzke - * Friday, November 7, 1997 + * If the value read is all 1's then the address is returned + * with an undefined value. * + * Return: void *------------------------------------------------------------------------- */ void @@ -2292,10 +2194,6 @@ H5F_addr_decode(const H5F_t *f, const uint8_t **pp/*in,out*/, haddr_t *addr_p/*o * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Quincey Koziol - * 7/19/11 - * *------------------------------------------------------------------------- */ herr_t @@ -2322,10 +2220,6 @@ H5F_set_grp_btree_shared(H5F_t *f, H5UC_t *rc) * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Quincey Koziol - * 7/20/11 - * *------------------------------------------------------------------------- */ herr_t @@ -2351,10 +2245,6 @@ H5F_set_sohm_addr(H5F_t *f, haddr_t addr) * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Quincey Koziol - * 7/20/11 - * *------------------------------------------------------------------------- */ herr_t @@ -2380,10 +2270,6 @@ H5F_set_sohm_vers(H5F_t *f, unsigned vers) * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Quincey Koziol - * 7/20/11 - * *------------------------------------------------------------------------- */ herr_t @@ -2409,10 +2295,6 @@ H5F_set_sohm_nindexes(H5F_t *f, unsigned nindexes) * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Quincey Koziol - * 7/20/11 - * *------------------------------------------------------------------------- */ herr_t @@ -2438,10 +2320,6 @@ H5F_set_store_msg_crt_idx(H5F_t *f, hbool_t flag) * * Return: Success: Bytes copied / number of bytes needed. * Failure: negative value - * - * Programmer: John Mainzer - * 11/15/11 - * *------------------------------------------------------------------------- */ ssize_t @@ -2482,20 +2360,20 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, hid_t meta_dxpl_i if(HDstrcmp(fd_ptr->cls->name, "multi") == 0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not supported for multi file driver.") - /* While the family file driver is conceptually fully compatible + /* While the family file driver is conceptually fully compatible * with the get file image operation, it sets a file driver message * in the super block that prevents the image being opened with any * driver other than the family file driver. Needless to say, this * rather defeats the purpose of the get file image operation. * - * While this problem is quire solvable, the required time and + * While this problem is quire solvable, the required time and * resources are lacking at present. Hence, for now, we don't - * allow the get file image operation to be perfomed on files + * allow the get file image operation to be perfomed on files * opened with the family file driver. * - * Observe that the following test only looks at the top level + * Observe that the following test only looks at the top level * driver, and fails if there is some other driver sitting on to - * of the family file driver. + * of the family file driver. * * I don't think this can happen at present, but that may change * in the future. @@ -2514,7 +2392,7 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, hid_t meta_dxpl_i /* test to see if a buffer was provided -- if not, we are done */ if(buf_ptr != NULL) { H5FD_io_info_t fdio_info; /* File driver I/O info */ - size_t space_needed; /* size of file image */ + size_t space_needed; /* size of file image */ hsize_t tmp; size_t tmp_size; @@ -2545,34 +2423,31 @@ H5F_get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len, hid_t meta_dxpl_i HDmemset((uint8_t *)(buf_ptr) + tmp, 0, tmp_size); } /* end if */ - + done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_get_file_image() */ /*------------------------------------------------------------------------- - * Function: H5F_track_metadata_read_retries - * - * Purpose: To track the # of a "retries" (log10) for a metadata item. - * This routine should be used only when: - * "retries" > 0 - * f->shared->read_attempts > 1 (does not have retry when 1) - * f->shared->retries_nbins > 0 (calculated based on f->shared->read_attempts) + * Function: H5F_track_metadata_read_retries * - * Return: Success: SUCCEED - * Failure: FAIL - * - * Programmer: Vailin Choi; October 2013 + * Purpose: To track the # of a "retries" (log10) for a metadata item. + * This routine should be used only when: + * "retries" > 0 + * f->shared->read_attempts > 1 (does not have retry when 1) + * f->shared->retries_nbins > 0 (calculated based on f->shared->read_attempts) * + * Return: Success: SUCCEED + * Failure: FAIL *------------------------------------------------------------------------- */ herr_t H5F_track_metadata_read_retries(H5F_t *f, unsigned actype, unsigned retries) { - unsigned log_ind; /* Index to the array of retries based on log10 of retries */ - double tmp; /* Temporary value, to keep compiler quiet */ - herr_t ret_value = SUCCEED; /* Return value */ + unsigned log_ind; /* Index to the array of retries based on log10 of retries */ + double tmp; /* Temporary value, to keep compiler quiet */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -2603,23 +2478,20 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_set_retries - * - * Purpose: To initialize data structures for read retries: - * --zero out "retries" - * --set up "retries_nbins" based on read_attempts - * - * Return: Success: SUCCEED - * Failure: FAIL + * Function: H5F_set_retries * - * Programmer: Vailin Choi; November 2013 + * Purpose: To initialize data structures for read retries: + * --zero out "retries" + * --set up "retries_nbins" based on read_attempts * + * Return: Success: SUCCEED + * Failure: FAIL *------------------------------------------------------------------------- */ herr_t H5F_set_retries(H5F_t *f) { - double tmp; /* Temporary variable */ + double tmp; /* Temporary variable */ /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -2649,9 +2521,6 @@ H5F_set_retries(H5F_t *f) * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Vailin Choi; October 2013 - * *------------------------------------------------------------------------- */ herr_t @@ -2675,15 +2544,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5F__set_base_addr + * Function: H5F__set_base_addr * - * Purpose: Quick and dirty routine to set the file's 'base_addr' value - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * July 19, 2013 + * Purpose: Quick and dirty routine to set the file's 'base_addr' value * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -2698,7 +2563,7 @@ H5F__set_base_addr(const H5F_t *f, haddr_t addr) /* Dispatch to driver */ if(H5FD_set_base_addr(f->shared->lf, addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_base_addr request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_base_addr request failed") done: FUNC_LEAVE_NOAPI(ret_value) @@ -2706,15 +2571,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5F__set_eoa - * - * Purpose: Quick and dirty routine to set the file's 'eoa' value + * Function: H5F__set_eoa * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * July 19, 2013 + * Purpose: Quick and dirty routine to set the file's 'eoa' value * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -2729,7 +2590,7 @@ H5F__set_eoa(const H5F_t *f, H5F_mem_t type, haddr_t addr) /* Dispatch to driver */ if(H5FD_set_eoa(f->shared->lf, type, addr) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_eoa request failed") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "driver set_eoa request failed") done: FUNC_LEAVE_NOAPI(ret_value) @@ -2737,15 +2598,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5F__set_paged_aggr - * - * Purpose: Quick and dirty routine to set the file's paged_aggr mode + * Function: H5F__set_paged_aggr * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * June 19, 2015 + * Purpose: Quick and dirty routine to set the file's paged_aggr mode * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t @@ -2776,10 +2633,6 @@ done: * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Quincey Koziol - * 2/10/16 - * *------------------------------------------------------------------------- */ void @@ -2805,10 +2658,6 @@ H5F_set_coll_md_read(H5F_t *f, H5P_coll_md_read_flag_t cmr) * * Return: Success: SUCCEED * Failure: FAIL - * - * Programmer: Quincey Koziol - * 4/26/16 - * *------------------------------------------------------------------------- */ herr_t diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 41cf4d2..cc2399b 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -26,16 +26,16 @@ /* Module Setup */ /****************/ -#include "H5Fmodule.h" /* This source code file is part of the H5F module */ +#include "H5Fmodule.h" /* This source code file is part of the H5F module */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ -#include "H5FDprivate.h" /* File drivers */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ +#include "H5FDprivate.h" /* File drivers */ /****************/ @@ -75,17 +75,13 @@ /*------------------------------------------------------------------------- - * Function: H5F_get_intent + * Function: H5F_get_intent * - * Purpose: Quick and dirty routine to retrieve the file's 'intent' flags - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: 'intent' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> - * September 29, 2000 + * Purpose: Quick and dirty routine to retrieve the file's 'intent' flags + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: 'intent' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ unsigned @@ -101,16 +97,12 @@ H5F_get_intent(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_open_name - * - * Purpose: Retrieve the name used to open a file. - * - * Return: Success: The name of the file. - * Failure: ? (should not happen) + * Function: H5F_get_open_name * - * Programmer: Neil Fortner - * December 15 2008 + * Purpose: Retrieve the name used to open a file. * + * Return: Success: The name of the file. + * Failure: ? (should not happen) *------------------------------------------------------------------------- */ char * @@ -127,16 +119,12 @@ H5F_get_open_name(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_actual_name + * Function: H5F_get_actual_name * - * Purpose: Retrieve the actual name of a file, after resolving symlinks, etc. - * - * Return: Success: The name of the file. - * Failure: ? (should not happen) - * - * Programmer: Quincey Koziol - * November 25 2009 + * Purpose: Retrieve the actual name of a file, after resolving symlinks, etc. * + * Return: Success: The name of the file. + * Failure: ? (should not happen) *------------------------------------------------------------------------- */ char * @@ -153,16 +141,13 @@ H5F_get_actual_name(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_extpath - * - * Purpose: Retrieve the file's 'extpath' flags - * This is used by H5L_extern_traverse() and H5D_build_extfile_prefix() to retrieve the main file's location - * when searching the target file. + * Function: H5F_get_extpath * - * Return: 'extpath' on success/abort on failure (shouldn't fail) - * - * Programmer: Vailin Choi, April 2, 2008 + * Purpose: Retrieve the file's 'extpath' flags + * This is used by H5L_extern_traverse() and H5D_build_extfile_prefix() to retrieve the main file's location + * when searching the target file. * + * Return: 'extpath' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ char * @@ -179,14 +164,11 @@ H5F_get_extpath(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_shared - * - * Purpose: Retrieve the file's 'shared' pointer + * Function: H5F_get_shared * - * Return: 'shared' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'shared' pointer * + * Return: 'shared' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ H5F_file_t * @@ -202,14 +184,11 @@ H5F_get_shared(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_same_shared - * - * Purpose: Determine if two files have the same shared file pointer + * Function: H5F_same_shared * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol, July 19, 2011 + * Purpose: Determine if two files have the same shared file pointer * + * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hbool_t @@ -228,14 +207,11 @@ H5F_same_shared(const H5F_t *f1, const H5F_t *f2) /*------------------------------------------------------------------------- - * Function: H5F_get_nopen_objs - * - * Purpose: Retrieve the file's 'nopen_objs' value - * - * Return: 'nopen_objs' on success/abort on failure (shouldn't fail) + * Function: H5F_get_nopen_objs * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'nopen_objs' value * + * Return: 'nopen_objs' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ unsigned @@ -251,14 +227,11 @@ H5F_get_nopen_objs(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_file_id + * Function: H5F_get_file_id * - * Purpose: Retrieve the file's 'file_id' value - * - * Return: 'file_id' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'file_id' value * + * Return: 'file_id' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hid_t @@ -274,14 +247,11 @@ H5F_get_file_id(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_parent - * - * Purpose: Retrieve the file's 'parent' pointer - * - * Return: 'parent' on success/abort on failure (shouldn't fail) + * Function: H5F_get_parent * - * Programmer: Quincey Koziol, July 19, 2011 + * Purpose: Retrieve the file's 'parent' pointer * + * Return: 'parent' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ H5F_t * @@ -297,14 +267,11 @@ H5F_get_parent(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_nmounts + * Function: H5F_get_nmounts * - * Purpose: Retrieve the file's 'nmounts' value - * - * Return: 'nmounts' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'nmounts' value * + * Return: 'nmounts' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ unsigned @@ -320,14 +287,11 @@ H5F_get_nmounts(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_read_attempts - * - * Purpose: Retrieve the file's 'read_attempts' value + * Function: H5F_get_read_attempts * - * Return: '# of read attempts' on success/abort on failure (shouldn't fail) - * - * Programmer: Vaili Choi; Sept 2013 + * Purpose: Retrieve the file's 'read_attempts' value * + * Return: '# of read attempts' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ unsigned @@ -343,18 +307,12 @@ H5F_get_read_attempts(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_fcpl - * - * Purpose: Retrieve the value of a file's FCPL. - * - * Return: Success: The FCPL for the file. + * Function: H5F_get_fcpl * - * Failure: ? (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * May 25 2005 + * Purpose: Retrieve the value of a file's FCPL. * + * Return: Success: The FCPL for the file. + * Failure: ? (should not happen) *------------------------------------------------------------------------- */ hid_t @@ -371,17 +329,13 @@ H5F_get_fcpl(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_sizeof_addr - * - * Purpose: Quick and dirty routine to retrieve the size of the file's size_t - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: 'sizeof_addr' on success/abort on failure (shouldn't fail) + * Function: H5F_sizeof_addr * - * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> - * September 29, 2000 + * Purpose: Quick and dirty routine to retrieve the size of the file's size_t + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: 'sizeof_addr' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ uint8_t @@ -398,17 +352,13 @@ H5F_sizeof_addr(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_sizeof_size + * Function: H5F_sizeof_size * - * Purpose: Quick and dirty routine to retrieve the size of the file's off_t - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: 'sizeof_size' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> - * September 29, 2000 + * Purpose: Quick and dirty routine to retrieve the size of the file's off_t + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: 'sizeof_size' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ uint8_t @@ -425,14 +375,11 @@ H5F_sizeof_size(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_sohm_addr - * - * Purpose: Retrieve the file's 'sohm_addr' value - * - * Return: 'sohm_addr' on success/abort on failure (shouldn't fail) + * Function: H5F_get_sohm_addr * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'sohm_addr' value * + * Return: 'sohm_addr' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ haddr_t @@ -449,14 +396,11 @@ H5F_get_sohm_addr(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_sohm_vers + * Function: H5F_get_sohm_vers * - * Purpose: Retrieve the file's 'sohm_vers' value - * - * Return: 'sohm_vers' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'sohm_vers' value * + * Return: 'sohm_vers' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ unsigned @@ -473,14 +417,11 @@ H5F_get_sohm_vers(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_sohm_nindexes - * - * Purpose: Retrieve the file's 'sohm_nindexes' value + * Function: H5F_get_sohm_nindexes * - * Return: 'sohm_nindexes' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'sohm_nindexes' value * + * Return: 'sohm_nindexes' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ unsigned @@ -497,21 +438,15 @@ H5F_get_sohm_nindexes(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_sym_leaf_k + * Function: H5F_sym_leaf_k * - * Purpose: Replaced a macro to retrieve the symbol table leaf size, - * now that the generic properties are being used to store - * the values. + * Purpose: Replaced a macro to retrieve the symbol table leaf size, + * now that the generic properties are being used to store + * the values. * - * Return: Success: Non-negative, and the symbol table leaf size is + * Return: Success: Non-negative, and the symbol table leaf size is * returned. - * - * Failure: Negative (should not happen) - * - * Programmer: Raymond Lu - * slu@ncsa.uiuc.edu - * Oct 14 2001 - * + * Failure: Negative (should not happen) *------------------------------------------------------------------------- */ unsigned @@ -529,21 +464,15 @@ H5F_sym_leaf_k(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_Kvalue + * Function: H5F_Kvalue * - * Purpose: Replaced a macro to retrieve a B-tree key value for a certain - * type, now that the generic properties are being used to store - * the B-tree values. + * Purpose: Replaced a macro to retrieve a B-tree key value for a certain + * type, now that the generic properties are being used to store + * the B-tree values. * - * Return: Success: Non-negative, and the B-tree key value is + * Return: Success: Non-negative, and the B-tree key value is * returned. - * - * Failure: Negative (should not happen) - * - * Programmer: Raymond Lu - * slu@ncsa.uiuc.edu - * Oct 14 2001 - * + * Failure: Negative (should not happen) *------------------------------------------------------------------------- */ unsigned @@ -562,14 +491,11 @@ H5F_Kvalue(const H5F_t *f, const H5B_class_t *type) /*------------------------------------------------------------------------- - * Function: H5F_get_nrefs + * Function: H5F_get_nrefs * - * Purpose: Retrieve the file's 'nrefs' value - * - * Return: 'nrefs' on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol, July 20, 2011 + * Purpose: Retrieve the file's 'nrefs' value * + * Return: 'nrefs' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ unsigned @@ -586,21 +512,15 @@ H5F_get_nrefs(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_rdcc_nslots + * Function: H5F_rdcc_nslots * - * Purpose: Replaced a macro to retrieve the raw data cache number of slots, - * now that the generic properties are being used to store - * the values. + * Purpose: Replaced a macro to retrieve the raw data cache number of slots, + * now that the generic properties are being used to store + * the values. * - * Return: Success: Non-negative, and the raw data cache number of + * Return: Success: Non-negative, and the raw data cache number of * of slots is returned. - * - * Failure: Negative (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jun 1 2004 - * + * Failure: Negative (should not happen) *------------------------------------------------------------------------- */ size_t @@ -617,21 +537,15 @@ H5F_rdcc_nslots(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_rdcc_nbytes + * Function: H5F_rdcc_nbytes * - * Purpose: Replaced a macro to retrieve the raw data cache number of bytes, - * now that the generic properties are being used to store - * the values. + * Purpose: Replaced a macro to retrieve the raw data cache number of bytes, + * now that the generic properties are being used to store + * the values. * - * Return: Success: Non-negative, and the raw data cache number of + * Return: Success: Non-negative, and the raw data cache number of * of bytes is returned. - * - * Failure: Negative (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jun 1 2004 - * + * Failure: Negative (should not happen) *------------------------------------------------------------------------- */ size_t @@ -648,21 +562,15 @@ H5F_rdcc_nbytes(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_rdcc_w0 + * Function: H5F_rdcc_w0 * - * Purpose: Replaced a macro to retrieve the raw data cache 'w0' value - * now that the generic properties are being used to store - * the values. + * Purpose: Replaced a macro to retrieve the raw data cache 'w0' value + * now that the generic properties are being used to store + * the values. * - * Return: Success: Non-negative, and the raw data cache 'w0' value + * Return: Success: Non-negative, and the raw data cache 'w0' value * is returned. - * - * Failure: Negative (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jun 2 2004 - * + * Failure: Negative (should not happen) *------------------------------------------------------------------------- */ double @@ -679,17 +587,13 @@ H5F_rdcc_w0(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_base_addr - * - * Purpose: Quick and dirty routine to retrieve the file's 'base_addr' value - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: Non-negative on success/Negative on failure + * Function: H5F_get_base_addr * - * Programmer: Raymond Lu <slu@ncsa.uiuc.edu> - * December 20, 2002 + * Purpose: Quick and dirty routine to retrieve the file's 'base_addr' value + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ haddr_t @@ -707,21 +611,15 @@ H5F_get_base_addr(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_grp_btree_shared + * Function: H5F_grp_btree_shared * - * Purpose: Replaced a macro to retrieve the shared B-tree node info - * now that the generic properties are being used to store - * the values. + * Purpose: Replaced a macro to retrieve the shared B-tree node info + * now that the generic properties are being used to store + * the values. * - * Return: Success: Non-void, and the shared B-tree node info + * Return: Success: Non-void, and the shared B-tree node info * is returned. - * - * Failure: void (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jul 5 2004 - * + * Failure: void (should not happen) *------------------------------------------------------------------------- */ H5UC_t * @@ -738,21 +636,15 @@ H5F_grp_btree_shared(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_sieve_buf_size + * Function: H5F_sieve_buf_size * - * Purpose: Replaced a macro to retrieve the dataset sieve buffer size - * now that the generic properties are being used to store - * the values. + * Purpose: Replaced a macro to retrieve the dataset sieve buffer size + * now that the generic properties are being used to store + * the values. * - * Return: Success: Non-void, and the dataset sieve buffer size + * Return: Success: Non-void, and the dataset sieve buffer size * is returned. - * - * Failure: void (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jul 8 2005 - * + * Failure: void (should not happen) *------------------------------------------------------------------------- */ size_t @@ -769,21 +661,15 @@ H5F_sieve_buf_size(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_gc_ref + * Function: H5F_gc_ref * - * Purpose: Replaced a macro to retrieve the "garbage collect - * references flag" now that the generic properties are being used - * to store the values. + * Purpose: Replaced a macro to retrieve the "garbage collect + * references flag" now that the generic properties are being used + * to store the values. * - * Return: Success: The "garbage collect references flag" + * Return: Success: The "garbage collect references flag" * is returned. - * - * Failure: (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jul 8 2005 - * + * Failure: (should not happen) *------------------------------------------------------------------------- */ unsigned @@ -800,18 +686,12 @@ H5F_gc_ref(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_use_latest_flags - * - * Purpose: Retrieve the 'latest version support' for the file. - * - * Return: Success: Non-negative, the requested 'version support' + * Function: H5F_use_latest_flags * - * Failure: (can't happen) - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 5 2007 + * Purpose: Retrieve the 'latest version support' for the file. * + * Return: Success: Non-negative, the requested 'version support' + * Failure: (can't happen) *------------------------------------------------------------------------- */ unsigned @@ -828,18 +708,12 @@ H5F_use_latest_flags(const H5F_t *f, unsigned fl) /*------------------------------------------------------------------------- - * Function: H5F_get_fc_degree - * - * Purpose: Retrieve the 'file close degree' for the file. - * - * Return: Success: Non-negative, the 'file close degree' + * Function: H5F_get_fc_degree * - * Failure: (can't happen) - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 5 2007 + * Purpose: Retrieve the 'file close degree' for the file. * + * Return: Success: Non-negative, the 'file close degree' + * Failure: (can't happen) *------------------------------------------------------------------------- */ H5F_close_degree_t @@ -864,10 +738,6 @@ H5F_get_fc_degree(const H5F_t *f) * Return: Success: Flag indicating whether the evict-on-close * property was set for the file. * Failure: (can't happen) - * - * Programmer: Dana Robinson - * Spring 2016 - * *------------------------------------------------------------------------- */ hbool_t @@ -884,18 +754,12 @@ H5F_get_evict_on_close(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_store_msg_crt_idx - * - * Purpose: Retrieve the 'store message creation index' flag for the file. + * Function: H5F_store_msg_crt_idx * - * Return: Success: Non-negative, the 'store message creation index' flag - * - * Failure: (can't happen) - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Mar 6 2007 + * Purpose: Retrieve the 'store message creation index' flag for the file. * + * Return: Success: Non-negative, the 'store message creation index' flag + * Failure: (can't happen) *------------------------------------------------------------------------- */ hbool_t @@ -912,17 +776,12 @@ H5F_store_msg_crt_idx(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_has_feature - * - * Purpose: Check if a file has a particular feature enabled + * Function: H5F_has_feature * - * Return: Success: Non-negative - TRUE or FALSE - * Failure: Negative (should not happen) - * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * May 31 2004 + * Purpose: Check if a file has a particular feature enabled * + * Return: Success: Non-negative - TRUE or FALSE + * Failure: Negative (should not happen) *------------------------------------------------------------------------- */ hbool_t @@ -939,17 +798,13 @@ H5F_has_feature(const H5F_t *f, unsigned feature) /*------------------------------------------------------------------------- - * Function: H5F_get_driver_id - * - * Purpose: Quick and dirty routine to retrieve the file's 'driver_id' value - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: 'driver_id' on success/abort on failure (shouldn't fail) + * Function: H5F_get_driver_id * - * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> - * October 10, 2000 + * Purpose: Quick and dirty routine to retrieve the file's 'driver_id' value + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: 'driver_id' on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hid_t @@ -967,23 +822,19 @@ H5F_get_driver_id(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_fileno + * Function: H5F_get_fileno * - * Purpose: Quick and dirty routine to retrieve the file's 'fileno' value - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> - * March 27, 2002 + * Purpose: Quick and dirty routine to retrieve the file's 'fileno' value + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum) { - herr_t ret_value = SUCCEED; + herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -994,7 +845,7 @@ H5F_get_fileno(const H5F_t *f, unsigned long *filenum) /* Retrieve the file's serial number */ if(H5FD_get_fileno(f->shared->lf, filenum) < 0) - HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno") + HGOTO_ERROR(H5E_FILE, H5E_BADRANGE, FAIL, "can't retrieve fileno") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1002,21 +853,17 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_get_eoa - * - * Purpose: Quick and dirty routine to retrieve the file's 'eoa' value + * Function: H5F_get_eoa * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> - * June 1, 2004 + * Purpose: Quick and dirty routine to retrieve the file's 'eoa' value * + * Return: Non-negative on success/Negative on failure *------------------------------------------------------------------------- */ haddr_t H5F_get_eoa(const H5F_t *f, H5FD_mem_t type) { - haddr_t ret_value = HADDR_UNDEF; /* Return value */ + haddr_t ret_value = HADDR_UNDEF; /* Return value */ FUNC_ENTER_NOAPI(HADDR_UNDEF) @@ -1025,7 +872,7 @@ H5F_get_eoa(const H5F_t *f, H5FD_mem_t type) /* Dispatch to driver */ if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type))) - HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") + HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed") done: FUNC_LEAVE_NOAPI(ret_value) @@ -1040,10 +887,6 @@ done: * * Return: Success: Non-negative. * Failure: negative. - * - * Programmer: Raymond Lu - * Sep. 16, 2002 - * *------------------------------------------------------------------------- */ herr_t @@ -1067,18 +910,14 @@ done: /*------------------------------------------------------------------------- - * Function: H5F_is_tmp_addr - * - * Purpose: Quick and dirty routine to determine if an address is in - * the 'temporary' file space. - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) + * Function: H5F_is_tmp_addr * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * June 11, 2009 + * Purpose: Quick and dirty routine to determine if an address is in + * the 'temporary' file space. + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hbool_t @@ -1095,18 +934,14 @@ H5F_is_tmp_addr(const H5F_t *f, haddr_t addr) /*------------------------------------------------------------------------- - * Function: H5F_use_tmp_space - * - * Purpose: Quick and dirty routine to determine if using temporary - * file space is allowed for this file. - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) + * Function: H5F_use_tmp_space * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * July 1, 2009 + * Purpose: Quick and dirty routine to determine if using temporary + * file space is allowed for this file. + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hbool_t @@ -1124,17 +959,12 @@ H5F_use_tmp_space(const H5F_t *f) #ifdef H5_HAVE_PARALLEL /*------------------------------------------------------------------------- - * Function: H5F_coll_md_read + * Function: H5F_coll_md_read * - * Purpose: Retrieve the 'collective metadata reads' flag for the file. - * - * Return: Success: Non-negative, the 'collective metadata reads' flag - * Failure: (can't happen) - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Feb 10 2016 + * Purpose: Retrieve the 'collective metadata reads' flag for the file. * + * Return: Success: Non-negative, the 'collective metadata reads' flag + * Failure: (can't happen) *------------------------------------------------------------------------- */ H5P_coll_md_read_flag_t @@ -1151,18 +981,14 @@ H5F_coll_md_read(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_use_mdc_logging - * - * Purpose: Quick and dirty routine to determine if using MDC logging - * is enabled for this file. - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) + * Function: H5F_use_mdc_logging * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * June 5, 2016 + * Purpose: Quick and dirty routine to determine if using MDC logging + * is enabled for this file. + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hbool_t @@ -1179,18 +1005,14 @@ H5F_use_mdc_logging(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_start_mdc_log_on_access + * Function: H5F_start_mdc_log_on_access * - * Purpose: Quick and dirty routine to determine if we should start MDC - * logging on access for this file. - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) - * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * June 5, 2016 + * Purpose: Quick and dirty routine to determine if we should start MDC + * logging on access for this file. + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ hbool_t @@ -1207,18 +1029,14 @@ H5F_start_mdc_log_on_access(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_mdc_log_location - * - * Purpose: Quick and dirty routine to retrieve the MDC log location - * for this file. - * (Mainly added to stop non-file routines from poking about in the - * H5F_t data structure) + * Function: H5F_mdc_log_location * - * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) - * - * Programmer: Quincey Koziol <koziol@hdfgroup.org> - * June 5, 2016 + * Purpose: Quick and dirty routine to retrieve the MDC log location + * for this file. + * (Mainly added to stop non-file routines from poking about in the + * H5F_t data structure) * + * Return: TRUE/FALSE on success/abort on failure (shouldn't fail) *------------------------------------------------------------------------- */ char * @@ -1235,16 +1053,12 @@ H5F_mdc_log_location(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_alignment - * - * Purpose: Retrieve the 'alignment' for the file. - * - * Return: Success: Non-negative, the 'alignment' - * - * Failure: (can't happen) + * Function: H5F_get_alignment * - * Programmer: Vailin Choi; Dec 2012 + * Purpose: Retrieve the 'alignment' for the file. * + * Return: Success: Non-negative, the 'alignment' + * Failure: (can't happen) *------------------------------------------------------------------------- */ hsize_t @@ -1261,16 +1075,12 @@ H5F_get_alignment(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_threshold - * - * Purpose: Retrieve the 'threshold' for alignment in the file. - * - * Return: Success: Non-negative, the 'threshold' - * - * Failure: (can't happen) + * Function: H5F_get_threshold * - * Programmer: Vailin Choi; Dec 2012 + * Purpose: Retrieve the 'threshold' for alignment in the file. * + * Return: Success: Non-negative, the 'threshold' + * Failure: (can't happen) *------------------------------------------------------------------------- */ hsize_t @@ -1287,16 +1097,12 @@ H5F_get_threshold(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_pgend_meta_thres + * Function: H5F_get_pgend_meta_thres * - * Purpose: Retrieve the 'page end meta threshold size' for the file. - * - * Return: Success: Non-negative, the 'pgend_meta_thres' - * - * Failure: (can't happen) - * - * Programmer: Vailin Choi; Dec 2012 + * Purpose: Retrieve the 'page end meta threshold size' for the file. * + * Return: Success: Non-negative, the 'pgend_meta_thres' + * Failure: (can't happen) *------------------------------------------------------------------------- */ hsize_t @@ -1313,13 +1119,12 @@ H5F_get_pgend_meta_thres(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_point_of_no_return + * Function: H5F_get_point_of_no_return * - * Purpose: Retrieve the 'point of no return' value for the file. - * - * Return: Success: Non-negative, the 'point_of_no_return' - * Failure: (can't happen) + * Purpose: Retrieve the 'point of no return' value for the file. * + * Return: Success: Non-negative, the 'point_of_no_return' + * Failure: (can't happen) *------------------------------------------------------------------------- */ hbool_t @@ -1336,13 +1141,12 @@ H5F_get_point_of_no_return(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_first_alloc_dealloc - * - * Purpose: Retrieve the 'first alloc / dealloc' value for the file. + * Function: H5F_get_first_alloc_dealloc * - * Return: Success: Non-negative, the 'first_alloc_dealloc' - * Failure: (can't happen) + * Purpose: Retrieve the 'first alloc / dealloc' value for the file. * + * Return: Success: Non-negative, the 'first_alloc_dealloc' + * Failure: (can't happen) *------------------------------------------------------------------------- */ hbool_t @@ -1359,13 +1163,12 @@ H5F_get_first_alloc_dealloc(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_eoa_pre_fsm_fsalloc - * - * Purpose: Retrieve the 'EOA pre-FSM fsalloc' value for the file. + * Function: H5F_get_eoa_pre_fsm_fsalloc * - * Return: Success: Non-negative, the 'EOA pre-FSM fsalloc' - * Failure: (can't happen) + * Purpose: Retrieve the 'EOA pre-FSM fsalloc' value for the file. * + * Return: Success: Non-negative, the 'EOA pre-FSM fsalloc' + * Failure: (can't happen) *------------------------------------------------------------------------- */ hbool_t |