mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-09 04:00:10 +00:00
Have the server use the extent core to maintain free extent items in the allocation btree instead of the bitmap items. We add a client request to allocate an extent of a given length. The existing segment alloc and free now work with a segment's worth of blocks. The server maintains counters in the super block of free blocks instead of free segments. We maintain an allocation cursor so that allocation results tend to cycle through the device. It's stored in the super so that it is maintained across server instances. This doesn't remove unused dead code to keep the commit from getting too noisy. It'll be removed in a future commit. Signed-off-by: Zach Brown <zab@versity.com>
22 lines
893 B
C
22 lines
893 B
C
#ifndef _SCOUTFS_CLIENT_H_
|
|
#define _SCOUTFS_CLIENT_H_
|
|
|
|
int scoutfs_client_alloc_inodes(struct super_block *sb, u64 count,
|
|
u64 *ino, u64 *nr);
|
|
int scoutfs_client_alloc_extent(struct super_block *sb, u64 len, u64 *start);
|
|
int scoutfs_client_alloc_segno(struct super_block *sb, u64 *segno);
|
|
int scoutfs_client_record_segment(struct super_block *sb,
|
|
struct scoutfs_segment *seg, u8 level);
|
|
u64 *scoutfs_client_bulk_alloc(struct super_block *sb);
|
|
int scoutfs_client_advance_seq(struct super_block *sb, u64 *seq);
|
|
int scoutfs_client_get_last_seq(struct super_block *sb, u64 *seq);
|
|
int scoutfs_client_get_manifest_root(struct super_block *sb,
|
|
struct scoutfs_btree_root *root);
|
|
int scoutfs_client_statfs(struct super_block *sb,
|
|
struct scoutfs_net_statfs *nstatfs);
|
|
|
|
int scoutfs_client_setup(struct super_block *sb);
|
|
void scoutfs_client_destroy(struct super_block *sb);
|
|
|
|
#endif
|