mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Shrinked on-disk directory program size
Directories still consume two full erase blocks, but now only program the exact on-disk region to store the directory contents. This results in a decent improvement in the amount of data written and read to the device when doing directory operations. Calculating the checksum of dynamically sized data is surprisingly tricky, since the size of the data could also contain errors. For the littlefs, we can assume the data size must fit in an erase block. If the data size is invalid, we can just treat the block as corrupted.
This commit is contained in:
		| @@ -61,11 +61,11 @@ lfs_size_t rsize; | ||||
| uintmax_t res; | ||||
|  | ||||
| #ifndef LFS_READ_SIZE | ||||
| #define LFS_READ_SIZE 64 | ||||
| #define LFS_READ_SIZE 16 | ||||
| #endif | ||||
|  | ||||
| #ifndef LFS_PROG_SIZE | ||||
| #define LFS_PROG_SIZE 64 | ||||
| #define LFS_PROG_SIZE 16 | ||||
| #endif | ||||
|  | ||||
| #ifndef LFS_BLOCK_SIZE | ||||
|   | ||||
		Reference in New Issue
	
	Block a user