Restricted lfsr_ftree_t to ftree related things

Note, I think if we ever add file snapshots for idempotent errors again,
I don't think adding mdir/next back into the ftree is the best way to
structure this.

Instead, adding a separate linked-list for tracking bshrubs would work
without adding redundant mdir copies to the ftree struct.

Fortunately, in our current version, we don't need to track on-stack
ftrees. Actually, we don't make on-stack ftree copies at all...
This commit is contained in:
Christopher Haster
2024-01-07 19:15:29 -06:00
parent 07e9bbf5b7
commit 34d522a71e
2 changed files with 168 additions and 149 deletions
+2 -2
View File
@@ -537,8 +537,6 @@ typedef struct lfsr_bshrub {
// the lfsr_ftree_t struct is a sort of proto-file
typedef struct lfsr_ftree {
lfsr_openedmdir_t *next;
lfsr_mdir_t mdir;
union {
lfs_soff_t size;
lfsr_data_t data;
@@ -551,6 +549,8 @@ typedef struct lfsr_ftree {
} lfsr_ftree_t;
typedef struct lfsr_file {
lfsr_openedmdir_t *next;
lfsr_mdir_t mdir;
lfsr_ftree_t ftree;
uint32_t flags;
lfs_off_t pos;