mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-24 00:53:01 +00:00
For each transaction we send a message to to the server asking for a unique sequence number to associate with the transaction. When we change metadata or data of an inode we store the current transaction seq in the inode and we index it with index items like the other inode fields. The server remembers the sequences it gives out. When we go to walk the inode sequence indexes we ask the server for the largest stable seq and limit results to that seq. This ensures that we never return seqs that are past dirty items so never have inodes and seqs appear in the past. Nodes use the sync timer to regularly cycle through seqs and ensure that inode seq index walks don't get stuck on their otherwise idle seq. Signed-off-by: Zach Brown <zab@versity.com>
27 lines
947 B
C
27 lines
947 B
C
#ifndef _SCOUTFS_NET_H_
|
|
#define _SCOUTFS_NET_H_
|
|
|
|
struct scoutfs_key_buf;
|
|
struct scoutfs_segment;
|
|
|
|
int scoutfs_net_alloc_inodes(struct super_block *sb);
|
|
int scoutfs_net_manifest_range_entries(struct super_block *sb,
|
|
struct scoutfs_key_buf *start,
|
|
struct scoutfs_key_buf *end,
|
|
struct list_head *list);
|
|
int scoutfs_net_alloc_segno(struct super_block *sb, u64 *segno);
|
|
int scoutfs_net_record_segment(struct super_block *sb,
|
|
struct scoutfs_segment *seg, u8 level);
|
|
u64 *scoutfs_net_bulk_alloc(struct super_block *sb);
|
|
|
|
int scoutfs_net_get_compaction(struct super_block *sb, void *curs);
|
|
int scoutfs_net_finish_compaction(struct super_block *sb, void *curs,
|
|
void *list);
|
|
int scoutfs_net_get_last_seq(struct super_block *sb, u64 *seq);
|
|
int scoutfs_net_advance_seq(struct super_block *sb, u64 *seq);
|
|
|
|
int scoutfs_net_setup(struct super_block *sb);
|
|
void scoutfs_net_destroy(struct super_block *sb);
|
|
|
|
#endif
|