mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-31 04:23:28 +00:00
Convert the manifest to store entries in persistent btree keys and values instead of using the rbtree in memory from the ring. The btree doesn't have a sort function. It just compares variable length keys. The most complicated part of this transformation is dealing with the fallout of this. The compare function can't compare different search keys and item keys so searches need to construct full synthetic btree keys to search. It also can't return different comparisons, like overlaping, so the caller needs to do a bit more work to use key comparisons to find overlapping segments. And it can't compare differently depending on the level of the manifest so we store the manifest in keys differently depending on whether its in level 0 or not. All mount clients can now see the manifest blocks. They can query the manifest directly when trying to find segments to read. We can get rid of all the networking calls that were finding the segments for readers. We change the manifest functions that relied on the ring that the to make changes in the manifest persistent. We don't touch the allocator or the rest of the manifest server, though, so this commit breaks the world. It'll be restored in future patches as we update the segment allocator and server to work with the btree. Signed-off-by: Zach Brown <zab@versity.com>
17 lines
593 B
C
17 lines
593 B
C
#ifndef _SCOUTFS_COMPACT_H_
|
|
#define _SCOUTFS_COMPACT_H_
|
|
|
|
void scoutfs_compact_kick(struct super_block *sb);
|
|
|
|
void scoutfs_compact_describe(struct super_block *sb, void *data,
|
|
u8 upper_level, u8 last_level, bool sticky);
|
|
int scoutfs_compact_add(struct super_block *sb, void *data,
|
|
struct scoutfs_manifest_entry *ment);
|
|
void scoutfs_compact_add_segno(struct super_block *sb, void *data, u64 segno);
|
|
int scoutfs_compact_commit(struct super_block *sb, void *c, void *r);
|
|
|
|
int scoutfs_compact_setup(struct super_block *sb);
|
|
void scoutfs_compact_destroy(struct super_block *sb);
|
|
|
|
#endif
|