H5VLnative.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534
  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2. * Copyright by The HDF Group. *
  3. * All rights reserved. *
  4. * *
  5. * This file is part of HDF5. The full HDF5 copyright notice, including *
  6. * terms governing use, modification, and redistribution, is contained in *
  7. * the COPYING file, which can be found at the root of the source code *
  8. * distribution tree, or in https://www.hdfgroup.org/licenses. *
  9. * If you do not have access to either file, you may request a copy from *
  10. * help@hdfgroup.org. *
  11. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  12. /*
  13. * Purpose: The public header file for the native VOL connector.
  14. */
  15. #ifndef H5VLnative_H
  16. #define H5VLnative_H
  17. /* Public headers needed by this file */
  18. #include "H5Apublic.h" /* Attributes */
  19. #include "H5VLpublic.h" /* Virtual Object Layer */
  20. /*****************/
  21. /* Public Macros */
  22. /*****************/
  23. /* Identifier for the native VOL connector */
  24. #define H5VL_NATIVE (H5VL_native_register())
  25. /* Characteristics of the native VOL connector */
  26. #define H5VL_NATIVE_NAME "native"
  27. #define H5VL_NATIVE_VALUE H5_VOL_NATIVE /* enum value */
  28. #define H5VL_NATIVE_VERSION 0
  29. /* Values for VOL connector attribute optional VOL operations */
  30. /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query
  31. * routine must be updated.
  32. */
  33. #ifndef H5_NO_DEPRECATED_SYMBOLS
  34. #define H5VL_NATIVE_ATTR_ITERATE_OLD 0 /* H5Aiterate (deprecated routine) */
  35. #endif /* H5_NO_DEPRECATED_SYMBOLS */
  36. /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro
  37. * must be updated.
  38. */
  39. #ifndef H5_NO_DEPRECATED_SYMBOLS
  40. /* Parameters for attribute 'iterate old' operation */
  41. typedef struct H5VL_native_attr_iterate_old_t {
  42. hid_t loc_id;
  43. unsigned * attr_num;
  44. H5A_operator1_t op;
  45. void * op_data;
  46. } H5VL_native_attr_iterate_old_t;
  47. /* Parameters for native connector's attribute 'optional' operations */
  48. typedef union H5VL_native_attr_optional_args_t {
  49. /* H5VL_NATIVE_ATTR_ITERATE_OLD */
  50. H5VL_native_attr_iterate_old_t iterate_old;
  51. } H5VL_native_attr_optional_args_t;
  52. #endif /* H5_NO_DEPRECATED_SYMBOLS */
  53. /* Values for native VOL connector dataset optional VOL operations */
  54. /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query
  55. * routine must be updated.
  56. */
  57. #define H5VL_NATIVE_DATASET_FORMAT_CONVERT 0 /* H5Dformat_convert (internal) */
  58. #define H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE 1 /* H5Dget_chunk_index_type */
  59. #define H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE 2 /* H5Dget_chunk_storage_size */
  60. #define H5VL_NATIVE_DATASET_GET_NUM_CHUNKS 3 /* H5Dget_num_chunks */
  61. #define H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_IDX 4 /* H5Dget_chunk_info */
  62. #define H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD 5 /* H5Dget_chunk_info_by_coord */
  63. #define H5VL_NATIVE_DATASET_CHUNK_READ 6 /* H5Dchunk_read */
  64. #define H5VL_NATIVE_DATASET_CHUNK_WRITE 7 /* H5Dchunk_write */
  65. #define H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE 8 /* H5Dvlen_get_buf_size */
  66. #define H5VL_NATIVE_DATASET_GET_OFFSET 9 /* H5Dget_offset */
  67. #define H5VL_NATIVE_DATASET_CHUNK_ITER 10 /* H5Dget_offset */
  68. /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro
  69. * must be updated.
  70. */
  71. /* Parameters for native connector's dataset 'chunk read' operation */
  72. typedef struct H5VL_native_dataset_chunk_read_t {
  73. const hsize_t *offset;
  74. uint32_t filters;
  75. void * buf;
  76. } H5VL_native_dataset_chunk_read_t;
  77. /* Parameters for native connector's dataset 'chunk write' operation */
  78. typedef struct H5VL_native_dataset_chunk_write_t {
  79. const hsize_t *offset;
  80. uint32_t filters;
  81. uint32_t size;
  82. const void * buf;
  83. } H5VL_native_dataset_chunk_write_t;
  84. /* Parameters for native connector's dataset 'get vlen buf size' operation */
  85. typedef struct H5VL_native_dataset_get_vlen_buf_size_t {
  86. hid_t type_id;
  87. hid_t space_id;
  88. hsize_t *size; /* Size of variable-length data buffer (OUT) */
  89. } H5VL_native_dataset_get_vlen_buf_size_t;
  90. /* Parameters for native connector's dataset 'get chunk storage size' operation */
  91. typedef struct H5VL_native_dataset_get_chunk_storage_size_t {
  92. const hsize_t *offset; /* Offset of chunk */
  93. hsize_t * size; /* Size of chunk (OUT) */
  94. } H5VL_native_dataset_get_chunk_storage_size_t;
  95. /* Parameters for native connector's dataset 'get num chunks' operation */
  96. typedef struct H5VL_native_dataset_get_num_chunks_t {
  97. hid_t space_id; /* Space selection */
  98. hsize_t *nchunks; /* # of chunk for space selection (OUT) */
  99. } H5VL_native_dataset_get_num_chunks_t;
  100. /* Parameters for native connector's dataset 'get chunk info by idx' operation */
  101. typedef struct H5VL_native_dataset_get_chunk_info_by_idx_t {
  102. hid_t space_id; /* Space selection */
  103. hsize_t chk_index; /* Chunk index within space */
  104. hsize_t * offset; /* Chunk coordinates (OUT) */
  105. unsigned *filter_mask; /* Filter mask for chunk (OUT) */
  106. haddr_t * addr; /* Address of chunk in file (OUT) */
  107. hsize_t * size; /* Size of chunk in file (OUT) */
  108. } H5VL_native_dataset_get_chunk_info_by_idx_t;
  109. /* Parameters for native connector's dataset 'get chunk info by coord' operation */
  110. typedef struct H5VL_native_dataset_get_chunk_info_by_coord_t {
  111. const hsize_t *offset; /* Chunk coordinates */
  112. unsigned * filter_mask; /* Filter mask for chunk (OUT) */
  113. haddr_t * addr; /* Address of chunk in file (OUT) */
  114. hsize_t * size; /* Size of chunk in file (OUT) */
  115. } H5VL_native_dataset_get_chunk_info_by_coord_t;
  116. /* Parameters for native connector's dataset 'optional' operations */
  117. typedef union H5VL_native_dataset_optional_args_t {
  118. /* H5VL_NATIVE_DATASET_FORMAT_CONVERT */
  119. /* No args */
  120. /* H5VL_NATIVE_DATASET_GET_CHUNK_INDEX_TYPE */
  121. struct {
  122. H5D_chunk_index_t *idx_type; /* Type of chunk index (OUT) */
  123. } get_chunk_idx_type;
  124. /* H5VL_NATIVE_DATASET_GET_CHUNK_STORAGE_SIZE */
  125. H5VL_native_dataset_get_chunk_storage_size_t get_chunk_storage_size;
  126. /* H5VL_NATIVE_DATASET_GET_NUM_CHUNKS */
  127. H5VL_native_dataset_get_num_chunks_t get_num_chunks;
  128. /* H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_IDX */
  129. H5VL_native_dataset_get_chunk_info_by_idx_t get_chunk_info_by_idx;
  130. /* H5VL_NATIVE_DATASET_GET_CHUNK_INFO_BY_COORD */
  131. H5VL_native_dataset_get_chunk_info_by_coord_t get_chunk_info_by_coord;
  132. /* H5VL_NATIVE_DATASET_CHUNK_READ */
  133. H5VL_native_dataset_chunk_read_t chunk_read;
  134. /* H5VL_NATIVE_DATASET_CHUNK_WRITE */
  135. H5VL_native_dataset_chunk_write_t chunk_write;
  136. /* H5VL_NATIVE_DATASET_GET_VLEN_BUF_SIZE */
  137. H5VL_native_dataset_get_vlen_buf_size_t get_vlen_buf_size;
  138. /* H5VL_NATIVE_DATASET_GET_OFFSET */
  139. struct {
  140. haddr_t *offset; /* Contiguous dataset's offset in the file (OUT) */
  141. } get_offset;
  142. /* H5VL_NATIVE_DATASET_CHUNK_ITER */
  143. struct {
  144. H5D_chunk_iter_op_t op; /* Chunk iteration callback */
  145. void * op_data; /* Context to pass to iteration callback */
  146. } chunk_iter;
  147. } H5VL_native_dataset_optional_args_t;
  148. /* Values for native VOL connector file optional VOL operations */
  149. /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query
  150. * routine must be updated.
  151. */
  152. #define H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE 0 /* H5Fclear_elink_file_cache */
  153. #define H5VL_NATIVE_FILE_GET_FILE_IMAGE 1 /* H5Fget_file_image */
  154. #define H5VL_NATIVE_FILE_GET_FREE_SECTIONS 2 /* H5Fget_free_sections */
  155. #define H5VL_NATIVE_FILE_GET_FREE_SPACE 3 /* H5Fget_freespace */
  156. #define H5VL_NATIVE_FILE_GET_INFO 4 /* H5Fget_info1/2 */
  157. #define H5VL_NATIVE_FILE_GET_MDC_CONF 5 /* H5Fget_mdc_config */
  158. #define H5VL_NATIVE_FILE_GET_MDC_HR 6 /* H5Fget_mdc_hit_rate */
  159. #define H5VL_NATIVE_FILE_GET_MDC_SIZE 7 /* H5Fget_mdc_size */
  160. #define H5VL_NATIVE_FILE_GET_SIZE 8 /* H5Fget_filesize */
  161. #define H5VL_NATIVE_FILE_GET_VFD_HANDLE 9 /* H5Fget_vfd_handle */
  162. #define H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE 10 /* H5Freset_mdc_hit_rate_stats */
  163. #define H5VL_NATIVE_FILE_SET_MDC_CONFIG 11 /* H5Fset_mdc_config */
  164. #define H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO 12 /* H5Fget_metadata_read_retry_info */
  165. #define H5VL_NATIVE_FILE_START_SWMR_WRITE 13 /* H5Fstart_swmr_write */
  166. #define H5VL_NATIVE_FILE_START_MDC_LOGGING 14 /* H5Fstart_mdc_logging */
  167. #define H5VL_NATIVE_FILE_STOP_MDC_LOGGING 15 /* H5Fstop_mdc_logging */
  168. #define H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS 16 /* H5Fget_mdc_logging_status */
  169. #define H5VL_NATIVE_FILE_FORMAT_CONVERT 17 /* H5Fformat_convert */
  170. #define H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS 18 /* H5Freset_page_buffering_stats */
  171. #define H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS 19 /* H5Fget_page_buffering_stats */
  172. #define H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO 20 /* H5Fget_mdc_image_info */
  173. #define H5VL_NATIVE_FILE_GET_EOA 21 /* H5Fget_eoa */
  174. #define H5VL_NATIVE_FILE_INCR_FILESIZE 22 /* H5Fincrement_filesize */
  175. #define H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS 23 /* H5Fset_latest_format/libver_bounds */
  176. #define H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG 24 /* H5Fget_dset_no_attrs_hint */
  177. #define H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG 25 /* H5Fset_dset_no_attrs_hint */
  178. #ifdef H5_HAVE_PARALLEL
  179. #define H5VL_NATIVE_FILE_GET_MPI_ATOMICITY 26 /* H5Fget_mpi_atomicity */
  180. #define H5VL_NATIVE_FILE_SET_MPI_ATOMICITY 27 /* H5Fset_mpi_atomicity */
  181. #endif /* H5_HAVE_PARALLEL */
  182. #define H5VL_NATIVE_FILE_POST_OPEN 28 /* Adjust file after open, with wrapping context */
  183. /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro
  184. * must be updated.
  185. */
  186. /* Parameters for native connector's file 'get file image' operation */
  187. typedef struct H5VL_native_file_get_file_image_t {
  188. size_t buf_size; /* Size of file image buffer */
  189. void * buf; /* Buffer for file image (OUT) */
  190. size_t *image_len; /* Size of file image (OUT) */
  191. } H5VL_native_file_get_file_image_t;
  192. /* Parameters for native connector's file 'get free sections' operation */
  193. typedef struct H5VL_native_file_get_free_sections_t {
  194. H5F_mem_t type; /* Type of file memory to query */
  195. H5F_sect_info_t *sect_info; /* Array of sections (OUT) */
  196. size_t nsects; /* Size of section array */
  197. size_t * sect_count; /* Actual # of sections of type (OUT) */
  198. } H5VL_native_file_get_free_sections_t;
  199. /* Parameters for native connector's file 'get freespace' operation */
  200. typedef struct H5VL_native_file_get_freespace_t {
  201. hsize_t *size; /* Size of free space (OUT) */
  202. } H5VL_native_file_get_freespace_t;
  203. /* Parameters for native connector's file 'get info' operation */
  204. typedef struct H5VL_native_file_get_info_t {
  205. H5I_type_t type; /* Type of object */
  206. H5F_info2_t *finfo; /* Pointer to file info (OUT) */
  207. } H5VL_native_file_get_info_t;
  208. /* Parameters for native connector's file 'get metadata cache size' operation */
  209. typedef struct H5VL_native_file_get_mdc_size_t {
  210. size_t * max_size; /* Maximum amount of cached data (OUT) */
  211. size_t * min_clean_size; /* Minimum amount of cached data to keep clean (OUT) */
  212. size_t * cur_size; /* Current amount of cached data (OUT) */
  213. uint32_t *cur_num_entries; /* Current # of cached entries (OUT) */
  214. } H5VL_native_file_get_mdc_size_t;
  215. /* Parameters for native connector's file 'get VFD handle' operation */
  216. typedef struct H5VL_native_file_get_vfd_handle_t {
  217. hid_t fapl_id;
  218. void **file_handle; /* File handle from VFD (OUT) */
  219. } H5VL_native_file_get_vfd_handle_t;
  220. /* Parameters for native connector's file 'get MDC logging status' operation */
  221. typedef struct H5VL_native_file_get_mdc_logging_status_t {
  222. hbool_t *is_enabled; /* Whether logging is enabled (OUT) */
  223. hbool_t *is_currently_logging; /* Whether currently logging (OUT) */
  224. } H5VL_native_file_get_mdc_logging_status_t;
  225. /* Parameters for native connector's file 'get page buffering stats' operation */
  226. typedef struct H5VL_native_file_get_page_buffering_stats_t {
  227. unsigned *accesses; /* Metadata/raw data page access counts (OUT) */
  228. unsigned *hits; /* Metadata/raw data page hit counts (OUT) */
  229. unsigned *misses; /* Metadata/raw data page miss counts (OUT) */
  230. unsigned *evictions; /* Metadata/raw data page eviction counts (OUT) */
  231. unsigned *bypasses; /* Metadata/raw data page bypass counts (OUT) */
  232. } H5VL_native_file_get_page_buffering_stats_t;
  233. /* Parameters for native connector's file 'get MDC image info' operation */
  234. typedef struct H5VL_native_file_get_mdc_image_info_t {
  235. haddr_t *addr; /* Address of image (OUT) */
  236. hsize_t *len; /* Length of image (OUT) */
  237. } H5VL_native_file_get_mdc_image_info_t;
  238. /* Parameters for native connector's file 'set libver bounds' operation */
  239. typedef struct H5VL_native_file_set_libver_bounds_t {
  240. H5F_libver_t low; /* Lowest version possible */
  241. H5F_libver_t high; /* Highest version possible */
  242. } H5VL_native_file_set_libver_bounds_t;
  243. /* Parameters for native connector's file 'optional' operations */
  244. typedef union H5VL_native_file_optional_args_t {
  245. /* H5VL_NATIVE_FILE_CLEAR_ELINK_CACHE */
  246. /* No args */
  247. /* H5VL_NATIVE_FILE_GET_FILE_IMAGE */
  248. H5VL_native_file_get_file_image_t get_file_image;
  249. /* H5VL_NATIVE_FILE_GET_FREE_SECTIONS */
  250. H5VL_native_file_get_free_sections_t get_free_sections;
  251. /* H5VL_NATIVE_FILE_GET_FREE_SPACE */
  252. H5VL_native_file_get_freespace_t get_freespace;
  253. /* H5VL_NATIVE_FILE_GET_INFO */
  254. H5VL_native_file_get_info_t get_info;
  255. /* H5VL_NATIVE_FILE_GET_MDC_CONF */
  256. struct {
  257. H5AC_cache_config_t *config; /* Pointer to MDC config (OUT) */
  258. } get_mdc_config;
  259. /* H5VL_NATIVE_FILE_GET_MDC_HR */
  260. struct {
  261. double *hit_rate; /* Metadata cache hit rate (OUT) */
  262. } get_mdc_hit_rate;
  263. /* H5VL_NATIVE_FILE_GET_MDC_SIZE */
  264. H5VL_native_file_get_mdc_size_t get_mdc_size;
  265. /* H5VL_NATIVE_FILE_GET_SIZE */
  266. struct {
  267. hsize_t *size; /* Size of file (OUT) */
  268. } get_size;
  269. /* H5VL_NATIVE_FILE_GET_VFD_HANDLE */
  270. H5VL_native_file_get_vfd_handle_t get_vfd_handle;
  271. /* H5VL_NATIVE_FILE_RESET_MDC_HIT_RATE */
  272. /* No args */
  273. /* H5VL_NATIVE_FILE_SET_MDC_CONFIG */
  274. struct {
  275. const H5AC_cache_config_t *config; /* Pointer to new MDC config */
  276. } set_mdc_config;
  277. /* H5VL_NATIVE_FILE_GET_METADATA_READ_RETRY_INFO */
  278. struct {
  279. H5F_retry_info_t *info; /* Pointer to metadata read retry info (OUT) */
  280. } get_metadata_read_retry_info;
  281. /* H5VL_NATIVE_FILE_START_SWMR_WRITE */
  282. /* No args */
  283. /* H5VL_NATIVE_FILE_START_MDC_LOGGING */
  284. /* No args */
  285. /* H5VL_NATIVE_FILE_STOP_MDC_LOGGING */
  286. /* No args */
  287. /* H5VL_NATIVE_FILE_GET_MDC_LOGGING_STATUS */
  288. H5VL_native_file_get_mdc_logging_status_t get_mdc_logging_status;
  289. /* H5VL_NATIVE_FILE_FORMAT_CONVERT */
  290. /* No args */
  291. /* H5VL_NATIVE_FILE_RESET_PAGE_BUFFERING_STATS */
  292. /* No args */
  293. /* H5VL_NATIVE_FILE_GET_PAGE_BUFFERING_STATS */
  294. H5VL_native_file_get_page_buffering_stats_t get_page_buffering_stats;
  295. /* H5VL_NATIVE_FILE_GET_MDC_IMAGE_INFO */
  296. H5VL_native_file_get_mdc_image_info_t get_mdc_image_info;
  297. /* H5VL_NATIVE_FILE_GET_EOA */
  298. struct {
  299. haddr_t *eoa; /* End of allocated file address space (OUT) */
  300. } get_eoa;
  301. /* H5VL_NATIVE_FILE_INCR_FILESIZE */
  302. struct {
  303. hsize_t increment; /* Amount to increment file size */
  304. } increment_filesize;
  305. /* H5VL_NATIVE_FILE_SET_LIBVER_BOUNDS */
  306. H5VL_native_file_set_libver_bounds_t set_libver_bounds;
  307. /* H5VL_NATIVE_FILE_GET_MIN_DSET_OHDR_FLAG */
  308. struct {
  309. hbool_t *minimize; /* Flag whether dataset object headers are minimal (OUT) */
  310. } get_min_dset_ohdr_flag;
  311. /* H5VL_NATIVE_FILE_SET_MIN_DSET_OHDR_FLAG */
  312. struct {
  313. hbool_t minimize; /* Flag whether dataset object headers should be minimal */
  314. } set_min_dset_ohdr_flag;
  315. #ifdef H5_HAVE_PARALLEL
  316. /* H5VL_NATIVE_FILE_GET_MPI_ATOMICITY */
  317. struct {
  318. hbool_t *flag; /* Flag whether MPI atomicity is set for files (OUT) */
  319. } get_mpi_atomicity;
  320. /* H5VL_NATIVE_FILE_SET_MPI_ATOMICITY */
  321. struct {
  322. hbool_t flag; /* Flag whether to set MPI atomicity for files */
  323. } set_mpi_atomicity;
  324. #endif /* H5_HAVE_PARALLEL */
  325. /* H5VL_NATIVE_FILE_POST_OPEN */
  326. /* No args */
  327. } H5VL_native_file_optional_args_t;
  328. /* Values for native VOL connector group optional VOL operations */
  329. /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query
  330. * routine must be updated.
  331. */
  332. #ifndef H5_NO_DEPRECATED_SYMBOLS
  333. #define H5VL_NATIVE_GROUP_ITERATE_OLD 0 /* HG5Giterate (deprecated routine) */
  334. #define H5VL_NATIVE_GROUP_GET_OBJINFO 1 /* HG5Gget_objinfo (deprecated routine) */
  335. #endif /* H5_NO_DEPRECATED_SYMBOLS */
  336. /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro
  337. * must be updated.
  338. */
  339. #ifndef H5_NO_DEPRECATED_SYMBOLS
  340. /* Parameters for group 'iterate old' operation */
  341. typedef struct H5VL_native_group_iterate_old_t {
  342. H5VL_loc_params_t loc_params; /* Location parameters for iteration */
  343. hsize_t idx; /* Index of link to begin iteration at */
  344. hsize_t * last_obj; /* Index of last link looked at (OUT) */
  345. H5G_iterate_t op; /* Group (link) operator callback */
  346. void * op_data; /* Context to pass to iterator callback */
  347. } H5VL_native_group_iterate_old_t;
  348. /* Parameters for group 'get objinfo' operation */
  349. typedef struct H5VL_native_group_get_objinfo_t {
  350. H5VL_loc_params_t loc_params; /* Location parameters for iteration */
  351. hbool_t follow_link; /* Whether to follow links for query */
  352. H5G_stat_t * statbuf; /* Pointer to object info struct (OUT) */
  353. } H5VL_native_group_get_objinfo_t;
  354. /* Parameters for native connector's group 'optional' operations */
  355. typedef union H5VL_native_group_optional_args_t {
  356. /* H5VL_NATIVE_GROUP_ITERATE_OLD */
  357. H5VL_native_group_iterate_old_t iterate_old;
  358. /* H5VL_NATIVE_GROUP_GET_OBJINFO */
  359. H5VL_native_group_get_objinfo_t get_objinfo;
  360. } H5VL_native_group_optional_args_t;
  361. #endif /* H5_NO_DEPRECATED_SYMBOLS */
  362. /* Values for native VOL connector object optional VOL operations */
  363. /* NOTE: If new values are added here, the H5VL__native_introspect_opt_query
  364. * routine must be updated.
  365. */
  366. #define H5VL_NATIVE_OBJECT_GET_COMMENT 0 /* H5G|H5Oget_comment, H5Oget_comment_by_name */
  367. #define H5VL_NATIVE_OBJECT_SET_COMMENT 1 /* H5G|H5Oset_comment, H5Oset_comment_by_name */
  368. #define H5VL_NATIVE_OBJECT_DISABLE_MDC_FLUSHES 2 /* H5Odisable_mdc_flushes */
  369. #define H5VL_NATIVE_OBJECT_ENABLE_MDC_FLUSHES 3 /* H5Oenable_mdc_flushes */
  370. #define H5VL_NATIVE_OBJECT_ARE_MDC_FLUSHES_DISABLED 4 /* H5Oare_mdc_flushes_disabled */
  371. #define H5VL_NATIVE_OBJECT_GET_NATIVE_INFO 5 /* H5Oget_native_info(_by_idx, _by_name) */
  372. /* NOTE: If values over 1023 are added, the H5VL_RESERVED_NATIVE_OPTIONAL macro
  373. * must be updated.
  374. */
  375. /* Parameters for native connector's object 'get comment' operation */
  376. typedef struct H5VL_native_object_get_comment_t {
  377. size_t buf_size; /* Size of comment buffer */
  378. void * buf; /* Buffer for comment (OUT) */
  379. size_t *comment_len; /* Actual size of comment (OUT) */
  380. } H5VL_native_object_get_comment_t;
  381. /* Parameters for object 'get native info' operation */
  382. typedef struct H5VL_native_object_get_native_info_t {
  383. unsigned fields; /* Fields to retrieve */
  384. H5O_native_info_t *ninfo; /* Native info (OUT) */
  385. } H5VL_native_object_get_native_info_t;
  386. /* Parameters for native connector's object 'optional' operations */
  387. typedef union H5VL_native_object_optional_args_t {
  388. /* H5VL_NATIVE_OBJECT_GET_COMMENT */
  389. H5VL_native_object_get_comment_t get_comment;
  390. /* H5VL_NATIVE_OBJECT_SET_COMMENT */
  391. struct {
  392. const char *comment; /* Comment string to set for the object (IN) */
  393. } set_comment;
  394. /* H5VL_NATIVE_OBJECT_DISABLE_MDC_FLUSHES */
  395. /* No args */
  396. /* H5VL_NATIVE_OBJECT_ENABLE_MDC_FLUSHES */
  397. /* No args */
  398. /* H5VL_NATIVE_OBJECT_ARE_MDC_FLUSHES_DISABLED */
  399. struct {
  400. hbool_t *flag; /* Flag whether metadata cache flushes are disabled for this object (OUT) */
  401. } are_mdc_flushes_disabled;
  402. /* H5VL_NATIVE_OBJECT_GET_NATIVE_INFO */
  403. H5VL_native_object_get_native_info_t get_native_info;
  404. } H5VL_native_object_optional_args_t;
  405. /*******************/
  406. /* Public Typedefs */
  407. /*******************/
  408. /********************/
  409. /* Public Variables */
  410. /********************/
  411. /*********************/
  412. /* Public Prototypes */
  413. /*********************/
  414. /*******************/
  415. /* Public Typedefs */
  416. /*******************/
  417. /********************/
  418. /* Public Variables */
  419. /********************/
  420. /*********************/
  421. /* Public Prototypes */
  422. /*********************/
  423. #ifdef __cplusplus
  424. extern "C" {
  425. #endif
  426. /* Token <--> address converters */
  427. /**
  428. * \ingroup H5VLNAT
  429. */
  430. H5_DLL herr_t H5VLnative_addr_to_token(hid_t loc_id, haddr_t addr, H5O_token_t *token);
  431. /**
  432. * \ingroup H5VLNAT
  433. */
  434. H5_DLL herr_t H5VLnative_token_to_addr(hid_t loc_id, H5O_token_t token, haddr_t *addr);
  435. /* Not really public but must be included here */
  436. H5_DLL hid_t H5VL_native_register(void);
  437. #ifdef __cplusplus
  438. }
  439. #endif
  440. #endif /* H5VLnative_H */