Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lfs.h
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2017-09-19 05:20:33 +0300
committerChristopher Haster <chaster@utexas.edu>2017-09-19 05:20:33 +0300
commit273cb7c9c87619fe4537f61e9a8b54375b1a57cd (patch)
treea12476a937695ea3565e4a528518479b4358ac91 /lfs.h
parentd9367e05ce39d076aa8c5111eda6a2a9a698a507 (diff)
Fixed problem with lookaheads larger than block device
Simply limiting the lookahead region to the size of the block device fixes the problem. Also added logic to limit the allocated region and floor to nearest word, since the additional memory couldn't really be used effectively.
Diffstat (limited to 'lfs.h')
-rw-r--r--lfs.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lfs.h b/lfs.h
index 1b11ba7..ed232f6 100644
--- a/lfs.h
+++ b/lfs.h
@@ -225,10 +225,11 @@ typedef struct lfs_superblock {
} lfs_superblock_t;
typedef struct lfs_free {
+ lfs_size_t lookahead;
+ lfs_block_t begin;
lfs_block_t end;
- lfs_block_t start;
lfs_block_t off;
- uint32_t *lookahead;
+ uint32_t *buffer;
} lfs_free_t;
// The littlefs type
@@ -237,12 +238,12 @@ typedef struct lfs {
lfs_block_t root[2];
lfs_file_t *files;
- bool deorphaned;
lfs_cache_t rcache;
lfs_cache_t pcache;
lfs_free_t free;
+ bool deorphaned;
} lfs_t;