Obtains information about a cache image if it exists
Procedure:
H5F_GET_MDC_IMAGE_INFO(file_id, image_addr, image_len)
Signature:
herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_len)
Parameters:
hid_t file_id | IN: Identifier of the target file |
haddr_t *image_addr | OUT: Offset of the cache image if it exists, or HADDR_UNDEF if it does not |
hsize_t *image_len | OUT: Length of the cache image if it exists, or 0 if it does not |
Description:
H5F_GET_MDC_IMAGE_INFO returns information about a cache image if it exists.
When an HDF5 file is opened in Read/Write mode, any metadata cache image will be read and deleted from the file on the first metadata cache access (or, if persistent free space managers are enabled, on the first file space allocation / deallocation, or read of free space manager status, whichever comes first).
Thus, if the file is opened Read/Write, H5F_GET_MDC_IMAGE_INFO should be called immediately after file open and before any other operation. If H5F_GET_MDC_IMAGE_INFO is called after the cache image is loaded, it will correctly report that no cache image exists, as the image will have already been read and deleted from the file. In the Read Only case, the function may be called at any time, as any cache image will not be deleted from the file.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.10.1 | C function introduced with this release. |
--- Last Modified: December 20, 2018 | 12:22 PM