Renamed a number of internal block-allocator fields

- Renamed lfs.free      -> lfs.lookahead
- Renamed lfs.free.off  -> lfs.lookahead.start
- Renamed lfs.free.i    -> lfs.lookahead.next
- Renamed lfs.free.ack  -> lfs.lookahead.ckpoint
- Renamed lfs_alloc_ack -> lfs_alloc_ckpoint

These have been named a bit confusingly, and I think the new names make
their relevant purposes a bit clearer.

At the very it's clear lfs.lookahead is related to the lookahead buffer.
(and doesn't imply a closed free-bitmap).
This commit is contained in:
Christopher Haster
2023-12-19 15:02:40 -06:00
parent c733d9ec57
commit 7b68441888
3 changed files with 55 additions and 52 deletions

10
lfs.h
View File

@@ -430,13 +430,13 @@ typedef struct lfs {
lfs_gstate_t gdisk;
lfs_gstate_t gdelta;
struct lfs_free {
lfs_block_t off;
struct lfs_lookahead {
lfs_block_t start;
lfs_block_t size;
lfs_block_t i;
lfs_block_t ack;
lfs_block_t next;
lfs_block_t ckpoint;
uint32_t *buffer;
} free;
} lookahead;
const struct lfs_config *cfg;
lfs_size_t block_count;