Implemented infrastructure necessary for global-removes
This has, in theory, global-removes (grm) being written out as a part of of directory creation, but they aren't used in any form and so may not be being written correctly. But it did require quite a bit of problem solving to get to this point (the interactions between mtree splitsand grms is really annoying), so it's worth a commit.
This commit is contained in:
@@ -368,6 +368,12 @@ typedef union lfsr_btree {
|
||||
} inlined;
|
||||
} lfsr_btree_t;
|
||||
|
||||
// space for:
|
||||
// - type - 1 leb128 - 1 byte (worst case)
|
||||
// - mid - 1 leb128 - 5 bytes (worst case)
|
||||
// - rid - 1 leb128 - 5 bytes (worst case)
|
||||
#define LFSR_GRM_DSIZE (5+5)
|
||||
|
||||
typedef struct lfsr_mdir {
|
||||
// -2 => deleted
|
||||
// -1 => mroot
|
||||
@@ -482,6 +488,9 @@ typedef struct lfs {
|
||||
lfsr_mdir_t mroot;
|
||||
lfsr_btree_t mtree;
|
||||
|
||||
uint8_t grm[LFSR_GRM_DSIZE];
|
||||
uint8_t grmd[LFSR_GRM_DSIZE];
|
||||
|
||||
// linked-list of opened mdirs
|
||||
lfsr_openedmdir_t *opened;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user