The volume store structures manage the reading and writing of chapter pages. When a chapter is closed, it is packed into a read-only structure, split across several pages, and written to storage. The volume store also contains a cache and specialized queues that sort and batch requests by the page they need, in order to minimize latency and I/O requests when records have to be read from storage. The cache and queues also coordinate with the volume index to ensure that the volume does not waste resources reading pages that are no longer valid. Co-developed-by: J. corwin Coburn <corwin@hurlbutnet.net> Signed-off-by: J. corwin Coburn <corwin@hurlbutnet.net> Co-developed-by: Michael Sclafani <dm-devel@lists.linux.dev> Signed-off-by: Michael Sclafani <dm-devel@lists.linux.dev> Co-developed-by: Thomas Jaskiewicz <tom@jaskiewicz.us> Signed-off-by: Thomas Jaskiewicz <tom@jaskiewicz.us> Co-developed-by: John Wiele <jwiele@redhat.com> Signed-off-by: John Wiele <jwiele@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
27 lines
797 B
C
27 lines
797 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright 2023 Red Hat
|
|
*/
|
|
|
|
#ifndef UDS_RADIX_SORT_H
|
|
#define UDS_RADIX_SORT_H
|
|
|
|
/*
|
|
* Radix sort is implemented using an American Flag sort, an unstable, in-place 8-bit radix
|
|
* exchange sort. This is adapted from the algorithm in the paper by Peter M. McIlroy, Keith
|
|
* Bostic, and M. Douglas McIlroy, "Engineering Radix Sort".
|
|
*
|
|
* http://www.usenix.org/publications/compsystems/1993/win_mcilroy.pdf
|
|
*/
|
|
|
|
struct radix_sorter;
|
|
|
|
int __must_check uds_make_radix_sorter(unsigned int count, struct radix_sorter **sorter);
|
|
|
|
void uds_free_radix_sorter(struct radix_sorter *sorter);
|
|
|
|
int __must_check uds_radix_sort(struct radix_sorter *sorter, const unsigned char *keys[],
|
|
unsigned int count, unsigned short length);
|
|
|
|
#endif /* UDS_RADIX_SORT_H */
|