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

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

#ifndef UDS_CONFIG_H
#define UDS_CONFIG_H

#include "geometry.h"
#include "indexer.h"
#include "io-factory.h"

/*
 * The uds_configuration records a variety of parameters used to configure a new UDS index. Some
 * parameters are provided by the client, while others are fixed or derived from user-supplied
 * values. It is created when an index is created, and it is recorded in the index metadata.
 */

enum {};

/* A set of configuration parameters for the indexer. */
struct uds_configuration {};

/* On-disk structure of data for a version 8.02 index. */
struct uds_configuration_8_02 {} __packed;

/* On-disk structure of data for a version 6.02 index. */
struct uds_configuration_6_02 {} __packed;

int __must_check uds_make_configuration(const struct uds_parameters *params,
					struct uds_configuration **config_ptr);

void uds_free_configuration(struct uds_configuration *config);

int __must_check uds_validate_config_contents(struct buffered_reader *reader,
					      struct uds_configuration *config);

int __must_check uds_write_config_contents(struct buffered_writer *writer,
					   struct uds_configuration *config, u32 version);

void uds_log_configuration(struct uds_configuration *config);

#endif /* UDS_CONFIG_H */