From 3ed0a0ee541f90e316bbabce0b3841a306420994 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 19:00:37 +0000 Subject: Committing clang-format changes --- src/H5Dvirtual.c | 3 +- src/H5FDprivate.h | 16 +++--- src/H5FDvfd_swmr.c | 109 ++++++++++++++++++++-------------------- src/H5Fio.c | 12 ++--- src/H5Fpkg.h | 34 ++++++------- src/H5Fpublic.h | 4 +- src/H5Fvfd_swmr.c | 19 +++---- test/vfd_swmr.c | 24 +++++---- test/vfd_swmr_attrdset_writer.c | 12 ++--- test/vfd_swmr_bigset_writer.c | 21 ++++---- test/vfd_swmr_common.c | 26 +++++----- test/vfd_swmr_common.h | 6 +-- test/vfd_swmr_dsetchks_writer.c | 4 +- test/vfd_swmr_dsetops_writer.c | 7 +-- test/vfd_swmr_generator.c | 3 +- test/vfd_swmr_gfail_writer.c | 4 +- test/vfd_swmr_gperf_writer.c | 4 +- test/vfd_swmr_group_writer.c | 4 +- test/vfd_swmr_indep_rw_writer.c | 4 +- test/vfd_swmr_remove_reader.c | 6 +-- test/vfd_swmr_vlstr_reader.c | 6 +-- test/vfd_swmr_zoo_writer.c | 3 +- 22 files changed, 169 insertions(+), 162 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 ab74613..5a5916e 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 @@ -285,31 +285,32 @@ done: * *------------------------------------------------------------------------- */ -static herr_t +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, "/"); } - if((tmp_len = HDstrlen(config->md_file_name)) != 0) { - if((tot_len += tmp_len) > H5F__MAX_VFD_SWMR_FILE_NAME_LEN) + if ((tmp_len = HDstrlen(config->md_file_name)) != 0) { + 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 maxiumum"); 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) + 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 maxiumum"); HDstrcat(name, hdf5_filename); @@ -344,16 +345,16 @@ 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 -} /* H5FD_vfd_swmr_create_make_believe_data() */ +} /* H5FD_vfd_swmr_create_make_believe_data() */ /*------------------------------------------------------------------------- * Function: H5FD__vfd_swmr_open @@ -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 @@ -417,9 +418,9 @@ H5FD__vfd_swmr_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t max file->hdf5_filename[sizeof(file->hdf5_filename) - 1] = '\0'; /* 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) + 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") diff --git a/test/vfd_swmr.c b/test/vfd_swmr.c index f53b453..cffe503 100644 --- a/test/vfd_swmr.c +++ b/test/vfd_swmr.c @@ -183,7 +183,7 @@ test_fapl(void) /* Set valid md_pages_reserved */ my_config->md_pages_reserved = 2; - my_config->writer = TRUE; + my_config->writer = TRUE; /* Should fail: at least one of maintain_metadata_file and generate_updater_files must be true */ H5E_BEGIN_TRY @@ -1409,7 +1409,8 @@ test_reader_md_concur(void) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); + init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, + NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_reader = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_reader); @@ -2017,7 +2018,8 @@ test_multiple_file_opens_concur(void) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(config_writer, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME2, NULL); + init_vfd_swmr_config(config_writer, 1, 3, FALSE, TRUE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME2, + NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_writer = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_writer); @@ -2350,7 +2352,8 @@ test_disable_enable_eot_concur(void) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); + init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, + NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_reader = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_reader); @@ -2638,7 +2641,8 @@ test_file_end_tick_concur(void) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, NULL); + init_vfd_swmr_config(config_reader, 1, 3, FALSE, FALSE, TRUE, FALSE, TRUE, 256, NULL, MD_FILENAME, + NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ fapl_reader = vfd_swmr_create_fapl(FALSE, TRUE, FALSE, FS_PAGE_SIZE, config_reader); @@ -3721,7 +3725,7 @@ error: static unsigned test_updater_flags(void) { - char filename[FILE_NAME_LEN]; /* Filename to use */ + char filename[FILE_NAME_LEN]; /* Filename to use */ hid_t fid = H5I_INVALID_HID; /* File ID */ hid_t fcpl = H5I_INVALID_HID; /* File creation property list ID */ hid_t fapl = H5I_INVALID_HID; /* File access property list ID */ @@ -3766,13 +3770,12 @@ test_updater_flags(void) /* FILENAME */ h5_fixname("vfd_swmr_file", fapl, filename, sizeof(filename)); - + if ((fcpl = vfd_swmr_create_fcpl(H5F_FSPACE_STRATEGY_PAGE, 4096)) < 0) { HDprintf("vfd_swmr_create_fcpl() failed"); FAIL_STACK_ERROR; } - if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) TEST_ERROR; @@ -4281,8 +4284,8 @@ test_updater_generate_md_checksums(hbool_t file_create) hid_t fapl = H5I_INVALID_HID; /* File access property list ID */ H5F_vfd_swmr_config_t config; /* Configuration for VFD SWMR */ H5F_generate_md_ck_cb_t cb_info; /* Callback */ - H5F_t * f = NULL; /* Internal file object pointer */ - char *md_file_path_name; + H5F_t * f = NULL; /* Internal file object pointer */ + char * md_file_path_name; if (file_create) { TESTING("VFD SWMR updater generate checksums for metadata file with H5Fcreate"); @@ -4336,7 +4339,6 @@ test_updater_generate_md_checksums(hbool_t file_create) /* Get the full metadata file pathname */ md_file_path_name = HDstrdup(f->shared->md_file_path_name); - /* Close the file */ if (H5Fclose(fid) < 0) FAIL_STACK_ERROR; diff --git a/test/vfd_swmr_attrdset_writer.c b/test/vfd_swmr_attrdset_writer.c index 4b3dbc0..85ceb01 100644 --- a/test/vfd_swmr_attrdset_writer.c +++ b/test/vfd_swmr_attrdset_writer.c @@ -135,7 +135,7 @@ static hbool_t state_init(state_t *s, int argc, const char *const *argv); static hbool_t np_init(np_state_t *np, hbool_t writer); static hbool_t np_close(np_state_t *np, hbool_t writer); static hbool_t np_writer(hbool_t result, unsigned step, const state_t *s, np_state_t *np, - H5F_vfd_swmr_config_t *config); + H5F_vfd_swmr_config_t *config); static hbool_t np_reader(hbool_t result, unsigned step, const state_t *s, np_state_t *np); static hbool_t np_confirm_verify_notify(int fd, unsigned step, const state_t *s, np_state_t *np); static hbool_t np_reader_no_verification(const state_t *s, np_state_t *np, H5F_vfd_swmr_config_t *config); @@ -143,11 +143,11 @@ static hbool_t np_reader_no_verification(const state_t *s, np_state_t *np, H5F_v static hbool_t create_dsets(const state_t *s, dsets_state_t *ds); static hbool_t open_dsets(const state_t *s, dsets_state_t *ds); static hbool_t open_dset_real(hid_t fid, hid_t *did, const char *name, unsigned *max_compact, - unsigned *min_dense); + unsigned *min_dense); static hbool_t close_dsets(const dsets_state_t *ds); static hbool_t perform_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, - np_state_t *np); + np_state_t *np); static hbool_t attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, unsigned which); static hbool_t attr_action(unsigned action, const state_t *s, hid_t did, unsigned which); static hbool_t add_attr(const state_t *s, hid_t did, unsigned int which); @@ -155,14 +155,14 @@ static hbool_t modify_attr(const state_t *s, hid_t did, unsigned int which); static hbool_t delete_attr(hid_t did, unsigned int which); static hbool_t verify_dsets_operations(state_t *s, dsets_state_t *ds, H5F_vfd_swmr_config_t *config, - np_state_t *np); + np_state_t *np); static hbool_t verify_attr_dsets_action(unsigned action, const state_t *s, const dsets_state_t *ds, - unsigned which); + unsigned which); static hbool_t verify_attr_action(unsigned action, hid_t did, unsigned which); static hbool_t verify_add_or_modify_attr(unsigned action, hid_t did, char *attr_name, unsigned int which); static hbool_t verify_delete_attr(hid_t did, char *attr_name); static hbool_t verify_storage_cont(unsigned action, hid_t did, unsigned int which, unsigned max_compact, - unsigned min_dense, unsigned asteps); + unsigned min_dense, unsigned asteps); static hbool_t verify_storage_cont_real(hid_t did, unsigned int which, unsigned cut_point); /* Names for datasets */ diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c index b647dd6..6ff5d03 100644 --- a/test/vfd_swmr_bigset_writer.c +++ b/test/vfd_swmr_bigset_writer.c @@ -2589,21 +2589,22 @@ main(int argc, char **argv) /* If using the auxiliary process, the writer creates the updater files. * The reader uses the metadata file generated by the auxiliary process. */ if (s.writer) { - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, FALSE, TRUE, s.flush_raw_data, 128, - "./", "bigset-shadow-%zu", "bigset_updater", i); + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, FALSE, TRUE, + s.flush_raw_data, 128, "./", "bigset-shadow-%zu", "bigset_updater", i); } else { - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE, s.flush_raw_data, 128, - "./", "mdfile", NULL); + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE, + s.flush_raw_data, 128, "./", "mdfile", NULL); } #else - if(s.vds == vds_multi || s.vds == vds_single) { - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, TRUE, s.writer, TRUE, FALSE, s.flush_raw_data, 128, - "", "", NULL); - } else { - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE, s.flush_raw_data, 128, - "./", "bigset-shadow-%zu", NULL, i); + if (s.vds == vds_multi || s.vds == vds_single) { + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, TRUE, s.writer, TRUE, FALSE, + s.flush_raw_data, 128, "", "", NULL); + } + else { + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, s.writer, TRUE, FALSE, + s.flush_raw_data, 128, "./", "bigset-shadow-%zu", NULL, i); } #endif diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index e1d1ccc..1b87d5f 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -326,13 +326,13 @@ await_signal(hid_t fid) #endif /* H5_HAVE_WIN32_API */ -/* +/* * Revised support routines that can be used for all VFD SWMR integration tests */ void -init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag, - hbool_t presume_posix_semantics, hbool_t writer, hbool_t maintain_metadata_file, - hbool_t generate_updater_files, hbool_t flush_raw_data, uint32_t md_pages_reserved, +init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag, + hbool_t presume_posix_semantics, hbool_t writer, hbool_t maintain_metadata_file, + hbool_t generate_updater_files, hbool_t flush_raw_data, uint32_t md_pages_reserved, const char *md_file_path, const char *md_file_fmtstr, const char *updater_file_path, ...) { va_list ap; @@ -342,21 +342,21 @@ init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t config->version = H5F__CURR_VFD_SWMR_CONFIG_VERSION; config->pb_expansion_threshold = 0; - config->tick_len = tick_len; - config->max_lag = max_lag; + config->tick_len = tick_len; + config->max_lag = max_lag; config->presume_posix_semantics = presume_posix_semantics; - config->writer = writer; - config->maintain_metadata_file = maintain_metadata_file; - config->generate_updater_files = generate_updater_files; - config->flush_raw_data = flush_raw_data; - config->md_pages_reserved = md_pages_reserved; + config->writer = writer; + config->maintain_metadata_file = maintain_metadata_file; + config->generate_updater_files = generate_updater_files; + config->flush_raw_data = flush_raw_data; + config->md_pages_reserved = md_pages_reserved; - if(md_file_path == NULL) + if (md_file_path == NULL) config->md_file_path[0] = '\0'; else HDstrcpy(config->md_file_path, md_file_path); - if(md_file_fmtstr == NULL) + if (md_file_fmtstr == NULL) config->md_file_name[0] = '\0'; else { diff --git a/test/vfd_swmr_common.h b/test/vfd_swmr_common.h index 0453d91..8d6f2d5 100644 --- a/test/vfd_swmr_common.h +++ b/test/vfd_swmr_common.h @@ -74,9 +74,9 @@ H5TEST_DLL hid_t vfd_swmr_create_fapl(bool use_latest_format, bool use_vfd_swmr, size_t page_buf_size, H5F_vfd_swmr_config_t *config); H5TEST_DLL void init_vfd_swmr_config(H5F_vfd_swmr_config_t *config, uint32_t tick_len, uint32_t max_lag, - hbool_t presume_posix_semantics, hbool_t writer, - hbool_t maintain_metadata_file, hbool_t generate_updater_files, - hbool_t flush_raw_data, uint32_t md_pages_reserved, + hbool_t presume_posix_semantics, hbool_t writer, + hbool_t maintain_metadata_file, hbool_t generate_updater_files, + hbool_t flush_raw_data, uint32_t md_pages_reserved, const char *md_file_path, const char *md_file_fmtstr, const char *updater_file_path, ...) H5_ATTR_FORMAT(printf, 11, 13); diff --git a/test/vfd_swmr_dsetchks_writer.c b/test/vfd_swmr_dsetchks_writer.c index 0acacce..1e4de5a 100644 --- a/test/vfd_swmr_dsetchks_writer.c +++ b/test/vfd_swmr_dsetchks_writer.c @@ -2311,8 +2311,8 @@ main(int argc, char **argv) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, - "./", "dsetchks-shadow", NULL); + init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, "./", + "dsetchks-shadow", NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config)) < 0) { diff --git a/test/vfd_swmr_dsetops_writer.c b/test/vfd_swmr_dsetops_writer.c index bce1d08..cdb84b2 100644 --- a/test/vfd_swmr_dsetops_writer.c +++ b/test/vfd_swmr_dsetops_writer.c @@ -2228,10 +2228,11 @@ main(int argc, char **argv) TEST_ERROR; } - /* config, tick_len, max_lag, presume_posix_semantics, writer, - * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, "./", "dsetops-shadow", NULL); + init_vfd_swmr_config(&config, 4, 7, FALSE, writer, TRUE, FALSE, s.flush_raw_data, 128, "./", + "dsetops-shadow", NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ if ((fapl = vfd_swmr_create_fapl(true, s.use_vfd_swmr, true, 4096, &config)) < 0) { diff --git a/test/vfd_swmr_generator.c b/test/vfd_swmr_generator.c index e002b4d..1392293 100644 --- a/test/vfd_swmr_generator.c +++ b/test/vfd_swmr_generator.c @@ -128,7 +128,8 @@ gen_skeleton(const char *filename, hbool_t verbose, hbool_t vfd_swmr_write, int /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(config, 4, 10, FALSE, vfd_swmr_write, TRUE, FALSE, TRUE, 128, NULL, "generator-shadow", NULL); + init_vfd_swmr_config(config, 4, 10, FALSE, vfd_swmr_write, TRUE, FALSE, TRUE, 128, NULL, + "generator-shadow", NULL); } /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ diff --git a/test/vfd_swmr_gfail_writer.c b/test/vfd_swmr_gfail_writer.c index fc3bcb0..10370cc 100644 --- a/test/vfd_swmr_gfail_writer.c +++ b/test/vfd_swmr_gfail_writer.c @@ -547,8 +547,8 @@ main(int argc, char **argv) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, - "./", "group-shadow", NULL); + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", + "group-shadow", NULL); /* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST) * as the second parameter of H5Pset_libver_bound() that is called by diff --git a/test/vfd_swmr_gperf_writer.c b/test/vfd_swmr_gperf_writer.c index a1f3ff1..c376b51 100644 --- a/test/vfd_swmr_gperf_writer.c +++ b/test/vfd_swmr_gperf_writer.c @@ -2807,8 +2807,8 @@ main(int argc, char **argv) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, FALSE, 128, - "./", "group-shadow", NULL); + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, FALSE, 128, "./", + "group-shadow", NULL); /* If the log flag is on, create the log file log-test under the current directory. */ if (s.glog == true) diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c index 50e0535..dd387b2 100644 --- a/test/vfd_swmr_group_writer.c +++ b/test/vfd_swmr_group_writer.c @@ -5006,8 +5006,8 @@ main(int argc, char **argv) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, - "./", "group-shadow", NULL); + init_vfd_swmr_config(&config, s.tick_len, s.max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", + "group-shadow", NULL); /* If old-style option is chosen, use the earliest file format(H5F_LIBVER_EARLIEST) * as the second parameter of H5Pset_libver_bound() that is called by diff --git a/test/vfd_swmr_indep_rw_writer.c b/test/vfd_swmr_indep_rw_writer.c index 97bb9b1..77eee74 100644 --- a/test/vfd_swmr_indep_rw_writer.c +++ b/test/vfd_swmr_indep_rw_writer.c @@ -367,8 +367,8 @@ indep_init_vfd_swmr_config_plist(state_t *s, hbool_t writer, const char *mdf_nam /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(&config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, - "./", mdf_name, NULL); + init_vfd_swmr_config(&config, s->tick_len, s->max_lag, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", + mdf_name, NULL); /* Pass the use_vfd_swmr, only_meta_page, page buffer size, config to vfd_swmr_create_fapl().*/ if ((s->fapl = vfd_swmr_create_fapl(TRUE, s->use_vfd_swmr, TRUE, s->pbs, &config)) < 0) { diff --git a/test/vfd_swmr_remove_reader.c b/test/vfd_swmr_remove_reader.c index 9b73adc..775eb76 100644 --- a/test/vfd_swmr_remove_reader.c +++ b/test/vfd_swmr_remove_reader.c @@ -303,9 +303,9 @@ read_records(const char *filename, unsigned verbose, unsigned long nseconds, uns if ((config = HDcalloc(1, sizeof(*config))) == NULL) goto error; - /* config, tick_len, max_lag, presume_posix_semantics, writer, - * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, - * md_file_path, md_file_name, updater_file_path */ + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ init_vfd_swmr_config(config, 4, 5, FALSE, FALSE, TRUE, FALSE, TRUE, 128, NULL, "rw-shadow", NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ diff --git a/test/vfd_swmr_vlstr_reader.c b/test/vfd_swmr_vlstr_reader.c index 406f13b..dc403cf 100644 --- a/test/vfd_swmr_vlstr_reader.c +++ b/test/vfd_swmr_vlstr_reader.c @@ -115,9 +115,9 @@ main(int argc, char **argv) if (argc > 0) errx(EXIT_FAILURE, "unexpected command-line arguments"); - /* config, tick_len, max_lag, presume_posix_semantics, writer, - * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, - * md_file_path, md_file_name, updater_file_path */ + /* config, tick_len, max_lag, presume_posix_semantics, writer, + * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, + * md_file_path, md_file_name, updater_file_path */ init_vfd_swmr_config(&config, 4, 7, FALSE, false, TRUE, FALSE, TRUE, 128, "./", "vlstr-shadow", NULL); /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c index a040fca..4a6e61c 100644 --- a/test/vfd_swmr_zoo_writer.c +++ b/test/vfd_swmr_zoo_writer.c @@ -478,7 +478,8 @@ main(int argc, char **argv) /* config, tick_len, max_lag, presume_posix_semantics, writer, * maintain_metadata_file, generate_updater_files, flush_raw_data, md_pages_reserved, * md_file_path, md_file_name, updater_file_path */ - init_vfd_swmr_config(&vfd_swmr_config, TICK_LEN, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", "zoo-shadow", NULL); + init_vfd_swmr_config(&vfd_swmr_config, TICK_LEN, 7, FALSE, writer, TRUE, FALSE, TRUE, 128, "./", + "zoo-shadow", NULL); /* ? turn off use latest format argument via 1st argument? since later on it reset to early format */ /* use_latest_format, use_vfd_swmr, only_meta_page, page_buf_size, config */ -- cgit v0.12