diff options
author | Christopher Haster <chaster@utexas.edu> | 2017-09-19 05:20:33 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2017-09-19 05:20:33 +0300 |
commit | 273cb7c9c87619fe4537f61e9a8b54375b1a57cd (patch) | |
tree | a12476a937695ea3565e4a528518479b4358ac91 /lfs.h | |
parent | d9367e05ce39d076aa8c5111eda6a2a9a698a507 (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.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |