Readopted bshrub namespace, renamed ftree -> bshrub
This is just too useful a namespace to not have in the low-level file code. This also replaces the ftree namespace with bshrub, which is a bit of a more concrete term? Note that some of the bshrub functions still take lfsr_file_t instead of lfsr_bshrub_t. In _theory_ these could take 3 pointers (mdir+bshrub+ bshrub_), but this adds a surprising amount of code cost and we really don't gain anything.
This commit is contained in:
@@ -499,8 +499,8 @@ typedef struct lfsr_shrub {
|
||||
lfs_size_t estimate;
|
||||
} lfsr_shrub_t;
|
||||
|
||||
// the lfsr_ftree_t struct is a sort of proto-file
|
||||
typedef struct lfsr_ftree {
|
||||
// the lfsr_bshrub_t struct represents the on-disk component of a file
|
||||
typedef struct lfsr_bshrub {
|
||||
// navigating this union is a bit tricky, and relies on the related
|
||||
// mdir's block:
|
||||
//
|
||||
@@ -517,15 +517,15 @@ typedef struct lfsr_ftree {
|
||||
lfsr_shrub_t bshrub;
|
||||
lfsr_btree_t btree;
|
||||
} u;
|
||||
} lfsr_ftree_t;
|
||||
} lfsr_bshrub_t;
|
||||
|
||||
typedef struct lfsr_file {
|
||||
lfsr_opened_t m;
|
||||
|
||||
// files contain both an active tree and staging tree, to allow
|
||||
// files contain both an active bshrub and staging bshrub, to allow
|
||||
// staging during mdir compacts
|
||||
lfsr_ftree_t ftree;
|
||||
lfsr_ftree_t ftree_;
|
||||
lfsr_bshrub_t bshrub;
|
||||
lfsr_bshrub_t bshrub_;
|
||||
lfs_off_t pos;
|
||||
|
||||
lfs_off_t buffer_pos;
|
||||
|
||||
Reference in New Issue
Block a user