summaryrefslogtreecommitdiffstats
path: root/src/H5Fprivate.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2019-08-23 15:21:08 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2019-08-23 15:21:08 (GMT)
commit884ad149e29f7c99487af676f0bbcd88cbf2735f (patch)
treee68eda1f03f26c2c6a08b638b78e5b4ea71d3caf /src/H5Fprivate.h
parentf0272e4945f047f17043b484db594df131222f1e (diff)
parentf42c7cc0d85cc5b232afd621711fdbd64f6e19d9 (diff)
downloadhdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.zip
hdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.tar.gz
hdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.tar.bz2
Merge pull request #1889 in HDFFV/hdf5 from ~KOZIOL/hdf5:shared_file_ptr to develop
* commit 'f42c7cc0d85cc5b232afd621711fdbd64f6e19d9': Fix major error codes Switch shared file struct name from 'H5F_file_t' to 'H5F_shared_t', to match naming convention for shared structs in rest of library data structures. Small tidy up. Progress toward movig H5MF* API to use shared file pointers instead of top file pointers. Progress on moving the H5MF* interface to using shared file pointers instead of top file pointers. Begin converting the H5MF interface to use shared file pointers instead of top file pointers. Progress toward moving the dataset routines to using the 'shared' file pointer instead of the 'top' file pointer. Begin converting dataset code to use shared file pointer instead of top file pointer. Finish converting H5PB_* routines to use shared file pointer, instead of top file pointer. First pass of converting H5PB_* routines to use shared file pointers. Rest of changes for 'top' file pointer to 'shared' file pointer for H5F__accum routines. Partial H5F__accum_* routines.
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r--src/H5Fprivate.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 838fa28..867db84 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -278,6 +278,7 @@ typedef struct H5F_t H5F_t;
#ifdef H5F_MODULE
#define H5F_LOW_BOUND(F) ((F)->shared->low_bound)
#define H5F_HIGH_BOUND(F) ((F)->shared->high_bound)
+#define H5F_SHARED_INTENT(F_SH) ((F_SH)->flags)
#define H5F_INTENT(F) ((F)->shared->flags)
#define H5F_OPEN_NAME(F) ((F)->open_name)
#define H5F_ACTUAL_NAME(F) ((F)->actual_name)
@@ -293,6 +294,7 @@ typedef struct H5F_t H5F_t;
#define H5F_GET_READ_ATTEMPTS(F) ((F)->shared->read_attempts)
#define H5F_DRIVER_ID(F) ((F)->shared->lf->driver_id)
#define H5F_GET_FILENO(F,FILENUM) ((FILENUM) = (F)->shared->lf->fileno)
+#define H5F_SHARED_HAS_FEATURE(F_SH,FL) ((F_SH)->lf->feature_flags & (FL))
#define H5F_HAS_FEATURE(F,FL) ((F)->shared->lf->feature_flags & (FL))
#define H5F_BASE_ADDR(F) ((F)->shared->sblock->base_addr)
#define H5F_SYM_LEAF_K(F) ((F)->shared->sblock->sym_leaf_k)
@@ -336,6 +338,7 @@ typedef struct H5F_t H5F_t;
#else /* H5F_MODULE */
#define H5F_LOW_BOUND(F) (H5F_get_low_bound(F))
#define H5F_HIGH_BOUND(F) (H5F_get_high_bound(F))
+#define H5F_SHARED_INTENT(F_SH) (H5F_shared_get_intent(F_SH))
#define H5F_INTENT(F) (H5F_get_intent(F))
#define H5F_OPEN_NAME(F) (H5F_get_open_name(F))
#define H5F_ACTUAL_NAME(F) (H5F_get_actual_name(F))
@@ -351,6 +354,7 @@ typedef struct H5F_t H5F_t;
#define H5F_GET_READ_ATTEMPTS(F) (H5F_get_read_attempts(F))
#define H5F_DRIVER_ID(F) (H5F_get_driver_id(F))
#define H5F_GET_FILENO(F,FILENUM) (H5F_get_fileno((F), &(FILENUM)))
+#define H5F_SHARED_HAS_FEATURE(F_SH,FL) (H5F_shared_has_feature(F_SH,FL))
#define H5F_HAS_FEATURE(F,FL) (H5F_has_feature(F,FL))
#define H5F_BASE_ADDR(F) (H5F_get_base_addr(F))
#define H5F_SYM_LEAF_K(F) (H5F_sym_leaf_k(F))
@@ -575,6 +579,7 @@ typedef struct H5F_t H5F_t;
#define H5F_SDATA_BLOCK_SIZE_DEF 2048
/* Check for file using paged aggregation */
+#define H5F_SHARED_PAGED_AGGR(F_SH) ((F_SH)->fs_strategy == H5F_FSPACE_STRATEGY_PAGE && (F_SH)->fs_page_size)
#define H5F_PAGED_AGGR(F) (F->shared->fs_strategy == H5F_FSPACE_STRATEGY_PAGE && F->shared->fs_page_size)
/* Metadata read attempt values */
@@ -651,7 +656,7 @@ struct H5P_genplist_t;
/* Forward declarations for anonymous H5F objects */
/* Main file structures */
-typedef struct H5F_file_t H5F_file_t;
+typedef struct H5F_shared_t H5F_shared_t;
/* Block aggregation structure */
typedef struct H5F_blk_aggr_t H5F_blk_aggr_t;
@@ -723,11 +728,12 @@ H5_DLL hid_t H5F_get_file_id(hid_t obj_id, H5I_type_t id_type, hbool_t app_ref);
/* Functions that retrieve values from the file struct */
H5_DLL H5F_libver_t H5F_get_low_bound(const H5F_t *f);
H5_DLL H5F_libver_t H5F_get_high_bound(const H5F_t *f);
+H5_DLL unsigned H5F_shared_get_intent(const H5F_shared_t *f);
H5_DLL unsigned H5F_get_intent(const H5F_t *f);
H5_DLL char *H5F_get_open_name(const H5F_t *f);
H5_DLL char *H5F_get_actual_name(const H5F_t *f);
H5_DLL char *H5F_get_extpath(const H5F_t *f);
-H5_DLL H5F_file_t *H5F_get_shared(const H5F_t *f);
+H5_DLL H5F_shared_t *H5F_get_shared(const H5F_t *f);
H5_DLL hbool_t H5F_same_shared(const H5F_t *f1, const H5F_t *f2);
H5_DLL unsigned H5F_get_nopen_objs(const H5F_t *f);
H5_DLL unsigned H5F_incr_nopen_objs(H5F_t *f);
@@ -786,7 +792,9 @@ H5_DLL char *H5F_mdc_log_location(const H5F_t *f);
/* Functions that retrieve values from VFD layer */
H5_DLL hid_t H5F_get_driver_id(const H5F_t *f);
H5_DLL herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum);
+H5_DLL hbool_t H5F_shared_has_feature(const H5F_shared_t *f, unsigned feature);
H5_DLL hbool_t H5F_has_feature(const H5F_t *f, unsigned feature);
+H5_DLL haddr_t H5F_shared_get_eoa(const H5F_shared_t *f_sh, H5FD_mem_t type);
H5_DLL haddr_t H5F_get_eoa(const H5F_t *f, H5FD_mem_t type);
H5_DLL herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle);
@@ -797,7 +805,9 @@ H5_DLL herr_t H5F_traverse_mount(struct H5O_loc_t *oloc/*in,out*/);
H5_DLL herr_t H5F_flush_mounts(H5F_t *f);
/* Functions that operate on blocks of bytes wrt super block */
+H5_DLL herr_t H5F_shared_block_read(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/);
H5_DLL herr_t H5F_block_read(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, void *buf/*out*/);
+H5_DLL herr_t H5F_shared_block_write(H5F_shared_t *f_sh, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf);
H5_DLL herr_t H5F_block_write(H5F_t *f, H5FD_mem_t type, haddr_t addr, size_t size, const void *buf);
/* Functions that flush or evict */
@@ -837,6 +847,7 @@ H5_DLL herr_t H5F_eoa_dirty(H5F_t *f);
H5_DLL herr_t H5F_get_mpi_handle(const H5F_t *f, MPI_File **f_handle);
H5_DLL int H5F_mpi_get_rank(const H5F_t *f);
H5_DLL MPI_Comm H5F_mpi_get_comm(const H5F_t *f);
+H5_DLL int H5F_shared_mpi_get_size(const H5F_shared_t *f_sh);
H5_DLL int H5F_mpi_get_size(const H5F_t *f);
H5_DLL herr_t H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm);
H5_DLL herr_t H5F_get_mpi_info(const H5F_t *f, MPI_Info **f_info);
@@ -853,7 +864,7 @@ H5_DLL H5F_t *H5F_prefix_open_file(H5F_t *primary_file, H5F_prefix_open_t prefix
H5_DLL herr_t H5F_cwfs_add(H5F_t *f, struct H5HG_heap_t *heap);
H5_DLL herr_t H5F_cwfs_find_free_heap(H5F_t *f, size_t need, haddr_t *addr);
H5_DLL herr_t H5F_cwfs_advance_heap(H5F_t *f, struct H5HG_heap_t *heap, hbool_t add_heap);
-H5_DLL herr_t H5F_cwfs_remove_heap(H5F_file_t *shared, struct H5HG_heap_t *heap);
+H5_DLL herr_t H5F_cwfs_remove_heap(H5F_shared_t *shared, struct H5HG_heap_t *heap);
/* Debugging functions */
H5_DLL herr_t H5F_debug(H5F_t *f, FILE * stream, int indent, int fwidth);