summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorvchoi <vchoi@jelly.ad.hdfgroup.org>2022-04-21 22:00:00 (GMT)
committervchoi <vchoi@jelly.ad.hdfgroup.org>2022-04-21 22:00:00 (GMT)
commit21c9366d1dc9e72ee43da7071da932a49483e2bb (patch)
tree4a8362580b8210e1e28d8d2bd50df0ad57d36761 /src
parent9163f6ca9bc447bfbd50554d10e0d9e7eb076724 (diff)
parent3ed0a0ee541f90e316bbabce0b3841a306420994 (diff)
downloadhdf5-21c9366d1dc9e72ee43da7071da932a49483e2bb.zip
hdf5-21c9366d1dc9e72ee43da7071da932a49483e2bb.tar.gz
hdf5-21c9366d1dc9e72ee43da7071da932a49483e2bb.tar.bz2
Merge branch 'new_vds_feature_vfd_swmr' of https://github.com/vchoi-hdfgroup/hdf5 into new_vds_feature_vfd_swmr
Diffstat (limited to 'src')
-rw-r--r--src/H5Dvirtual.c3
-rw-r--r--src/H5FDprivate.h16
-rw-r--r--src/H5FDvfd_swmr.c97
-rw-r--r--src/H5Fio.c12
-rw-r--r--src/H5Fpkg.h34
-rw-r--r--src/H5Fpublic.h4
-rw-r--r--src/H5Fvfd_swmr.c19
7 files changed, 93 insertions, 92 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index d549bad..c7d47ef 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -914,7 +914,8 @@ H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *vir
/* Remove H5P_FILE_ACCESS_ANY_VFD and restore the original code */
src_file = H5F_prefix_open_file(vdset->oloc.file, H5F_PREFIX_VDS, vdset->shared->vds_prefix,
- source_dset->file_name, intent, vdset->shared->layout.storage.u.virt.source_fapl);
+ source_dset->file_name, intent,
+ vdset->shared->layout.storage.u.virt.source_fapl);
/* If we opened the source file here, we should close it when leaving */
if (src_file)
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index bdd1a68..dae38b6 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -370,15 +370,15 @@ H5_DLL herr_t H5FD_set_paged_aggr(H5FD_t *file, hbool_t paged);
H5_DLL herr_t H5FD_init(void);
/* Function prototypes for VFD SWMR */
-H5_DLL herr_t H5FD_vfd_swmr_get_tick_and_idx(H5FD_t *_file, hbool_t read_index, uint64_t *tick_ptr,
- uint32_t *num_entries_ptr, H5FD_vfd_swmr_idx_entry_t index[]);
-H5_DLL void H5FD_vfd_swmr_dump_status(H5FD_t *file, uint64_t page);
-H5_DLL void H5FD_vfd_swmr_set_pb_configured(H5FD_t *_file);
-H5_DLL void H5FD_vfd_swmr_record_elapsed_ticks(H5FD_t *_file, uint64_t elapsed);
-H5_DLL void H5FD_vfd_swmr_get_md_path_name(H5FD_t *_file, char **name);
+H5_DLL herr_t H5FD_vfd_swmr_get_tick_and_idx(H5FD_t *_file, hbool_t read_index, uint64_t *tick_ptr,
+ uint32_t *num_entries_ptr, H5FD_vfd_swmr_idx_entry_t index[]);
+H5_DLL void H5FD_vfd_swmr_dump_status(H5FD_t *file, uint64_t page);
+H5_DLL void H5FD_vfd_swmr_set_pb_configured(H5FD_t *_file);
+H5_DLL void H5FD_vfd_swmr_record_elapsed_ticks(H5FD_t *_file, uint64_t elapsed);
+H5_DLL void H5FD_vfd_swmr_get_md_path_name(H5FD_t *_file, char **name);
H5_DLL hbool_t H5FD_vfd_swmr_get_make_believe(H5FD_t *_file);
-H5_DLL void H5FD_vfd_swmr_set_make_believe(H5FD_t *_file, hbool_t make_believe);
-H5_DLL htri_t H5FD_vfd_swmr_assess_make_believe(H5FD_t *_file);
+H5_DLL void H5FD_vfd_swmr_set_make_believe(H5FD_t *_file, hbool_t make_believe);
+H5_DLL htri_t H5FD_vfd_swmr_assess_make_believe(H5FD_t *_file);
H5_DLL H5FD_t *H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl_id);
/* Function prototypes for MPI based VFDs*/
diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c
index 0731f30..8902d93 100644
--- a/src/H5FDvfd_swmr.c
+++ b/src/H5FDvfd_swmr.c
@@ -41,9 +41,9 @@ typedef struct H5FD_vfd_swmr_t {
/* Metadata file */
int md_fd; /* File descriptor for the metadata file */
uint32_t md_pages_reserved; /* # of pages reserved at the head of the metadata file */
- char md_file_path_name[H5FD_MAX_FILENAME_LEN+1]; /* Name of the metadate file */
- H5FD_vfd_swmr_md_header md_header; /* Metadata file header */
- H5FD_vfd_swmr_md_index md_index; /* Metadata file index */
+ char md_file_path_name[H5FD_MAX_FILENAME_LEN + 1]; /* Name of the metadate file */
+ H5FD_vfd_swmr_md_header md_header; /* Metadata file header */
+ H5FD_vfd_swmr_md_index md_index; /* Metadata file index */
/* Histogram of ticks elapsed inside the API (reader only).
* api_elapsed_ticks[elapsed] is the number of times
@@ -68,8 +68,8 @@ typedef struct H5FD_vfd_swmr_t {
} H5FD_vfd_swmr_t;
-#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
-#define VFD_SWMR_MD_SUFFIX ".md"
+#define MAXADDR (((haddr_t)1 << (8 * sizeof(HDoff_t) - 1)) - 1)
+#define VFD_SWMR_MD_SUFFIX ".md"
/* Prototypes */
static herr_t H5FD__vfd_swmr_term(void);
@@ -245,7 +245,7 @@ H5FD__swmr_reader_open(H5FD_vfd_swmr_t *file)
if (file->api_elapsed_ticks == NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "could not allocate API elapsed ticks")
- if(!file->make_believe) {
+ if (!file->make_believe) {
/* Retry on opening the metadata file */
for (do_try = H5_retry_init(&retry, H5FD_VFD_SWMR_MD_FILE_RETRY_MAX, H5_RETRY_DEFAULT_MINIVAL,
H5_RETRY_DEFAULT_MAXIVAL);
@@ -274,9 +274,9 @@ done:
*
* Function: H5FD__vfd_swmr_build_md_path_name
*
- * Purpose: To construct the metadata file's full name based on config's
+ * Purpose: To construct the metadata file's full name based on config's
* md_file_path and md_file_name. See RFC for details.
- *
+ *
*
* Return: Success: SUCCEED
* Failure: FAIL
@@ -288,16 +288,16 @@ done:
static herr_t
H5FD__vfd_swmr_build_md_path_name(H5F_vfd_swmr_config_t *config, const char *hdf5_filename, char *name /*out*/)
{
- size_t tot_len = 0;
- size_t tmp_len = 0;
- herr_t ret_value = SUCCEED; /* Return value */
+ size_t tot_len = 0;
+ size_t tmp_len = 0;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
- if((tot_len = HDstrlen(config->md_file_path)) != 0) {
+ if ((tot_len = HDstrlen(config->md_file_path)) != 0) {
/* md_file_path + '/' */
- if(++tot_len > H5F__MAX_VFD_SWMR_FILE_NAME_LEN)
+ if (++tot_len > H5F__MAX_VFD_SWMR_FILE_NAME_LEN)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "md_file_path and md_file_name exceeds maximum");
HDstrcat(name, config->md_file_path);
HDstrcat(name, "/");
@@ -307,7 +307,8 @@ H5FD__vfd_swmr_build_md_path_name(H5F_vfd_swmr_config_t *config, const char *hdf
if((tot_len += tmp_len) > H5F__MAX_VFD_SWMR_FILE_NAME_LEN)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "md_file_path and md_file_name exceeds maximum");
HDstrcat(name, config->md_file_name);
- } else {
+ }
+ else {
/* Automatic generation of metadata file name based on hdf5_filename + '.md' */
if((tot_len += (HDstrlen(hdf5_filename) + 3)) > H5F__MAX_VFD_SWMR_FILE_NAME_LEN)
HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "md_file_path and md_file_name maximum");
@@ -344,11 +345,11 @@ H5FD__vfd_swmr_create_make_believe_data(H5FD_vfd_swmr_t *_file)
/* Create make_believe data: empty header and index */
file->md_header.fs_page_size = 0;
- file->md_header.tick_num = 0;
- file->md_header.index_offset = H5FD_MD_HEADER_SIZE;
+ file->md_header.tick_num = 0;
+ file->md_header.index_offset = H5FD_MD_HEADER_SIZE;
file->md_header.index_length = H5FD_MD_INDEX_SIZE(0);
- file->md_index.tick_num = 0;
+ file->md_index.tick_num = 0;
file->md_index.num_entries = 0;
FUNC_LEAVE_NOAPI_VOID
@@ -380,7 +381,7 @@ H5FD__vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t max
H5P_genplist_t * plist;
H5F_vfd_swmr_config_t *vfd_swmr_config;
H5FD_t * ret_value = NULL; /* Return value */
- htri_t is_hdf5;
+ htri_t is_hdf5;
FUNC_ENTER_PACKAGE
@@ -419,7 +420,7 @@ H5FD__vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t max
/* Retain a copy of the metadata file name */
if(H5FD__vfd_swmr_build_md_path_name(vfd_swmr_config, name, file->md_file_path_name) < 0)
HGOTO_ERROR(H5E_VFL, H5E_OPENERROR, NULL, "building md_file_path and md_file_name failed")
-
+
file->md_file_path_name[sizeof(file->md_file_path_name) - 1] = '\0';
file->writer = vfd_swmr_config->writer;
@@ -428,10 +429,9 @@ H5FD__vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t max
is_hdf5 = H5F__is_hdf5(name, H5P_FILE_ACCESS_DEFAULT);
/* Ensure reader */
- if(!vfd_swmr_config->writer) {
+ if (!vfd_swmr_config->writer) {
/* Metadata file does not exist, presume_posix is true, HDF5 file exist */
- if (HDaccess(file->md_file_path_name, F_OK) < 0 &&
- vfd_swmr_config->presume_posix_semantics &&
+ if (HDaccess(file->md_file_path_name, F_OK) < 0 && vfd_swmr_config->presume_posix_semantics &&
is_hdf5 == TRUE) {
file->make_believe = TRUE;
@@ -442,7 +442,7 @@ H5FD__vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t max
}
/* Hard-wired to open the underlying HDF5 file with SEC2 */
- /* H5FD_SEC2 is the default driver for H5P_FILE_ACCESS_DEFAULT except when
+ /* H5FD_SEC2 is the default driver for H5P_FILE_ACCESS_DEFAULT except when
the environment variable HDF5_DRIVER is set to otherwise */
if ((file->hdf5_file_lf = H5FD_open(name, flags, H5P_FILE_ACCESS_DEFAULT, maxaddr)) == NULL)
HGOTO_ERROR(H5E_VFL, H5E_CANTOPENFILE, NULL, "can't set driver info");
@@ -640,7 +640,7 @@ H5FD__vfd_swmr_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
* `_self` DUPLICATES `_other` if `_other` is also an instance
* of SWMR class, the instances' lower files are equal under
* `H5FD_cmp()`, and the file-access properties of `_self` match
- * `fapl_id`.
+ * `fapl_id`.
*
* `_self` and `_other` CONFLICT if both are SWMR instances
* referring to the same lower file, and their file-access
@@ -679,7 +679,6 @@ H5FD_vfd_swmr_dedup(H5FD_t *_self, H5FD_t *_other, hid_t fapl_id)
if (H5FD_cmp(self->hdf5_file_lf, other->hdf5_file_lf) != 0)
HGOTO_DONE(_other)
-
/* If fapl_id != _ANY_VFD, then we have either a duplicate or
* a conflict. If the VFD SWMR parameters match, then
* return `self` to indicate a duplicate. Otherwise, return
@@ -936,11 +935,12 @@ H5FD__vfd_swmr_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id
num_entries = file->md_index.num_entries;
fs_page_size = file->md_header.fs_page_size;
- if(!fs_page_size) {
+ if (!fs_page_size) {
HDassert(!num_entries);
HDassert(file->make_believe);
entry = NULL;
- } else {
+ }
+ else {
/* Try finding the addr from the index */
target_page = addr / fs_page_size;
@@ -953,7 +953,7 @@ H5FD__vfd_swmr_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id
HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed")
HGOTO_DONE(SUCCEED);
- }
+ }
/* Found in index, read from the metadata file */
HDassert(addr >= target_page * fs_page_size);
@@ -1169,7 +1169,7 @@ done:
*
* Return: Success: SUCCEED
* Failure: FAIL
- *
+ *
* Modifications:
* Vailin Choi: 2/18/2022
* VDS changes: Update the header's fs_page size if it is still 0
@@ -1280,9 +1280,9 @@ H5FD__vfd_swmr_load_hdr_and_idx(H5FD_vfd_swmr_t *file, hbool_t open)
done:
/* Need to update the header's fs_page_size if it is still 0
- because it is possible that md_header.tick_num == file->md_header.tick_num
+ because it is possible that md_header.tick_num == file->md_header.tick_num
and the loading is not done */
- if(ret_value == SUCCEED && !file->md_header.fs_page_size) {
+ if (ret_value == SUCCEED && !file->md_header.fs_page_size) {
HDassert(md_header.fs_page_size);
HDassert(file->make_believe);
file->md_header.fs_page_size = md_header.fs_page_size;
@@ -1699,12 +1699,12 @@ H5FD_vfd_swmr_get_md_path_name(H5FD_t *_file, char **name)
FUNC_LEAVE_NOAPI_VOID
-} /* H5FD_vfd_swmr_get_md_path_name() */
+} /* H5FD_vfd_swmr_get_md_path_name() */
/*-------------------------------------------------------------------------
* Function: H5FD_vfd_swmr_get_make_believe
*
- * Purpose: To retrieve the value of make_believe
+ * Purpose: To retrieve the value of make_believe
*
* Return: TRUE/FALSE
*
@@ -1724,8 +1724,7 @@ H5FD_vfd_swmr_get_make_believe(H5FD_t *_file)
FUNC_LEAVE_NOAPI(file->make_believe)
-} /* H5FD_vfd_swmr_get_make_believe() */
-
+} /* H5FD_vfd_swmr_get_make_believe() */
/*-------------------------------------------------------------------------
* Function: H5FD_vfd_swmr_set_make_believe
@@ -1754,7 +1753,7 @@ H5FD_vfd_swmr_set_make_believe(H5FD_t *_file, hbool_t make_believe)
FUNC_LEAVE_NOAPI_VOID
-} /* H5FD_vfd_swmr_make_believe() */
+} /* H5FD_vfd_swmr_make_believe() */
/*-------------------------------------------------------------------------
* Function: H5FD_vfd_swmr_assess_make_believe
@@ -1764,10 +1763,10 @@ H5FD_vfd_swmr_set_make_believe(H5FD_t *_file, hbool_t make_believe)
* --if metadata file does not exist, continue with make_believe
* Return FALSE:
* --if metadata file exists and can be opened successfully,
- * discontinue with make_believe
+ * discontinue with make_believe
* Return FAIL:
* --error in opening the metadata file
- *
+ *
*
* Return: TRUE/FALSE/FAIL
*
@@ -1777,10 +1776,10 @@ H5FD_vfd_swmr_set_make_believe(H5FD_t *_file, hbool_t make_believe)
htri_t
H5FD_vfd_swmr_assess_make_believe(H5FD_t *_file)
{
- H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; /* VFD SWMR file struct */
- h5_retry_t retry;
- hbool_t do_try; /* more tries remain */
- htri_t ret_value = TRUE; /* Return value */
+ H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; /* VFD SWMR file struct */
+ h5_retry_t retry;
+ hbool_t do_try; /* more tries remain */
+ htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI(FALSE)
@@ -1789,22 +1788,22 @@ H5FD_vfd_swmr_assess_make_believe(H5FD_t *_file)
if (HDaccess(file->md_file_path_name, F_OK) >= 0) {
/* MD file exists now, proceed to open it */
HDassert(file->md_fd < 0);
-
+
/* Retry on opening the metadata file */
- for (do_try = H5_retry_init(&retry, H5FD_VFD_SWMR_MD_FILE_RETRY_MAX, H5_RETRY_DEFAULT_MINIVAL,
- H5_RETRY_DEFAULT_MAXIVAL);
+ for (do_try = H5_retry_init(&retry, H5FD_VFD_SWMR_MD_FILE_RETRY_MAX, H5_RETRY_DEFAULT_MINIVAL,
+ H5_RETRY_DEFAULT_MAXIVAL);
do_try; do_try = H5_retry_next(&retry)) {
if ((file->md_fd = HDopen(file->md_file_path_name, O_RDONLY)) >= 0)
break;
}
- /* Exhaust all retries for opening the md file */
- if (!do_try)
+ /* Exhaust all retries for opening the md file */
+ if (!do_try)
HGOTO_ERROR(H5E_VFL, H5E_OPENERROR, FAIL,
"unable to open the metadata file after all retry attempts");
- /* Succeed in opening the MD file, discontinue make_believe */
- ret_value = FALSE;
+ /* Succeed in opening the MD file, discontinue make_believe */
+ ret_value = FALSE;
}
done:
diff --git a/src/H5Fio.c b/src/H5Fio.c
index 7bda83b..7193199 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -83,8 +83,8 @@
herr_t
H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /*out*/)
{
- H5FD_mem_t map_type = type; /* Mapped memory type */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t map_type = type; /* Mapped memory type */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -97,7 +97,7 @@ H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
if (H5F_addr_le(f_sh->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
- if(!H5F_SHARED_USE_VFD_SWMR(f_sh))
+ if (!H5F_SHARED_USE_VFD_SWMR(f_sh))
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
@@ -146,8 +146,8 @@ H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf /
herr_t
H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf)
{
- H5FD_mem_t map_type = type; /* Mapped memory type */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5FD_mem_t map_type = type; /* Mapped memory type */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -161,7 +161,7 @@ H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t
if (H5F_addr_le(f_sh->tmp_addr, (addr + size)))
HGOTO_ERROR(H5E_IO, H5E_BADRANGE, FAIL, "attempting I/O in temporary file space")
- if(!H5F_SHARED_USE_VFD_SWMR(f_sh))
+ if (!H5F_SHARED_USE_VFD_SWMR(f_sh))
/* Treat global heap as raw data */
map_type = (type == H5FD_MEM_GHEAP) ? H5FD_MEM_DRAW : type;
diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h
index 152680a..95854cb 100644
--- a/src/H5Fpkg.h
+++ b/src/H5Fpkg.h
@@ -512,23 +512,23 @@ struct H5F_shared_t {
uint32_t old_mdf_idx_entries_used;
/* Metadata file and updater file for VFD SWMR writer */
- int vfd_swmr_md_fd; /* POSIX: file descriptor for the
- * metadata file or -1 if the metadata file
- * is not currently open.
- * The vfd_swmr_config.generate_updater_files
- * is FALSE.
- */
- /* NFS:
- * The vfd_swmr_config.generate_updater_files
- * is TRUE and:
- * --if vfd_swmr_config.writer is FALSE,
- * this field is the file descriptor of the local
- * copy of the metadata file, or -1 if the local
- * copy is not currently open.
- * --if vfd_swmr_config.writer is TRUE, this field
- * is not used and is set to -1.
- */
- char *md_file_path_name; /* Name composed of md_file_path and md_file_name from vfd_swmr_config */
+ int vfd_swmr_md_fd; /* POSIX: file descriptor for the
+ * metadata file or -1 if the metadata file
+ * is not currently open.
+ * The vfd_swmr_config.generate_updater_files
+ * is FALSE.
+ */
+ /* NFS:
+ * The vfd_swmr_config.generate_updater_files
+ * is TRUE and:
+ * --if vfd_swmr_config.writer is FALSE,
+ * this field is the file descriptor of the local
+ * copy of the metadata file, or -1 if the local
+ * copy is not currently open.
+ * --if vfd_swmr_config.writer is TRUE, this field
+ * is not used and is set to -1.
+ */
+ char *md_file_path_name; /* Name composed of md_file_path and md_file_name from vfd_swmr_config */
H5F_generate_md_ck_t generate_md_ck_cb;
/* For testing only:
diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h
index 76317fb..0e8eda6 100644
--- a/src/H5Fpublic.h
+++ b/src/H5Fpublic.h
@@ -276,7 +276,7 @@ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata);
* This flag should be set to TRUE if both of the following conditions hold:
* 1) Both the metadata file and HDF5 file are being written on a POSIX
* file system that is local to the reader.
- * 2) The metadata file is being maintained directly by the VFD SWMR
+ * 2) The metadata file is being maintained directly by the VFD SWMR
* writer (i.e. without use of updater files and the auxiliary process.)
* If this flag is FALSE, the VFD SWMR reader must make the two adjustments:
* 1) Per legacy SWMR, the VFD that reads the HDF5 file proper must allow
@@ -348,7 +348,7 @@ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata);
* md_file_path:
* If both the writer and maintain_metadata_file fields are TRUE, this
* field contains the path but not the name of the metadata file.
- * If writer is FALSE, this field contains the path (but not the name)
+ * If writer is FALSE, this field contains the path (but not the name)
* of the (possibly local copy of the) metadata file.
*
* md_file_name:
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index fce5e88..9c4360e 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -189,8 +189,8 @@ H5F_vfd_swmr_init(H5F_t *f, hbool_t file_create)
/* Retrieve the metadata filename built with md_file_path and md_file_name */
H5FD_vfd_swmr_get_md_path_name(f->shared->lf, &shared->md_file_path_name);
- if (((shared->vfd_swmr_md_fd = HDopen(shared->md_file_path_name,
- O_CREAT | O_RDWR | O_TRUNC, H5_POSIX_CREATE_MODE_RW))) < 0)
+ if (((shared->vfd_swmr_md_fd = HDopen(shared->md_file_path_name, O_CREAT | O_RDWR | O_TRUNC,
+ H5_POSIX_CREATE_MODE_RW))) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to create the metadata file")
md_size = (hsize_t)shared->vfd_swmr_config.md_pages_reserved * shared->fs_page_size;
@@ -341,7 +341,7 @@ H5F_vfd_swmr_close_or_flush(H5F_t *f, hbool_t closing)
if (HDunlink(shared->md_file_path_name) < 0)
HSYS_GOTO_ERROR(H5E_FILE, H5E_CANTREMOVE, FAIL, "unable to unlink the metadata file")
- shared->md_file_path_name = (char *)H5MM_xfree(shared->md_file_path_name);
+ shared->md_file_path_name = (char *)H5MM_xfree(shared->md_file_path_name);
/* Close the free-space manager for the metadata file */
if (H5MV_close(f) < 0)
@@ -1065,7 +1065,7 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api)
herr_t ret_value = SUCCEED;
uint32_t i, j, nchanges;
H5FD_t * file = shared->lf;
- htri_t ret;
+ htri_t ret;
FUNC_ENTER_NOAPI(FAIL)
@@ -1086,14 +1086,15 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api)
*/
/* Check if make_believe is set */
- if(H5FD_vfd_swmr_get_make_believe(file)) {
+ if (H5FD_vfd_swmr_get_make_believe(file)) {
/* Return value is TRUE: metadata file is not found, continue with make_believe
and skip eot processing */
- if((ret = H5FD_vfd_swmr_assess_make_believe(file)) == TRUE) {
+ if ((ret = H5FD_vfd_swmr_assess_make_believe(file)) == TRUE) {
/* Skip most of the EOT processing */
goto reader_update_eot;
- } else if (ret == FAIL)
+ }
+ else if (ret == FAIL)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "error in assessing make_believe from driver")
/* Return value is FALSE i.e. found the metadata file */
@@ -1106,8 +1107,8 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, hbool_t entering_api)
/* Set make_believe to FALSE;
get out from make_believe state, continue normal processing */
H5FD_vfd_swmr_set_make_believe(file, FALSE);
-
- } else {
+ }
+ else {
/* make_believe is not set, continue normal processing */
if (H5FD_vfd_swmr_get_tick_and_idx(file, TRUE, &tmp_tick_num, &vfd_entries, NULL) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "error in retrieving tick_num from driver")