mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-22 14:30:31 +00:00
Convert metadata block and file data extent allocations to use the radix allocator. Most of this is simple transitions between types and calls. The server no longer has to initialize blocks because mkfs can write a single radix parent block with fully set parent refs to initialize a full radix. We remove the code and fields that were responsible for adding uninitialized data and metadata. The rest of the unused block allocator code is only ifdefed out. It'll be removed in a separate patch to reduce noise here. Signed-off-by: Zach Brown <zab@versity.com>
56 lines
2.3 KiB
C
56 lines
2.3 KiB
C
#ifndef _SCOUTFS_FOREST_H_
|
|
#define _SCOUTFS_FOREST_H_
|
|
|
|
struct scoutfs_radix_allocator;
|
|
struct scoutfs_block_writer;
|
|
|
|
int scoutfs_forest_lookup(struct super_block *sb, struct scoutfs_key *key,
|
|
struct kvec *val, struct scoutfs_lock *lock);
|
|
int scoutfs_forest_lookup_exact(struct super_block *sb,
|
|
struct scoutfs_key *key, struct kvec *val,
|
|
struct scoutfs_lock *lock);
|
|
int scoutfs_forest_next(struct super_block *sb, struct scoutfs_key *key,
|
|
struct scoutfs_key *last, struct kvec *val,
|
|
struct scoutfs_lock *lock);
|
|
int scoutfs_forest_next_hint(struct super_block *sb, struct scoutfs_key *key,
|
|
struct scoutfs_key *next);
|
|
int scoutfs_forest_prev(struct super_block *sb, struct scoutfs_key *key,
|
|
struct scoutfs_key *first, struct kvec *val,
|
|
struct scoutfs_lock *lock);
|
|
int scoutfs_forest_create(struct super_block *sb, struct scoutfs_key *key,
|
|
struct kvec *val, struct scoutfs_lock *lock);
|
|
int scoutfs_forest_create_force(struct super_block *sb,
|
|
struct scoutfs_key *key, struct kvec *val,
|
|
struct scoutfs_lock *lock);
|
|
int scoutfs_forest_update(struct super_block *sb, struct scoutfs_key *key,
|
|
struct kvec *val, struct scoutfs_lock *lock);
|
|
int scoutfs_forest_delete_dirty(struct super_block *sb,
|
|
struct scoutfs_key *key);
|
|
int scoutfs_forest_delete(struct super_block *sb, struct scoutfs_key *key,
|
|
struct scoutfs_lock *lock);
|
|
int scoutfs_forest_delete_force(struct super_block *sb,
|
|
struct scoutfs_key *key,
|
|
struct scoutfs_lock *lock);
|
|
int scoutfs_forest_delete_save(struct super_block *sb,
|
|
struct scoutfs_key *key,
|
|
struct list_head *list,
|
|
struct scoutfs_lock *lock);
|
|
int scoutfs_forest_restore(struct super_block *sb, struct list_head *list,
|
|
struct scoutfs_lock *lock);
|
|
void scoutfs_forest_free_batch(struct super_block *sb, struct list_head *list);
|
|
|
|
void scoutfs_forest_init_btrees(struct super_block *sb,
|
|
struct scoutfs_radix_allocator *alloc,
|
|
struct scoutfs_block_writer *wri,
|
|
struct scoutfs_log_trees *lt);
|
|
void scoutfs_forest_get_btrees(struct super_block *sb,
|
|
struct scoutfs_log_trees *lt);
|
|
|
|
void scoutfs_forest_clear_lock(struct super_block *sb,
|
|
struct scoutfs_lock *lock);
|
|
|
|
int scoutfs_forest_setup(struct super_block *sb);
|
|
void scoutfs_forest_destroy(struct super_block *sb);
|
|
|
|
#endif
|