linux/drivers/md/dm-vdo/indexer/index-page-map.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright 2023 Red Hat
 */

#include "index-page-map.h"

#include "errors.h"
#include "logger.h"
#include "memory-alloc.h"
#include "numeric.h"
#include "permassert.h"
#include "string-utils.h"
#include "thread-utils.h"

#include "hash-utils.h"
#include "indexer.h"

/*
 * The index page map is conceptually a two-dimensional array indexed by chapter number and index
 * page number within the chapter. Each entry contains the number of the last delta list on that
 * index page. In order to save memory, the information for the last page in each chapter is not
 * recorded, as it is known from the geometry.
 */

static const u8 PAGE_MAP_MAGIC[] =;

#define PAGE_MAP_MAGIC_LENGTH

static inline u32 get_entry_count(const struct index_geometry *geometry)
{}

int uds_make_index_page_map(const struct index_geometry *geometry,
			    struct index_page_map **map_ptr)
{}

void uds_free_index_page_map(struct index_page_map *map)
{}

void uds_update_index_page_map(struct index_page_map *map, u64 virtual_chapter_number,
			       u32 chapter_number, u32 index_page_number,
			       u32 delta_list_number)
{}

u32 uds_find_index_page_number(const struct index_page_map *map,
			       const struct uds_record_name *name, u32 chapter_number)
{}

void uds_get_list_number_bounds(const struct index_page_map *map, u32 chapter_number,
				u32 index_page_number, u32 *lowest_list,
				u32 *highest_list)
{}

u64 uds_compute_index_page_map_save_size(const struct index_geometry *geometry)
{}

int uds_write_index_page_map(struct index_page_map *map, struct buffered_writer *writer)
{}

int uds_read_index_page_map(struct index_page_map *map, struct buffered_reader *reader)
{}