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
2023-09-03Revert of refactor lfs_scan_* out of lfs_formatChristopher Haster
This would result in two passes through the superblock chain during mount, when we can access everything we need to in one.
2023-09-03Merge pull request #863 from littlefs-project/fix-conversion-warningv2.7.1Christopher Haster
Fix integer conversion warning from Code Composer Studio
2023-09-03Merge pull request #855 from mdahamshi/mmd_fixChristopher Haster
initlize struct lfs_diskoff disk = {0}
2023-09-03Merge pull request #849 from littlefs-project/fix-ci-release-no-versionChristopher Haster
Fix release script breaking if there is no previous version
2023-08-21remove previous block_count detection from lfs_formatBrian Pugh
2023-08-20Add block_count and block_size to fsinfoBrian Pugh
2023-08-20lintingBrian Pugh
2023-08-18forgot to unmount lfs in test; leaking memoryBrian Pugh
2023-08-18fix newly introduced missing cleanup when an invalid superblock is found.Brian Pugh
2023-08-18test for failure when interpretting block count when formatting without ↵Brian Pugh
superblock
2023-08-18Add test_superblocks_mount_unknown_block_countBrian Pugh
2023-08-18fix corruption checkBrian Pugh
2023-08-17Add a unit test; currently hanging on final permutation.Brian Pugh
Some block-device bound-checks are disabled during superblock search.
2023-08-17introduce lfs->block_count. If cfg->block_count is 0, autopopulate from ↵Brian Pugh
superblock
2023-08-17remove redundant superblock checkBrian Pugh
2023-08-17refactor lfs_scan_for_state_updates and lfs_scan_for_superblock out of ↵Brian Pugh
lfs_format
2023-08-03initlize struct lfs_diskoff disk = {0}Mohammad Dahamshi
so we don't use it uninitlized in first run
2023-08-03Fixed integer conversion warning from Code Composer Studiofix-conversion-warningChristopher Haster
Proposed by FiddlingBits
2023-07-03Fixed release script breaking if there is no previous versionfix-ci-release-no-versionChristopher Haster
This can't actually happen in the current state of the littlefs GitHub repo, but could in theory cause problems if CI is enabled on a fork. Found while enabling GitHub Actions on littlefs-fuse.
2023-06-30Merge pull request #848 from littlefs-project/develv2.7.0Christopher Haster
Minor release: v2.7
2023-06-30Bumped minor version to v2.7Christopher Haster
2023-06-30Merge pull request #846 from littlefs-project/link-chan-fatfsChristopher Haster
Add a link to ChaN's FatFS implementation
2023-06-30Merge pull request #839 from littlefs-project/configurable-disk-versionChristopher Haster
Add support for writing previous on-disk minor versions
2023-06-30Merge pull request #838 from littlefs-project/fs-statChristopher Haster
Add lfs_fs_stat for access to filesystem status/configuration
2023-06-29Added LFS_MULTIVERSION and testing of lfs2.0 to CIconfigurable-disk-versionChristopher Haster
- Added test-multiversion test job - Added test-lfs2_0 test job - Added mutliversion size measurement
2023-06-29Added LFS_MULTIVERSION, made lfs2.0 support a compile-time optionChristopher Haster
The code-cost wasn't that bad: 16556 B -> 16754 B (+1.2%) But moving write support of older versions behind a compile-time flag allows us to be a bit more liberal with what gets added to support older versions, since the cost won't hit most users.
2023-06-29Added support for writing on-disk version lfs2.0Christopher Haster
The intention is to help interop with older minor versions of littlefs. Unfortunately, since lfs2.0 drivers cannot mount lfs2.1 images, there are situations where it would be useful to write to write strictly lfs2.0 compatible images. The solution here adds a "disk_version" configuration option which determines the behavior of lfs2.1 dependent features. Normally you would expect this to only change write behavior. But since the main change in lfs2.1 increased validation of erased data, we also need to skip this extra validation (fcrc) or see terrible slowdowns when writing.
2023-06-29Removed fsinfo.block_usage for nowfs-statChristopher Haster
In terms of ease-of-use, a user familiar with other filesystems expects block_usage in fsinfo. But in terms of practicality, block_usage can be expensive to find in littlefs, so if it's not needed in the resulting fsinfo, that operation is wasteful. It's not clear to me what the best course of action is, but since block_usage can always be added to fsinfo later, but not removed without breaking backwards compatibility, I'm leaving this out for now. Block usage can still be found by explicitly calling lfs_fs_size.
2023-06-26Added a link to ChaN's FatFS implementationlink-chan-fatfsChristopher Haster
ChaN's FAT implementation definitely deserves a mention here, since it was one of the first open-source microcontroller-oriented filesystem implementations that I'm aware of, and has a lot of good ideas at the implementation level. Honestly I didn't realize this wasn't already linked to from here. If you're using FAT on a microcontroller, it's most likely this library.
2023-06-07Changed fsinfo.minor_version -> fsinfo.disk_versionChristopher Haster
Version are now returned with major/minor packed into 32-bits, so 0x00020001 is the current disk version, for example. 1. This needed to change to use a disk_* prefix for consistency with the defines that already exist for LFS_VERSION/LFS_DISK_VERSION. 2. Encoding the version this way has the nice side effect of making 0 an invalid value. This is useful for adding a similar config option that needs to have reasonable default behavior for backwards compatibility. In theory this uses more space, but in practice most other config/status is 32-bits in littlefs. We would be wasting this space for alignment anyways.
2023-06-07Increased context on failures for Valgrind in CIChristopher Haster
Valgrind output is very verbose but useful, with a default limit of 5 lines the output usually doesn't contain much useful info.
2023-06-07Removed previous-version lfsp_fs_stat checks in test_compatChristopher Haster
This function naturally doesn't exist in the previous version. We should eventually add these calls when we can expect the previous version to support this function, though it's a bit unclear when that should happen. Or maybe not! Maybe this is testing more of the previous version than we really care about.
2023-06-06Promoted lfs_gstate_needssuperblock to be available in readonly buildsChristopher Haster
Needed for minor version reporting in lfs_fs_stat to work correctly.
2023-06-06Removed use of LFS_VERSION in test_compatChristopher Haster
LFS_VERSION -> LFS_DISK_VERSION These tests shouldn't depend on LFS_VERSION. It's a bit subtle, but LFS_VERSION versions the API, and LFS_DISK_VERSION versions the on-disk format, which is what test_compat should be testing.
2023-06-06Added lfs_fs_stat for access to filesystem status/configurationChristopher Haster
Currently this includes: - minor_version - on-disk minor version - block_usage - estimated number of in-use blocks - name_max - configurable name limit - file_max - configurable file limit - attr_max - configurable attr limit These are currently the only configuration operations that need to be written to disk. Other configuration is either needed to mount, such as block_size, or does not change the on-disk representation, such as read/prog_size. This also includes the current block usage, which is common in other filesystems, though a more expensive to find in littlefs. I figure it's not unreasonable to make lfs_fs_stat no worse than block allocation, hopefully this isn't a mistake. It may be worth caching the current usage after the most recent lookahead scan. More configuration may be added to this struct in the future.
2023-05-23Merge pull request #832 from littlefs-project/remove-sys-typesv2.6.1Christopher Haster
Remove unnecessary sys/types.h include
2023-05-23Merge pull request #819 from benpicco/fix-AVRChristopher Haster
Fix build for AVR
2023-05-23Merge pull request #818 from littlefs-project/convince-github-littlefs-is-cChristopher Haster
Convince GitHub littlefs is a C project
2023-05-17Removed unnecessary sys/types.h includeremove-sys-typesChristopher Haster
Likely included at some point for ssize_t, this is no longer needed and causes some problems for embedded compilers. Currently littlefs doesn't even use size_t/ssize_t in its definition of lfs_size_t/lfs_ssize_t, so I don't think this will ever be required. Found by LDong-Arm, vvn-git
2023-05-05Fix build for AVRBenjamin Valentin
This fixes the overflowing left shift on 8 bit platforms. littlefs2/lfs.c: In function ‘lfs_dir_commitcrc’: littlefs2/lfs.c:1654:51: error: left shift count >= width of type [-Werror=shift-count-overflow] commit->ptag = ntag ^ ((0x80 & ~eperturb) << 24);
2023-05-04Reclassify .toml files as .c files on GitHubconvince-github-littlefs-is-cChristopher Haster
With the new test framework, GitHub really wants to mark littlefs as a python project. telling it to reclassify our test .toml files as C code (which they are 95% of anyways) remedies this. An alternative would be to add syntax=c vim modelines to the test/bench files, which would also render them with C syntax highlighting on GitHub. Unfortunately the interspersed toml metadata mucks this up, making the result not very useful.
2023-05-04Merge pull request #814 from littlefs-project/develv2.6.0Christopher Haster
Minor release: v2.6
2023-05-01Merge pull request #812 from littlefs-project/mkconsistentChristopher Haster
Add lfs_fs_mkconsistent
2023-05-01Merge pull request #811 from littlefs-project/fix-deorphan-repeatedlyChristopher Haster
Fix issue where lfs_fs_deorphan may run more than needed
2023-04-27Added lfs_fs_mkconsistentmkconsistentChristopher Haster
lfs_fs_mkconsistent allows running the internal consistency operations (desuperblock/deorphan/demove) on demand and without any other filesystem changes. This can be useful for front-loading and persisting consistency operations when you don't want to pay for this cost on the first write to the filesystem. Conveniently, this also offers a way to force the on-disk minor version to bump, if that is wanted behavior. Idea from kasper0
2023-04-27Fixed issue where lfs_fs_deorphan may run more than neededfix-deorphan-repeatedlyChristopher Haster
The underlying issue is that lfs_fs_deorphan did not updating gstate correctly. The way it determined if there are any orphans remaining in the filesystem was by subtracting the number of found orphans from an internal counter. This internal counter is a leftover from a previous implementation that allowed leaving the lfs_fs_deorphan loop early if we know the number of expected orphans. This can happen during recursive mdir relocations, but with only a single bit in the gstate, can't happen during mount. If we detect orphans during mount, we set this internal counter to 1, assuming we will find at least one orphan. But this presents a problem, what if we find _no_ orphans? If this happens we never decrement the internal counter of orphans, so we would never clear the bit in the gstate. This leads to a running lfs_fs_deorphan on more-or-less every mutable operation in the filesystem, resulting in an extreme performance hit. The solution here is to not subtract the number of found orphans, but assume that when our lfs_fs_deorphan loop finishes, we will have no orphans, because that's the whole point of lfs_fs_deorphan. Note that the early termination of lfs_fs_deorphan was dropped because it would not actually change the runtime complexity of lfs_fs_deorphan, adds code cost, and risks fragile corner cases such as this one. --- Also added tests to assert we run lfs_fs_deorphan at most once. Found by kasper0 and Ldd309
2023-04-26Merge pull request #805 from littlefs-project/fix-dir-seek-endChristopher Haster
Fix issue where seeking to end-of-directory return LFS_ERR_INVAL
2023-04-26Merge pull request #800 from littlefs-project/fix-boundary-truncatesChristopher Haster
Fix block-boundary truncate issues
2023-04-26Merge remote-tracking branch 'origin/devel' into fix-dir-seek-endfix-dir-seek-endChristopher Haster
2023-04-26Merge remote-tracking branch 'origin/devel' into fix-boundary-truncatesfix-boundary-truncatesChristopher Haster