linux/drivers/md/dm-vdo/indexer/config.c

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

#include "config.h"

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

static const u8 INDEX_CONFIG_MAGIC[] =;
static const u8 INDEX_CONFIG_VERSION_6_02[] =;
static const u8 INDEX_CONFIG_VERSION_8_02[] =;

#define DEFAULT_VOLUME_READ_THREADS
#define MAX_VOLUME_READ_THREADS
#define INDEX_CONFIG_MAGIC_LENGTH
#define INDEX_CONFIG_VERSION_LENGTH

static bool is_version(const u8 *version, u8 *buffer)
{}

static bool are_matching_configurations(struct uds_configuration *saved_config,
					struct index_geometry *saved_geometry,
					struct uds_configuration *user)
{}

/* Read the configuration and validate it against the provided one. */
int uds_validate_config_contents(struct buffered_reader *reader,
				 struct uds_configuration *user_config)
{}

/*
 * Write the configuration to stable storage. If the superblock version is < 4, write the 6.02
 * version; otherwise write the 8.02 version, indicating the configuration is for an index that has
 * been reduced by one chapter.
 */
int uds_write_config_contents(struct buffered_writer *writer,
			      struct uds_configuration *config, u32 version)
{}

/* Compute configuration parameters that depend on memory size. */
static int compute_memory_sizes(uds_memory_config_size_t mem_gb, bool sparse,
				u32 *chapters_per_volume, u32 *record_pages_per_chapter,
				u32 *sparse_chapters_per_volume)
{}

static unsigned int __must_check normalize_zone_count(unsigned int requested)
{}

static unsigned int __must_check normalize_read_threads(unsigned int requested)
{}

int uds_make_configuration(const struct uds_parameters *params,
			   struct uds_configuration **config_ptr)
{}

void uds_free_configuration(struct uds_configuration *config)
{}

void uds_log_configuration(struct uds_configuration *config)
{}