![]() |
|
|||
File indexing completed on 2025-04-18 09:16:07
0001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 0002 * Copyright by The HDF Group. * 0003 * All rights reserved. * 0004 * * 0005 * This file is part of HDF5. The full HDF5 copyright notice, including * 0006 * terms governing use, modification, and redistribution, is contained in * 0007 * the COPYING file, which can be found at the root of the source code * 0008 * distribution tree, or in https://www.hdfgroup.org/licenses. * 0009 * If you do not have access to either file, you may request a copy from * 0010 * help@hdfgroup.org. * 0011 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 0012 0013 /* 0014 * Purpose: The public header file for the native VOL connector. 0015 */ 0016 0017 #ifndef H5VLnative_H 0018 #define H5VLnative_H 0019 0020 /* Public headers needed by this file */ 0021 #include "H5Apublic.h" /* Attributes */ 0022 #include "H5VLpublic.h" /* Virtual Object Layer */ 0023 0024 /*****************/ 0025 /* Public Macros */ 0026 /*****************/ 0027 0028 /* Identifier for the native VOL connector */ 0029 #define H5VL_NATIVE (H5VL_native_register()) 0030 0031 /* Characteristics of the native VOL connector */ 0032 #define H5VL_NATIVE_NAME "native" 0033 #define H5VL_NATIVE_VALUE H5_VOL_NATIVE /* enum value */ 0034 #define H5VL_NATIVE_VERSION 0 0035 0036 /* Values for VOL connector attribute optional VOL operations */ 0037 /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query 0038 * routine must be updated. 0039 */ 0040 #ifndef H5_NO_DEPRECATED_SYMBOLS 0041 #define H5VL_NATIVE_ATTR_ITERATE_OLD 0 /* H5Aiterate (deprecated routine) */ 0042 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 0043 /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro 0044 * must be updated. 0045 */ 0046 0047 #ifndef H5_NO_DEPRECATED_SYMBOLS 0048 /* Parameters for attribute 'iterate old' operation */ 0049 typedef struct H5VL_native_attr_iterate_old_t { 0050 hid_t loc_id; 0051 unsigned *attr_num; 0052 H5A_operator1_t op; 0053 void *op_data; 0054 } H5VL_native_attr_iterate_old_t; 0055 0056 /* Parameters for native connector's attribute 'optional' operations */ 0057 typedef union H5VL_native_attr_optional_args_t { 0058 /* H5VL_NATIVE_ATTR_ITERATE_OLD */ 0059 H5VL_native_attr_iterate_old_t iterate_old; 0060 } H5VL_native_attr_optional_args_t; 0061 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 0062 0063 /* Values for native VOL connector dataset optional VOL operations */ 0064 /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query 0065 * routine must be updated. 0066 */ 0067 #define H5VL_NATIVE_DATASET_FORMAT_CONVERT 0 /* H5Dformat_convert (internal) */ 0068 #define H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE 1 /* H5Dget_chunk_index_type */ 0069 #define H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE 2 /* H5Dget_chunk_storage_size */ 0070 #define H5VL_NATIVE_DATASET_GET_NUM_CHUNKS 3 /* H5Dget_num_chunks */ 0071 #define H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_IDX 4 /* H5Dget_chunk_info */ 0072 #define H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD 5 /* H5Dget_chunk_info_by_coord */ 0073 #define H5VL_NATIVE_DATASET_CHUNK_READ 6 /* H5Dchunk_read */ 0074 #define H5VL_NATIVE_DATASET_CHUNK_WRITE 7 /* H5Dchunk_write */ 0075 #define H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE 8 /* H5Dvlen_get_buf_size */ 0076 #define H5VL_NATIVE_DATASET_GET_OFFSET 9 /* H5Dget_offset */ 0077 #define H5VL_NATIVE_DATASET_CHUNK_ITER 10 /* H5Dchunk_iter */ 0078 /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro 0079 * must be updated. 0080 */ 0081 0082 /* Parameters for native connector's dataset 'chunk read' operation */ 0083 typedef struct H5VL_native_dataset_chunk_read_t { 0084 const hsize_t *offset; 0085 uint32_t filters; 0086 void *buf; 0087 } H5VL_native_dataset_chunk_read_t; 0088 0089 /* Parameters for native connector's dataset 'chunk write' operation */ 0090 typedef struct H5VL_native_dataset_chunk_write_t { 0091 const hsize_t *offset; 0092 uint32_t filters; 0093 uint32_t size; 0094 const void *buf; 0095 } H5VL_native_dataset_chunk_write_t; 0096 0097 /* Parameters for native connector's dataset 'get vlen buf size' operation */ 0098 typedef struct H5VL_native_dataset_get_vlen_buf_size_t { 0099 hid_t type_id; 0100 hid_t space_id; 0101 hsize_t *size; /* Size of variable-length data buffer (OUT) */ 0102 } H5VL_native_dataset_get_vlen_buf_size_t; 0103 0104 /* Parameters for native connector's dataset 'get chunk storage size' operation */ 0105 typedef struct H5VL_native_dataset_get_chunk_storage_size_t { 0106 const hsize_t *offset; /* Offset of chunk */ 0107 hsize_t *size; /* Size of chunk (OUT) */ 0108 } H5VL_native_dataset_get_chunk_storage_size_t; 0109 0110 /* Parameters for native connector's dataset 'get num chunks' operation */ 0111 typedef struct H5VL_native_dataset_get_num_chunks_t { 0112 hid_t space_id; /* Space selection */ 0113 hsize_t *nchunks; /* # of chunk for space selection (OUT) */ 0114 } H5VL_native_dataset_get_num_chunks_t; 0115 0116 /* Parameters for native connector's dataset 'get chunk info by idx' operation */ 0117 typedef struct H5VL_native_dataset_get_chunk_info_by_idx_t { 0118 hid_t space_id; /* Space selection */ 0119 hsize_t chk_index; /* Chunk index within space */ 0120 hsize_t *offset; /* Chunk coordinates (OUT) */ 0121 unsigned *filter_mask; /* Filter mask for chunk (OUT) */ 0122 haddr_t *addr; /* Address of chunk in file (OUT) */ 0123 hsize_t *size; /* Size of chunk in file (OUT) */ 0124 } H5VL_native_dataset_get_chunk_info_by_idx_t; 0125 0126 /* Parameters for native connector's dataset 'get chunk info by coord' operation */ 0127 typedef struct H5VL_native_dataset_get_chunk_info_by_coord_t { 0128 const hsize_t *offset; /* Chunk coordinates */ 0129 unsigned *filter_mask; /* Filter mask for chunk (OUT) */ 0130 haddr_t *addr; /* Address of chunk in file (OUT) */ 0131 hsize_t *size; /* Size of chunk in file (OUT) */ 0132 } H5VL_native_dataset_get_chunk_info_by_coord_t; 0133 0134 /* Parameters for native connector's dataset 'optional' operations */ 0135 typedef union H5VL_native_dataset_optional_args_t { 0136 /* H5VL_NATIVE_DATASET_FORMAT_CONVERT */ 0137 /* No args */ 0138 0139 /* H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE */ 0140 struct { 0141 H5D_chunk_index_t *idx_type; /* Type of chunk index (OUT) */ 0142 } get_chunk_idx_type; 0143 0144 /* H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE */ 0145 H5VL_native_dataset_get_chunk_storage_size_t get_chunk_storage_size; 0146 0147 /* H5VL_NATIVE_DATASET_GET_NUM_CHUNKS */ 0148 H5VL_native_dataset_get_num_chunks_t get_num_chunks; 0149 0150 /* H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_IDX */ 0151 H5VL_native_dataset_get_chunk_info_by_idx_t get_chunk_info_by_idx; 0152 0153 /* H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD */ 0154 H5VL_native_dataset_get_chunk_info_by_coord_t get_chunk_info_by_coord; 0155 0156 /* H5VL_NATIVE_DATASET_CHUNK_READ */ 0157 H5VL_native_dataset_chunk_read_t chunk_read; 0158 0159 /* H5VL_NATIVE_DATASET_CHUNK_WRITE */ 0160 H5VL_native_dataset_chunk_write_t chunk_write; 0161 0162 /* H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE */ 0163 H5VL_native_dataset_get_vlen_buf_size_t get_vlen_buf_size; 0164 0165 /* H5VL_NATIVE_DATASET_GET_OFFSET */ 0166 struct { 0167 haddr_t *offset; /* Contiguous dataset's offset in the file (OUT) */ 0168 } get_offset; 0169 0170 /* H5VL_NATIVE_DATASET_CHUNK_ITER */ 0171 struct { 0172 H5D_chunk_iter_op_t op; /* Chunk iteration callback */ 0173 void *op_data; /* Context to pass to iteration callback */ 0174 } chunk_iter; 0175 0176 } H5VL_native_dataset_optional_args_t; 0177 0178 /* Values for native VOL connector file optional VOL operations */ 0179 /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query 0180 * routine must be updated. 0181 */ 0182 #define H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE 0 /* H5Fclear_elink_file_cache */ 0183 #define H5VL_NATIVE_FILE_GET_FILE_IMAGE 1 /* H5Fget_file_image */ 0184 #define H5VL_NATIVE_FILE_GET_FREE_SECTIONS 2 /* H5Fget_free_sections */ 0185 #define H5VL_NATIVE_FILE_GET_FREE_SPACE 3 /* H5Fget_freespace */ 0186 #define H5VL_NATIVE_FILE_GET_INFO 4 /* H5Fget_info1/2 */ 0187 #define H5VL_NATIVE_FILE_GET_MDC_CONF 5 /* H5Fget_mdc_config */ 0188 #define H5VL_NATIVE_FILE_GET_MDC_HR 6 /* H5Fget_mdc_hit_rate */ 0189 #define H5VL_NATIVE_FILE_GET_MDC_SIZE 7 /* H5Fget_mdc_size */ 0190 #define H5VL_NATIVE_FILE_GET_SIZE 8 /* H5Fget_filesize */ 0191 #define H5VL_NATIVE_FILE_GET_VFD_HANDLE 9 /* H5Fget_vfd_handle */ 0192 #define H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE 10 /* H5Freset_mdc_hit_rate_stats */ 0193 #define H5VL_NATIVE_FILE_SET_MDC_CONFIG 11 /* H5Fset_mdc_config */ 0194 #define H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO 12 /* H5Fget_metadata_read_retry_info */ 0195 #define H5VL_NATIVE_FILE_START_SWMR_WRITE 13 /* H5Fstart_swmr_write */ 0196 #define H5VL_NATIVE_FILE_START_MDC_LOGGING 14 /* H5Fstart_mdc_logging */ 0197 #define H5VL_NATIVE_FILE_STOP_MDC_LOGGING 15 /* H5Fstop_mdc_logging */ 0198 #define H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS 16 /* H5Fget_mdc_logging_status */ 0199 #define H5VL_NATIVE_FILE_FORMAT_CONVERT 17 /* H5Fformat_convert */ 0200 #define H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS 18 /* H5Freset_page_buffering_stats */ 0201 #define H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS 19 /* H5Fget_page_buffering_stats */ 0202 #define H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO 20 /* H5Fget_mdc_image_info */ 0203 #define H5VL_NATIVE_FILE_GET_EOA 21 /* H5Fget_eoa */ 0204 #define H5VL_NATIVE_FILE_INCR_FILESIZE 22 /* H5Fincrement_filesize */ 0205 #define H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS 23 /* H5Fset_latest_format/libver_bounds */ 0206 #define H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG 24 /* H5Fget_dset_no_attrs_hint */ 0207 #define H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG 25 /* H5Fset_dset_no_attrs_hint */ 0208 #ifdef H5_HAVE_PARALLEL 0209 #define H5VL_NATIVE_FILE_GET_MPI_ATOMICITY 26 /* H5Fget_mpi_atomicity */ 0210 #define H5VL_NATIVE_FILE_SET_MPI_ATOMICITY 27 /* H5Fset_mpi_atomicity */ 0211 #endif 0212 #define H5VL_NATIVE_FILE_POST_OPEN 28 /* Adjust file after open, with wrapping context */ 0213 /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro 0214 * must be updated. 0215 */ 0216 0217 /* Parameters for native connector's file 'get file image' operation */ 0218 typedef struct H5VL_native_file_get_file_image_t { 0219 size_t buf_size; /* Size of file image buffer */ 0220 void *buf; /* Buffer for file image (OUT) */ 0221 size_t *image_len; /* Size of file image (OUT) */ 0222 } H5VL_native_file_get_file_image_t; 0223 0224 /* Parameters for native connector's file 'get free sections' operation */ 0225 typedef struct H5VL_native_file_get_free_sections_t { 0226 H5F_mem_t type; /* Type of file memory to query */ 0227 H5F_sect_info_t *sect_info; /* Array of sections (OUT) */ 0228 size_t nsects; /* Size of section array */ 0229 size_t *sect_count; /* Actual # of sections of type (OUT) */ 0230 } H5VL_native_file_get_free_sections_t; 0231 0232 /* Parameters for native connector's file 'get freespace' operation */ 0233 typedef struct H5VL_native_file_get_freespace_t { 0234 hsize_t *size; /* Size of free space (OUT) */ 0235 } H5VL_native_file_get_freespace_t; 0236 0237 /* Parameters for native connector's file 'get info' operation */ 0238 typedef struct H5VL_native_file_get_info_t { 0239 H5I_type_t type; /* Type of object */ 0240 H5F_info2_t *finfo; /* Pointer to file info (OUT) */ 0241 } H5VL_native_file_get_info_t; 0242 0243 /* Parameters for native connector's file 'get metadata cache size' operation */ 0244 typedef struct H5VL_native_file_get_mdc_size_t { 0245 size_t *max_size; /* Maximum amount of cached data (OUT) */ 0246 size_t *min_clean_size; /* Minimum amount of cached data to keep clean (OUT) */ 0247 size_t *cur_size; /* Current amount of cached data (OUT) */ 0248 uint32_t *cur_num_entries; /* Current # of cached entries (OUT) */ 0249 } H5VL_native_file_get_mdc_size_t; 0250 0251 /* Parameters for native connector's file 'get VFD handle' operation */ 0252 typedef struct H5VL_native_file_get_vfd_handle_t { 0253 hid_t fapl_id; 0254 void **file_handle; /* File handle from VFD (OUT) */ 0255 } H5VL_native_file_get_vfd_handle_t; 0256 0257 /* Parameters for native connector's file 'get MDC logging status' operation */ 0258 typedef struct H5VL_native_file_get_mdc_logging_status_t { 0259 hbool_t *is_enabled; /* Whether logging is enabled (OUT) */ 0260 hbool_t *is_currently_logging; /* Whether currently logging (OUT) */ 0261 } H5VL_native_file_get_mdc_logging_status_t; 0262 0263 /* Parameters for native connector's file 'get page buffering stats' operation */ 0264 typedef struct H5VL_native_file_get_page_buffering_stats_t { 0265 unsigned *accesses; /* Metadata/raw data page access counts (OUT) */ 0266 unsigned *hits; /* Metadata/raw data page hit counts (OUT) */ 0267 unsigned *misses; /* Metadata/raw data page miss counts (OUT) */ 0268 unsigned *evictions; /* Metadata/raw data page eviction counts (OUT) */ 0269 unsigned *bypasses; /* Metadata/raw data page bypass counts (OUT) */ 0270 } H5VL_native_file_get_page_buffering_stats_t; 0271 0272 /* Parameters for native connector's file 'get MDC image info' operation */ 0273 typedef struct H5VL_native_file_get_mdc_image_info_t { 0274 haddr_t *addr; /* Address of image (OUT) */ 0275 hsize_t *len; /* Length of image (OUT) */ 0276 } H5VL_native_file_get_mdc_image_info_t; 0277 0278 /* Parameters for native connector's file 'set libver bounds' operation */ 0279 typedef struct H5VL_native_file_set_libver_bounds_t { 0280 H5F_libver_t low; /* Lowest version possible */ 0281 H5F_libver_t high; /* Highest version possible */ 0282 } H5VL_native_file_set_libver_bounds_t; 0283 0284 /* Parameters for native connector's file 'optional' operations */ 0285 typedef union H5VL_native_file_optional_args_t { 0286 /* H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE */ 0287 /* No args */ 0288 0289 /* H5VL_NATIVE_FILE_GET_FILE_IMAGE */ 0290 H5VL_native_file_get_file_image_t get_file_image; 0291 0292 /* H5VL_NATIVE_FILE_GET_FREE_SECTIONS */ 0293 H5VL_native_file_get_free_sections_t get_free_sections; 0294 0295 /* H5VL_NATIVE_FILE_GET_FREE_SPACE */ 0296 H5VL_native_file_get_freespace_t get_freespace; 0297 0298 /* H5VL_NATIVE_FILE_GET_INFO */ 0299 H5VL_native_file_get_info_t get_info; 0300 0301 /* H5VL_NATIVE_FILE_GET_MDC_CONF */ 0302 struct { 0303 H5AC_cache_config_t *config; /* Pointer to MDC config (OUT) */ 0304 } get_mdc_config; 0305 0306 /* H5VL_NATIVE_FILE_GET_MDC_HR */ 0307 struct { 0308 double *hit_rate; /* Metadata cache hit rate (OUT) */ 0309 } get_mdc_hit_rate; 0310 0311 /* H5VL_NATIVE_FILE_GET_MDC_SIZE */ 0312 H5VL_native_file_get_mdc_size_t get_mdc_size; 0313 0314 /* H5VL_NATIVE_FILE_GET_SIZE */ 0315 struct { 0316 hsize_t *size; /* Size of file (OUT) */ 0317 } get_size; 0318 0319 /* H5VL_NATIVE_FILE_GET_VFD_HANDLE */ 0320 H5VL_native_file_get_vfd_handle_t get_vfd_handle; 0321 0322 /* H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE */ 0323 /* No args */ 0324 0325 /* H5VL_NATIVE_FILE_SET_MDC_CONFIG */ 0326 struct { 0327 const H5AC_cache_config_t *config; /* Pointer to new MDC config */ 0328 } set_mdc_config; 0329 0330 /* H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO */ 0331 struct { 0332 H5F_retry_info_t *info; /* Pointer to metadata read retry info (OUT) */ 0333 } get_metadata_read_retry_info; 0334 0335 /* H5VL_NATIVE_FILE_START_SWMR_WRITE */ 0336 /* No args */ 0337 0338 /* H5VL_NATIVE_FILE_START_MDC_LOGGING */ 0339 /* No args */ 0340 0341 /* H5VL_NATIVE_FILE_STOP_MDC_LOGGING */ 0342 /* No args */ 0343 0344 /* H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS */ 0345 H5VL_native_file_get_mdc_logging_status_t get_mdc_logging_status; 0346 0347 /* H5VL_NATIVE_FILE_FORMAT_CONVERT */ 0348 /* No args */ 0349 0350 /* H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS */ 0351 /* No args */ 0352 0353 /* H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS */ 0354 H5VL_native_file_get_page_buffering_stats_t get_page_buffering_stats; 0355 0356 /* H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO */ 0357 H5VL_native_file_get_mdc_image_info_t get_mdc_image_info; 0358 0359 /* H5VL_NATIVE_FILE_GET_EOA */ 0360 struct { 0361 haddr_t *eoa; /* End of allocated file address space (OUT) */ 0362 } get_eoa; 0363 0364 /* H5VL_NATIVE_FILE_INCR_FILESIZE */ 0365 struct { 0366 hsize_t increment; /* Amount to increment file size */ 0367 } increment_filesize; 0368 0369 /* H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS */ 0370 H5VL_native_file_set_libver_bounds_t set_libver_bounds; 0371 0372 /* H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG */ 0373 struct { 0374 hbool_t *minimize; /* Flag whether dataset object headers are minimal (OUT) */ 0375 } get_min_dset_ohdr_flag; 0376 0377 /* H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG */ 0378 struct { 0379 hbool_t minimize; /* Flag whether dataset object headers should be minimal */ 0380 } set_min_dset_ohdr_flag; 0381 0382 #ifdef H5_HAVE_PARALLEL 0383 /* H5VL_NATIVE_FILE_GET_MPI_ATOMICITY */ 0384 struct { 0385 hbool_t *flag; /* Flag whether MPI atomicity is set for files (OUT) */ 0386 } get_mpi_atomicity; 0387 0388 /* H5VL_NATIVE_FILE_SET_MPI_ATOMICITY */ 0389 struct { 0390 hbool_t flag; /* Flag whether to set MPI atomicity for files */ 0391 } set_mpi_atomicity; 0392 #endif /* H5_HAVE_PARALLEL */ 0393 0394 /* H5VL_NATIVE_FILE_POST_OPEN */ 0395 /* No args */ 0396 } H5VL_native_file_optional_args_t; 0397 0398 /* Values for native VOL connector group optional VOL operations */ 0399 /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query 0400 * routine must be updated. 0401 */ 0402 #ifndef H5_NO_DEPRECATED_SYMBOLS 0403 #define H5VL_NATIVE_GROUP_ITERATE_OLD 0 /* HG5Giterate (deprecated routine) */ 0404 #define H5VL_NATIVE_GROUP_GET_OBJINFO 1 /* HG5Gget_objinfo (deprecated routine) */ 0405 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 0406 /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro 0407 * must be updated. 0408 */ 0409 0410 #ifndef H5_NO_DEPRECATED_SYMBOLS 0411 /* Parameters for group 'iterate old' operation */ 0412 typedef struct H5VL_native_group_iterate_old_t { 0413 H5VL_loc_params_t loc_params; /* Location parameters for iteration */ 0414 hsize_t idx; /* Index of link to begin iteration at */ 0415 hsize_t *last_obj; /* Index of last link looked at (OUT) */ 0416 H5G_iterate_t op; /* Group (link) operator callback */ 0417 void *op_data; /* Context to pass to iterator callback */ 0418 } H5VL_native_group_iterate_old_t; 0419 0420 /* Parameters for group 'get objinfo' operation */ 0421 typedef struct H5VL_native_group_get_objinfo_t { 0422 H5VL_loc_params_t loc_params; /* Location parameters for iteration */ 0423 hbool_t follow_link; /* Whether to follow links for query */ 0424 H5G_stat_t *statbuf; /* Pointer to object info struct (OUT) */ 0425 } H5VL_native_group_get_objinfo_t; 0426 0427 /* Parameters for native connector's group 'optional' operations */ 0428 typedef union H5VL_native_group_optional_args_t { 0429 /* H5VL_NATIVE_GROUP_ITERATE_OLD */ 0430 H5VL_native_group_iterate_old_t iterate_old; 0431 0432 /* H5VL_NATIVE_GROUP_GET_OBJINFO */ 0433 H5VL_native_group_get_objinfo_t get_objinfo; 0434 } H5VL_native_group_optional_args_t; 0435 #endif /* H5_NO_DEPRECATED_SYMBOLS */ 0436 0437 /* Values for native VOL connector object optional VOL operations */ 0438 /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query 0439 * routine must be updated. 0440 */ 0441 #define H5VL_NATIVE_OBJECT_GET_COMMENT 0 /* H5G|H5Oget_comment, H5Oget_comment_by_name */ 0442 #define H5VL_NATIVE_OBJECT_SET_COMMENT 1 /* H5G|H5Oset_comment, H5Oset_comment_by_name */ 0443 #define H5VL_NATIVE_OBJECT_DISABLE_MDC_FLUSHES 2 /* H5Odisable_mdc_flushes */ 0444 #define H5VL_NATIVE_OBJECT_ENABLE_MDC_FLUSHES 3 /* H5Oenable_mdc_flushes */ 0445 #define H5VL_NATIVE_OBJECT_ARE_MDC_FLUSHES_DISABLED 4 /* H5Oare_mdc_flushes_disabled */ 0446 #define H5VL_NATIVE_OBJECT_GET_NATIVE_INFO 5 /* H5Oget_native_info(_by_idx, _by_name) */ 0447 /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro 0448 * must be updated. 0449 */ 0450 0451 /* Parameters for native connector's object 'get comment' operation */ 0452 typedef struct H5VL_native_object_get_comment_t { 0453 size_t buf_size; /* Size of comment buffer */ 0454 void *buf; /* Buffer for comment (OUT) */ 0455 size_t *comment_len; /* Actual size of comment (OUT) */ 0456 } H5VL_native_object_get_comment_t; 0457 0458 /* Parameters for object 'get native info' operation */ 0459 typedef struct H5VL_native_object_get_native_info_t { 0460 unsigned fields; /* Fields to retrieve */ 0461 H5O_native_info_t *ninfo; /* Native info (OUT) */ 0462 } H5VL_native_object_get_native_info_t; 0463 0464 /* Parameters for native connector's object 'optional' operations */ 0465 typedef union H5VL_native_object_optional_args_t { 0466 /* H5VL_NATIVE_OBJECT_GET_COMMENT */ 0467 H5VL_native_object_get_comment_t get_comment; 0468 0469 /* H5VL_NATIVE_OBJECT_SET_COMMENT */ 0470 struct { 0471 const char *comment; /* Comment string to set for the object (IN) */ 0472 } set_comment; 0473 0474 /* H5VL_NATIVE_OBJECT_DISABLE_MDC_FLUSHES */ 0475 /* No args */ 0476 0477 /* H5VL_NATIVE_OBJECT_ENABLE_MDC_FLUSHES */ 0478 /* No args */ 0479 0480 /* H5VL_NATIVE_OBJECT_ARE_MDC_FLUSHES_DISABLED */ 0481 struct { 0482 hbool_t *flag; /* Flag whether metadata cache flushes are disabled for this object (OUT) */ 0483 } are_mdc_flushes_disabled; 0484 0485 /* H5VL_NATIVE_OBJECT_GET_NATIVE_INFO */ 0486 H5VL_native_object_get_native_info_t get_native_info; 0487 } H5VL_native_object_optional_args_t; 0488 0489 /*******************/ 0490 /* Public Typedefs */ 0491 /*******************/ 0492 0493 /********************/ 0494 /* Public Variables */ 0495 /********************/ 0496 0497 /*********************/ 0498 /* Public Prototypes */ 0499 /*********************/ 0500 0501 /*******************/ 0502 /* Public Typedefs */ 0503 /*******************/ 0504 0505 /********************/ 0506 /* Public Variables */ 0507 /********************/ 0508 0509 /*********************/ 0510 /* Public Prototypes */ 0511 /*********************/ 0512 0513 #ifdef __cplusplus 0514 extern "C" { 0515 #endif 0516 0517 /* Token <--> address converters */ 0518 0519 /** 0520 * \ingroup H5VLNAT 0521 * 0522 * \brief Convert a haddr_t address to a native VOL connector token 0523 * 0524 * \fgdta_loc_obj_id{loc_id} 0525 * \param[in] addr Object address 0526 * \param[out] token Object token 0527 * 0528 * \return \herr_t 0529 * 0530 * \details This API call maps pre-VOL haddr_t native file format addresses 0531 * to the more generic H5O_token_t tokens used by the VOL. 0532 * 0533 * \since 1.12.0 0534 */ 0535 H5_DLL herr_t H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token); 0536 /** 0537 * \ingroup H5VLNAT 0538 * 0539 * \brief Convert a native VOL connector token to a haddr_t address 0540 * 0541 * \fgdta_loc_obj_id{loc_id} 0542 * \param[in] token Object token 0543 * \param[out] addr Object address 0544 * 0545 * \return \herr_t 0546 * 0547 * \details This API call maps generic H5O_token_t tokens used by the VOL to 0548 * pre-VOL haddr_t native file format addresses. 0549 * 0550 * \since 1.12.0 0551 */ 0552 H5_DLL herr_t H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr); 0553 0554 /** @private 0555 * 0556 * \brief Register the native VOL connector and retrieve an ID for it 0557 */ 0558 H5_DLL hid_t H5VL_native_register(void); 0559 0560 #ifdef __cplusplus 0561 } 0562 #endif 0563 0564 #endif /* H5VLnative_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |