#ifndef UDS_INDEX_GEOMETRY_H
#define UDS_INDEX_GEOMETRY_H
#include "indexer.h"
struct index_geometry { … };
enum { … };
int __must_check uds_make_index_geometry(size_t bytes_per_page, u32 record_pages_per_chapter,
u32 chapters_per_volume,
u32 sparse_chapters_per_volume, u64 remapped_virtual,
u64 remapped_physical,
struct index_geometry **geometry_ptr);
int __must_check uds_copy_index_geometry(struct index_geometry *source,
struct index_geometry **geometry_ptr);
void uds_free_index_geometry(struct index_geometry *geometry);
u32 __must_check uds_map_to_physical_chapter(const struct index_geometry *geometry,
u64 virtual_chapter);
static inline bool __must_check
uds_is_reduced_index_geometry(const struct index_geometry *geometry)
{ … }
static inline bool __must_check
uds_is_sparse_index_geometry(const struct index_geometry *geometry)
{ … }
bool __must_check uds_has_sparse_chapters(const struct index_geometry *geometry,
u64 oldest_virtual_chapter,
u64 newest_virtual_chapter);
bool __must_check uds_is_chapter_sparse(const struct index_geometry *geometry,
u64 oldest_virtual_chapter,
u64 newest_virtual_chapter,
u64 virtual_chapter_number);
u32 __must_check uds_chapters_to_expire(const struct index_geometry *geometry,
u64 newest_chapter);
#endif