mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
dm vdo: rename struct configuration to uds_configuration
Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Ken Raeburn <raeburn@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
This commit is contained in:
parent
7f67d0f1c8
commit
952b57a58d
|
|
@ -27,9 +27,9 @@ static bool is_version(const u8 *version, u8 *buffer)
|
|||
return memcmp(version, buffer, INDEX_CONFIG_VERSION_LENGTH) == 0;
|
||||
}
|
||||
|
||||
static bool are_matching_configurations(struct configuration *saved_config,
|
||||
static bool are_matching_configurations(struct uds_configuration *saved_config,
|
||||
struct index_geometry *saved_geometry,
|
||||
struct configuration *user)
|
||||
struct uds_configuration *user)
|
||||
{
|
||||
struct index_geometry *geometry = user->geometry;
|
||||
bool result = true;
|
||||
|
|
@ -93,10 +93,10 @@ static bool are_matching_configurations(struct configuration *saved_config,
|
|||
|
||||
/* Read the configuration and validate it against the provided one. */
|
||||
int uds_validate_config_contents(struct buffered_reader *reader,
|
||||
struct configuration *user_config)
|
||||
struct uds_configuration *user_config)
|
||||
{
|
||||
int result;
|
||||
struct configuration config;
|
||||
struct uds_configuration config;
|
||||
struct index_geometry geometry;
|
||||
u8 version_buffer[INDEX_CONFIG_VERSION_LENGTH];
|
||||
u32 bytes_per_page;
|
||||
|
|
@ -174,7 +174,7 @@ int uds_validate_config_contents(struct buffered_reader *reader,
|
|||
* been reduced by one chapter.
|
||||
*/
|
||||
int uds_write_config_contents(struct buffered_writer *writer,
|
||||
struct configuration *config, u32 version)
|
||||
struct uds_configuration *config, u32 version)
|
||||
{
|
||||
int result;
|
||||
struct index_geometry *geometry = config->geometry;
|
||||
|
|
@ -313,9 +313,9 @@ static unsigned int __must_check normalize_read_threads(unsigned int requested)
|
|||
}
|
||||
|
||||
int uds_make_configuration(const struct uds_parameters *params,
|
||||
struct configuration **config_ptr)
|
||||
struct uds_configuration **config_ptr)
|
||||
{
|
||||
struct configuration *config;
|
||||
struct uds_configuration *config;
|
||||
u32 chapters_per_volume = 0;
|
||||
u32 record_pages_per_chapter = 0;
|
||||
u32 sparse_chapters_per_volume = 0;
|
||||
|
|
@ -327,7 +327,7 @@ int uds_make_configuration(const struct uds_parameters *params,
|
|||
if (result != UDS_SUCCESS)
|
||||
return result;
|
||||
|
||||
result = uds_allocate(1, struct configuration, __func__, &config);
|
||||
result = uds_allocate(1, struct uds_configuration, __func__, &config);
|
||||
if (result != UDS_SUCCESS)
|
||||
return result;
|
||||
|
||||
|
|
@ -354,7 +354,7 @@ int uds_make_configuration(const struct uds_parameters *params,
|
|||
return UDS_SUCCESS;
|
||||
}
|
||||
|
||||
void uds_free_configuration(struct configuration *config)
|
||||
void uds_free_configuration(struct uds_configuration *config)
|
||||
{
|
||||
if (config != NULL) {
|
||||
uds_free_index_geometry(config->geometry);
|
||||
|
|
@ -362,7 +362,7 @@ void uds_free_configuration(struct configuration *config)
|
|||
}
|
||||
}
|
||||
|
||||
void uds_log_configuration(struct configuration *config)
|
||||
void uds_log_configuration(struct uds_configuration *config)
|
||||
{
|
||||
struct index_geometry *geometry = config->geometry;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "uds.h"
|
||||
|
||||
/*
|
||||
* The configuration records a variety of parameters used to configure a new UDS index. Some
|
||||
* 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.
|
||||
*/
|
||||
|
|
@ -24,7 +24,7 @@ enum {
|
|||
};
|
||||
|
||||
/* A set of configuration parameters for the indexer. */
|
||||
struct configuration {
|
||||
struct uds_configuration {
|
||||
/* Storage device for the index */
|
||||
struct block_device *bdev;
|
||||
|
||||
|
|
@ -109,16 +109,16 @@ struct uds_configuration_6_02 {
|
|||
} __packed;
|
||||
|
||||
int __must_check uds_make_configuration(const struct uds_parameters *params,
|
||||
struct configuration **config_ptr);
|
||||
struct uds_configuration **config_ptr);
|
||||
|
||||
void uds_free_configuration(struct configuration *config);
|
||||
void uds_free_configuration(struct uds_configuration *config);
|
||||
|
||||
int __must_check uds_validate_config_contents(struct buffered_reader *reader,
|
||||
struct configuration *config);
|
||||
struct uds_configuration *config);
|
||||
|
||||
int __must_check uds_write_config_contents(struct buffered_writer *writer,
|
||||
struct configuration *config, u32 version);
|
||||
struct uds_configuration *config, u32 version);
|
||||
|
||||
void uds_log_configuration(struct configuration *config);
|
||||
void uds_log_configuration(struct uds_configuration *config);
|
||||
|
||||
#endif /* UDS_CONFIG_H */
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ static inline bool is_converted_super_block(struct super_block_data *super)
|
|||
return super->version == 7;
|
||||
}
|
||||
|
||||
static int __must_check compute_sizes(const struct configuration *config,
|
||||
static int __must_check compute_sizes(const struct uds_configuration *config,
|
||||
struct save_layout_sizes *sls)
|
||||
{
|
||||
int result;
|
||||
|
|
@ -256,7 +256,7 @@ static int __must_check compute_sizes(const struct configuration *config,
|
|||
int uds_compute_index_size(const struct uds_parameters *parameters, u64 *index_size)
|
||||
{
|
||||
int result;
|
||||
struct configuration *index_config;
|
||||
struct uds_configuration *index_config;
|
||||
struct save_layout_sizes sizes;
|
||||
|
||||
if (index_size == NULL) {
|
||||
|
|
@ -752,7 +752,7 @@ static int __must_check write_layout_header(struct index_layout *layout,
|
|||
}
|
||||
|
||||
static int __must_check write_uds_index_config(struct index_layout *layout,
|
||||
struct configuration *config,
|
||||
struct uds_configuration *config,
|
||||
off_t offset)
|
||||
{
|
||||
int result;
|
||||
|
|
@ -801,7 +801,7 @@ static int __must_check save_layout(struct index_layout *layout, off_t offset)
|
|||
return result;
|
||||
}
|
||||
|
||||
static int create_index_layout(struct index_layout *layout, struct configuration *config)
|
||||
static int create_index_layout(struct index_layout *layout, struct uds_configuration *config)
|
||||
{
|
||||
int result;
|
||||
struct save_layout_sizes sizes;
|
||||
|
|
@ -1620,7 +1620,7 @@ static int __must_check load_sub_index_regions(struct index_layout *layout)
|
|||
}
|
||||
|
||||
static int __must_check verify_uds_index_config(struct index_layout *layout,
|
||||
struct configuration *config)
|
||||
struct uds_configuration *config)
|
||||
{
|
||||
int result;
|
||||
struct buffered_reader *reader = NULL;
|
||||
|
|
@ -1641,7 +1641,7 @@ static int __must_check verify_uds_index_config(struct index_layout *layout,
|
|||
return UDS_SUCCESS;
|
||||
}
|
||||
|
||||
static int load_index_layout(struct index_layout *layout, struct configuration *config)
|
||||
static int load_index_layout(struct index_layout *layout, struct uds_configuration *config)
|
||||
{
|
||||
int result;
|
||||
struct buffered_reader *reader;
|
||||
|
|
@ -1665,7 +1665,7 @@ static int load_index_layout(struct index_layout *layout, struct configuration *
|
|||
}
|
||||
|
||||
static int create_layout_factory(struct index_layout *layout,
|
||||
const struct configuration *config)
|
||||
const struct uds_configuration *config)
|
||||
{
|
||||
int result;
|
||||
size_t writable_size;
|
||||
|
|
@ -1689,7 +1689,7 @@ static int create_layout_factory(struct index_layout *layout,
|
|||
return UDS_SUCCESS;
|
||||
}
|
||||
|
||||
int uds_make_index_layout(struct configuration *config, bool new_layout,
|
||||
int uds_make_index_layout(struct uds_configuration *config, bool new_layout,
|
||||
struct index_layout **layout_ptr)
|
||||
{
|
||||
int result;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
struct index_layout;
|
||||
|
||||
int __must_check uds_make_index_layout(struct configuration *config, bool new_layout,
|
||||
int __must_check uds_make_index_layout(struct uds_configuration *config, bool new_layout,
|
||||
struct index_layout **layout_ptr);
|
||||
|
||||
void uds_free_index_layout(struct index_layout *layout);
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ static int initialize_index_session(struct uds_index_session *index_session,
|
|||
enum uds_open_index_type open_type)
|
||||
{
|
||||
int result;
|
||||
struct configuration *config;
|
||||
struct uds_configuration *config;
|
||||
|
||||
result = uds_make_configuration(&index_session->parameters, &config);
|
||||
if (result != UDS_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -1162,7 +1162,7 @@ static int make_index_zone(struct uds_index *index, unsigned int zone_number)
|
|||
return UDS_SUCCESS;
|
||||
}
|
||||
|
||||
int uds_make_index(struct configuration *config, enum uds_open_index_type open_type,
|
||||
int uds_make_index(struct uds_configuration *config, enum uds_open_index_type open_type,
|
||||
struct index_load_context *load_context, index_callback_fn callback,
|
||||
struct uds_index **new_index)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ enum request_stage {
|
|||
STAGE_MESSAGE,
|
||||
};
|
||||
|
||||
int __must_check uds_make_index(struct configuration *config,
|
||||
int __must_check uds_make_index(struct uds_configuration *config,
|
||||
enum uds_open_index_type open_type,
|
||||
struct index_load_context *load_context,
|
||||
index_callback_fn callback, struct uds_index **new_index);
|
||||
|
|
|
|||
|
|
@ -80,11 +80,11 @@ struct sub_index_parameters {
|
|||
|
||||
struct split_config {
|
||||
/* The hook subindex configuration */
|
||||
struct configuration hook_config;
|
||||
struct uds_configuration hook_config;
|
||||
struct index_geometry hook_geometry;
|
||||
|
||||
/* The non-hook subindex configuration */
|
||||
struct configuration non_hook_config;
|
||||
struct uds_configuration non_hook_config;
|
||||
struct index_geometry non_hook_geometry;
|
||||
};
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ unsigned int uds_get_volume_index_zone(const struct volume_index *volume_index,
|
|||
return get_volume_sub_index_zone(get_volume_sub_index(volume_index, name), name);
|
||||
}
|
||||
|
||||
static int compute_volume_sub_index_parameters(const struct configuration *config,
|
||||
static int compute_volume_sub_index_parameters(const struct uds_configuration *config,
|
||||
struct sub_index_parameters *params)
|
||||
{
|
||||
enum { DELTA_LIST_SIZE = 256 };
|
||||
|
|
@ -300,7 +300,7 @@ void uds_free_volume_index(struct volume_index *volume_index)
|
|||
}
|
||||
|
||||
|
||||
static int compute_volume_sub_index_save_bytes(const struct configuration *config,
|
||||
static int compute_volume_sub_index_save_bytes(const struct uds_configuration *config,
|
||||
size_t *bytes)
|
||||
{
|
||||
struct sub_index_parameters params = { .address_bits = 0 };
|
||||
|
|
@ -317,7 +317,7 @@ static int compute_volume_sub_index_save_bytes(const struct configuration *confi
|
|||
}
|
||||
|
||||
/* This function is only useful if the configuration includes sparse chapters. */
|
||||
static void split_configuration(const struct configuration *config,
|
||||
static void split_configuration(const struct uds_configuration *config,
|
||||
struct split_config *split)
|
||||
{
|
||||
u64 sample_rate, sample_records;
|
||||
|
|
@ -346,7 +346,7 @@ static void split_configuration(const struct configuration *config,
|
|||
split->non_hook_geometry.chapters_per_volume = dense_chapters;
|
||||
}
|
||||
|
||||
static int compute_volume_index_save_bytes(const struct configuration *config,
|
||||
static int compute_volume_index_save_bytes(const struct uds_configuration *config,
|
||||
size_t *bytes)
|
||||
{
|
||||
size_t hook_bytes, non_hook_bytes;
|
||||
|
|
@ -370,7 +370,7 @@ static int compute_volume_index_save_bytes(const struct configuration *config,
|
|||
return UDS_SUCCESS;
|
||||
}
|
||||
|
||||
int uds_compute_volume_index_save_blocks(const struct configuration *config,
|
||||
int uds_compute_volume_index_save_blocks(const struct uds_configuration *config,
|
||||
size_t block_size, u64 *block_count)
|
||||
{
|
||||
size_t bytes;
|
||||
|
|
@ -1172,7 +1172,7 @@ void uds_get_volume_index_stats(const struct volume_index *volume_index,
|
|||
stats->early_flushes += sparse_stats.early_flushes;
|
||||
}
|
||||
|
||||
static int initialize_volume_sub_index(const struct configuration *config,
|
||||
static int initialize_volume_sub_index(const struct uds_configuration *config,
|
||||
u64 volume_nonce, u8 tag,
|
||||
struct volume_sub_index *sub_index)
|
||||
{
|
||||
|
|
@ -1222,7 +1222,7 @@ static int initialize_volume_sub_index(const struct configuration *config,
|
|||
"volume index zones", &sub_index->zones);
|
||||
}
|
||||
|
||||
int uds_make_volume_index(const struct configuration *config, u64 volume_nonce,
|
||||
int uds_make_volume_index(const struct uds_configuration *config, u64 volume_nonce,
|
||||
struct volume_index **volume_index_ptr)
|
||||
{
|
||||
struct split_config split;
|
||||
|
|
|
|||
|
|
@ -136,13 +136,13 @@ struct volume_index_record {
|
|||
struct delta_index_entry delta_entry;
|
||||
};
|
||||
|
||||
int __must_check uds_make_volume_index(const struct configuration *config,
|
||||
int __must_check uds_make_volume_index(const struct uds_configuration *config,
|
||||
u64 volume_nonce,
|
||||
struct volume_index **volume_index);
|
||||
|
||||
void uds_free_volume_index(struct volume_index *volume_index);
|
||||
|
||||
int __must_check uds_compute_volume_index_save_blocks(const struct configuration *config,
|
||||
int __must_check uds_compute_volume_index_save_blocks(const struct uds_configuration *config,
|
||||
size_t block_size,
|
||||
u64 *block_count);
|
||||
|
||||
|
|
|
|||
|
|
@ -1538,7 +1538,7 @@ static int __must_check initialize_page_cache(struct page_cache *cache,
|
|||
return UDS_SUCCESS;
|
||||
}
|
||||
|
||||
int uds_make_volume(const struct configuration *config, struct index_layout *layout,
|
||||
int uds_make_volume(const struct uds_configuration *config, struct index_layout *layout,
|
||||
struct volume **new_volume)
|
||||
{
|
||||
unsigned int i;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ struct volume {
|
|||
unsigned int reserved_buffers;
|
||||
};
|
||||
|
||||
int __must_check uds_make_volume(const struct configuration *config,
|
||||
int __must_check uds_make_volume(const struct uds_configuration *config,
|
||||
struct index_layout *layout,
|
||||
struct volume **new_volume);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user