drm/nouveau: consume the return of large GSP message
[drm/drm-misc.git] / drivers / md / dm-vdo / indexer / index-layout.h
blobe9ac6f4302d632d09db1b84a75adf517e4ef6b52
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright 2023 Red Hat
4 */
6 #ifndef UDS_INDEX_LAYOUT_H
7 #define UDS_INDEX_LAYOUT_H
9 #include "config.h"
10 #include "indexer.h"
11 #include "io-factory.h"
14 * The index layout describes the format of the index on the underlying storage, and is responsible
15 * for creating those structures when the index is first created. It also validates the index data
16 * when loading a saved index, and updates it when saving the index.
19 struct index_layout;
21 int __must_check uds_make_index_layout(struct uds_configuration *config, bool new_layout,
22 struct index_layout **layout_ptr);
24 void uds_free_index_layout(struct index_layout *layout);
26 int __must_check uds_replace_index_layout_storage(struct index_layout *layout,
27 struct block_device *bdev);
29 int __must_check uds_load_index_state(struct index_layout *layout,
30 struct uds_index *index);
32 int __must_check uds_save_index_state(struct index_layout *layout,
33 struct uds_index *index);
35 int __must_check uds_discard_open_chapter(struct index_layout *layout);
37 u64 __must_check uds_get_volume_nonce(struct index_layout *layout);
39 int __must_check uds_open_volume_bufio(struct index_layout *layout, size_t block_size,
40 unsigned int reserved_buffers,
41 struct dm_bufio_client **client_ptr);
43 #endif /* UDS_INDEX_LAYOUT_H */