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
AgeCommit message (Collapse)Author
2018-10-13Cleaned up enough things to pass basic file testingChristopher Haster
2018-02-04Silenced more of aldot's warningsChristopher Haster
Flags used: -Wall -Wextra -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition
2018-02-04tests: Silence warnings in templateBernhard Reutner-Fischer
- no previous prototype for ‘test_assert’ - no previous prototype for ‘test_count’ - unused parameter ‘b’ in test_count - function declaration isn’t a prototype for main
2018-01-30Fixed self-assign warning in testsChristopher Haster
Some of the tests were creating a variable `res`, however the test system itself relies on it's own `res` variable. This worked out by luck, but could lead to problems if the res variables were different types. Changed the generated variable in the test system to the less common name `test`, which also works out to share the same prefix as other test functions.
2017-10-10Added self-hosting fuzz test using littlefs-fuseChristopher Haster
2017-06-28Shrinked on-disk directory program sizeChristopher Haster
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.
2017-05-15Added support for handling corrupted blocksChristopher Haster
This provides a limited form of wear leveling. While wear is not actually balanced across blocks, the filesystem can recover from corrupted blocks and extend the lifetime of a device nearly as much as dynamic wear leveling. For use-cases where wear is important, it would be better to use a full form of dynamic wear-leveling at the block level. (or consider a logging filesystem). Corrupted block handling was simply added on top of the existing logic in place for the filesystem, so it's a bit more noodly than it may have to be, but it gets the work done.
2017-04-23Cleaned up block allocatorChristopher Haster
Removed scanning for stride - Adds complexity with questionable benefit - Can be added as an optimization later Fixed handling around device boundaries and where lookahead may not be a factor of the device size (consider small devices with only a few blocks) Added support for configuration with optional dynamic memory as found in the caching configuration
2017-04-23Added optional block-level cachingChristopher Haster
This adds caching of the most recent read/program blocks, allowing support of devices that don't have byte-level read+writes, along with reduced device access on devices that do support byte-level read+writes. Note: The current implementation is a bit eager to drop caches where it simplifies the cache layer. This layer is already complex enough. Note: It may be worthwhile to add a compile switch for caching to reduce code size, note sure. Note: This does add a dependency on malloc, which could have a porting layer, but I'm just using the functions from stdlib for now. These can be overwritten with noops if the user controls the system, and keeps things simple for now.
2017-04-22Simplified configChristopher Haster
Before, the lfs had multiple paths to determine config options: - lfs_config struct passed during initialization - lfs_bd_info struct passed during block device initialization - compile time options This allowed different developers to provide their own needs to the filesystem, such as the block device capabilities and the higher level user's own tweaks. However, this comes with additional complexity and action required when the configurations are incompatible. For now, this has been reduced to all information (including block device function pointers) being passed through the lfs_config struct. We just defer more complicated handling of configuration options to the top level user. This simplifies configuration handling and gives the top level user the responsibility to handle configuration, which they probably would have wanted to do anyways.
2017-04-18Moved to brute-force deorphan without parent pointersChristopher Haster
Removing the dependency to the parent pointer solves many issues with non-atomic updates of children's parent pointers with respect to any move operations. However, this comes with an embarrassingly terrible runtime as the only other option is to exhaustively check every dir entry to find a child's parent. Fortunately, deorphaning should be a relatively rare operation.
2017-03-26Added file read/write tests and some framework updatesChristopher Haster
2017-03-26Added dir tests, test fixes, configChristopher Haster
2017-03-26Added a rudimentary test frameworkChristopher Haster
Tests can be found in 'tests/test_blah.sh' Tests can be run with 'make test'