Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate littlefs into mbed OS #5538

Merged
merged 58 commits into from
Dec 1, 2017
Merged

Commits on Jul 12, 2017

  1. Initial commit

    geky committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    8fae391 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c906259 View commit details
    Browse the repository at this point in the history
  3. Squashed 'littlefs/' content from commit 663e953

    git-subtree-dir: littlefs
    git-subtree-split: 663e953
    geky committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    98af79f View commit details
    Browse the repository at this point in the history
  4. Tweaked littlefs to fit into mbed

    - Changed log statements to use the debug function
    - Changed %d to %ld given the type of int32_t in arm-none-eabi-gcc. In
      mainstream gcc this is not the case and may cause problems to
      upstream.
    geky committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    c586879 View commit details
    Browse the repository at this point in the history
  5. Added README and LICENSE

    geky committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    953e19e View commit details
    Browse the repository at this point in the history
  6. Added support for Travis CI

    geky committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    64ff4b6 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2017

  1. Squashed 'littlefs/' changes from 663e953..c2283a2

    c2283a2 Extended entry tag to support attributes
    8795f0e Added build size output to CI
    47db7a7 Added sanity check for compiling example
    476915f Removed a few "what"s from the documentation
    
    git-subtree-dir: littlefs
    git-subtree-split: c2283a2
    geky committed Jul 23, 2017
    Configuration menu
    Copy the full SHA
    76d00eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2e9f87d View commit details
    Browse the repository at this point in the history
  3. Increased default lookahead to 512 blocks

    Because lookahead is stored efficiently as a bit-vector, this only
    requires a ram increase of 48 bytes (2.1% of benchmark), but decreases
    the SD benchmark runtime cost by 32 seconds (21.9% of benchmark).
    
    Note this is unimportant on devices with byte-reads such as NOR flash.
    geky committed Jul 23, 2017
    Configuration menu
    Copy the full SHA
    c9117d8 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2017

  1. Squashed 'littlefs/' changes from c2283a2..9843402

    9843402 Fixed incorrect return value from lfs_file_seek
    273cb7c Fixed problem with lookaheads larger than block device
    d9367e0 Fixed collection of multiblock directories
    a83b2fe Added checks for out-of-bound seeks
    a8fa5e6 Fixed some corner cases with paths
    26dd49a Fixed issue with negative modulo with unaligned lookaheads
    0982020 Fixed issue with cold-write after seek to block boundary
    
    git-subtree-dir: littlefs
    git-subtree-split: 9843402
    geky committed Sep 27, 2017
    Configuration menu
    Copy the full SHA
    6e99fa9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    37edc35 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b6455a3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3a98733 View commit details
    Browse the repository at this point in the history
  5. Converted tests into mbed-style integration tests

    - TESTS/filesystem for mbed OS filesystem APIs
    - TESTS/filesystem_retarget for mbed OS retargeted stdlib APIs
    
    converted:
    - test_dirs
    - test_files
    - test_seek
    - test_parallel
    geky committed Sep 27, 2017
    Configuration menu
    Copy the full SHA
    9408f2b View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2017

  1. Configuration menu
    Copy the full SHA
    c390e89 View commit details
    Browse the repository at this point in the history
  2. Ported lfs_util functions to IAR intrinsics

    required intrinsics for:
    - lfs_ctz
    - lfs_npw2
    geky committed Oct 10, 2017
    Configuration menu
    Copy the full SHA
    301232e View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2017

  1. Squashed 'littlefs/' changes from 9843402..454b588

    454b588 Updated SPEC.md and DESIGN.md based on recent changes
    f3578e3 Removed clamping to block size in ctz linked-list
    83d4c61 Updated copyright
    539409e Refactored deduplicate/deorphan step to single deorphan step
    2936514 Added atomic move using dirty tag in entry type
    ac9766e Added self-hosting fuzz test using littlefs-fuse
    9db1a86 Added specification document
    
    git-subtree-dir: littlefs
    git-subtree-split: 454b588
    geky committed Oct 13, 2017
    Configuration menu
    Copy the full SHA
    3c3b032 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    383677f View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2017

  1. Fixed incorrect instruction in IAR ctz implementation

    The RBIT instruction reverses the bits of a word, not REV
    geky committed Oct 16, 2017
    Configuration menu
    Copy the full SHA
    6fc33f4 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2017

  1. Removed toolchain specific warnings

    - Comparisons with differently signed integer types
    - Incorrectly signed constant
    - Unreachable default returns
    - Leaked uninitialized variables in relocate goto statements
    geky committed Oct 17, 2017
    Configuration menu
    Copy the full SHA
    11440f6 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2017

  1. Configuration menu
    Copy the full SHA
    adbd029 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2017

  1. Squashed 'littlefs/' changes from 454b588..2ab150c

    2ab150c Removed toolchain specific warnings
    0825d34 Adopted alternative implementation for lfs_ctz_index
    46e22b2 Adopted lfs_ctz_index implementation using popcount
    4fdca15 Slight name change with ctz skip-list functions
    
    git-subtree-dir: littlefs
    git-subtree-split: 2ab150c
    geky committed Oct 30, 2017
    Configuration menu
    Copy the full SHA
    0171b57 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    26ade62 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2017

  1. Added simple high-level thread safety

    All calls are blocking, so a single mutex is able
    to garuntee synchronization across all relevant functions.
    geky committed Oct 31, 2017
    Configuration menu
    Copy the full SHA
    5e4ef9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    72fab82 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2017

  1. Cleaned up compilation with logging enabled

    - Removed list of warnings on signedness of integers in printf
    - Fixed issue with "true" in ifdef
    geky committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    71b429b View commit details
    Browse the repository at this point in the history
  2. Fixed issue with aggressively rounding down lookahead configuration

    The littlefs allows buffers to be passed statically in the case
    that a system does not have a heap. Unfortunately, this means we
    can't round up in the case of an unaligned lookahead buffer.
    
    Double unfortunately, rounding down after clamping to the block device
    size could result in a lookahead of zero for block devices < 32 blocks
    large.
    
    The assert in littlefs does catch this case, but rounding down prevents
    support for < 32 block devices.
    
    The solution is to simply require a 32-bit aligned buffer with an
    assert. This avoids runtime problems while allowing a user to pass
    in the correct buffer for < 32 block devices. Rounding up can be
    handled at higher API levels.
    geky committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    785b0b4 View commit details
    Browse the repository at this point in the history
  3. Fixed corner case with immediate exhaustion and lookahead==block_count

    The previous math for determining if we scanned all of disk wasn't set
    up correctly in the lfs_mount function. If lookahead == block_count
    the lfs_alloc function would think we had already searched the entire
    disk.
    
    This is only an issue if we manage to exhaust a block on the first
    pass after mount, since lfs_alloc_ack resets the lookahead region
    into a valid state after a succesful block allocation.
    geky committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    d3b2efe View commit details
    Browse the repository at this point in the history
  4. Squashed 'littlefs/' changes from 2ab150c..3f31c8c

    3f31c8c Fixed corner case with immediate exhaustion and lookahead==block_count
    f4aeb83 Fixed issue with aggressively rounding down lookahead configuration
    db51a39 Removed stray newline in LFS_ERROR for version
    
    git-subtree-dir: littlefs
    git-subtree-split: 3f31c8c
    geky committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    3778759 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ee52d6d View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2017

  1. Squashed 'littlefs/' changes from 3f31c8c..78c79ec

    78c79ec Added QUIET flag to tests so CI is readable
    f9f4f5c Fixed standard name mismatch LFS_ERR_EXISTS -> LFS_ERR_EXIST
    843e3c6 Added sticky-bit for preventing file syncs after write errors
    2612e1b Modified lfs_ctz_extend to be a little bit safer
    6664723 Fixed issue with committing directories to bad-blocks that are stuck
    
    git-subtree-dir: littlefs
    git-subtree-split: 78c79ec
    geky committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    0f4e334 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f8d0d6 View commit details
    Browse the repository at this point in the history
  3. Fixed memory leak when files/dirs error

    Error path did not clean up after itself correctly
    geky committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    7eaf61c View commit details
    Browse the repository at this point in the history
  4. Add filesystem recovery tests

    Add tests for filesystem resilience and wear leveling. These tests
    take shared filesystem code and simulate different scenarios while
    this code is running. Information on the new tests can be found below.
    
    mbed-littlefs-tests-filesystem_recovery-resilience:
    Tests that after every block device operation the filesystem is in a
    well defined state.
    
    mbed-littlefs-tests-filesystem_recovery-wear_leveling:
    Tests that the littlefs correctly handles when flash is exhausted by
    using a simulated block device until there are no free good blocks.
    
    Note - This patch also adds several new block devices for testing.
    These will eventually be moved into mbed-os.
    c1728p9 committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    bb155ad View commit details
    Browse the repository at this point in the history
  5. Add unexpected reset test

    Add a test which repeatedly resets a device and then checks that the
    filesystem is still valid using real hardware.
    c1728p9 committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    2d374ce View commit details
    Browse the repository at this point in the history
  6. Merge pull request ARMmbed#9 from c1728p9/resilience_and_wear_leveling

    Add filesystem recovery tests
    geky committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    3bdb80f View commit details
    Browse the repository at this point in the history
  7. Renamed "parallel" tests to "intersperesed"

    The parallel name was incorrect. These tests do not involve mutliple
    threads, but rather write to multiple files an in interspersed manner
    sequentially.
    geky committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    5afec68 View commit details
    Browse the repository at this point in the history

Commits on Nov 18, 2017

  1. Added test configuration support for block devices

    Defaulted to HeapBlockDevice. Unfortunately this does mean that
    by default almost none of the tests are actually capable of running
    unless the dut has >512KB or RAM.
    geky committed Nov 18, 2017
    Configuration menu
    Copy the full SHA
    3c9f2be View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2017

  1. Configuration menu
    Copy the full SHA
    9b79136 View commit details
    Browse the repository at this point in the history
  2. Squashed 'littlefs/' changes from 78c79ec..996cd8a

    996cd8a Revisited documentation
    
    git-subtree-dir: littlefs
    git-subtree-split: 996cd8a
    geky committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    0a19746 View commit details
    Browse the repository at this point in the history
  3. Updated documentation to match other info around littlefs

    Mostly brought from documentation changes in the core repo
    geky committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    8d336f2 View commit details
    Browse the repository at this point in the history
  4. Update unexpected reset host test for htrun

    Update the key used in the reset host to match the latest version of
    htrun.
    c1728p9 committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    b958997 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2017

  1. Merge pull request ARMmbed#10 from c1728p9/htrun_update

    Update unexpected reset host test for htrun
    geky committed Nov 22, 2017
    Configuration menu
    Copy the full SHA
    fa5e34e View commit details
    Browse the repository at this point in the history
  2. Squashed 'littlefs/' changes from 996cd8a..5ee20e8

    5ee20e8 Fixed pipefail issue that was preventing CI from reporting errors
    bf78b09 Added directory list for synchronizing in flight directories
    e169d06 Removed vestigial function declaration
    
    git-subtree-dir: littlefs
    git-subtree-split: 5ee20e8
    geky committed Nov 22, 2017
    Configuration menu
    Copy the full SHA
    3eb2f38 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ad07da0 View commit details
    Browse the repository at this point in the history
  4. Cleaned up doxygen warnings

    geky committed Nov 22, 2017
    Configuration menu
    Copy the full SHA
    9da2475 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    91a4f44 View commit details
    Browse the repository at this point in the history
  6. Removed warnings about format strings when running littlefs tests

    The difference gcc targets differ with format strings in some odd
    (but not against the rules) ways. Most notable, the uint32_t in
    i386/x86_64 gcc uses %d, whereas on cortex-m gcc uses %ld.
    
    This makes dealing with warnings on code that goes between the two
    rather annoying.
    geky committed Nov 22, 2017
    Configuration menu
    Copy the full SHA
    d02b312 View commit details
    Browse the repository at this point in the history
  7. Add 'features/filesystem/littlefs/' from commit 'd02b3122f006aa201bca…

    …4efc699bae40971e5a00'
    
    git-subtree-dir: features/filesystem/littlefs
    git-subtree-mainline: b025ea1
    git-subtree-split: d02b312
    geky committed Nov 22, 2017
    Configuration menu
    Copy the full SHA
    314995f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9bc4ea6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4adf75c View commit details
    Browse the repository at this point in the history
  10. littlefs: Integrated littlefs's .travis.yml into mbed OS

    Also cleaned up the central .travis.yml to better support
    similar local testing in Travis CI
    geky committed Nov 22, 2017
    Configuration menu
    Copy the full SHA
    ea0fee0 View commit details
    Browse the repository at this point in the history
  11. littlefs: Increased test timeout to 4 minutes

    Unfortunately there are several issues colluding to force the timeout
    this high.
    
    1. The tests push littlefs to the limits of how many errors it can
    handle before failing. As a side effect this causes a massive amount
    of debug/warn/error logging about the situation.
    
    2. The logging can't be turned off for specific tests. Note: This might
    change with the introduction of test-configs.
    
    3. Logging is fixed to a baud rate of 9600. Previous testing was carried
    out with a baud rate of 115200, which is the reason for the original
    timeout.
    geky committed Nov 22, 2017
    Configuration menu
    Copy the full SHA
    2cf4715 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2017

  1. Configuration menu
    Copy the full SHA
    b52575b View commit details
    Browse the repository at this point in the history
  2. Added test config for simulated block devices

    Not all devices have enough heap to fit a simulated heap block device,
    however using a simulated heap block device is preferred if available
    (reduced flash wear, faster testing).
    
    Added MBED_TEST_SIM_BLOCKDEVICE for tests that only need a simulated
    block device (wear_leveling + resilience), and added support for targets
    that are known to have enough heap.
    geky committed Nov 28, 2017
    Configuration menu
    Copy the full SHA
    47684d8 View commit details
    Browse the repository at this point in the history
  3. Separated out logical Travis jobs

    Combination of mbed 2 builds (~40 minutes), littlefs testing (~15
    minutes), and miscellaneous testing pushed the current CI over
    Travis's limit of 1 hour per job.
    
    However, by using Travis's matrix includes, we can spin up different
    jobs for the various logical components being tested.
    geky committed Nov 28, 2017
    Configuration menu
    Copy the full SHA
    ff25681 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2017

  1. Copy edit littlefs

    ExhaustibleBlockDevice.h
    - Fix typos for consistent spelling.
    ObservingBlockDevice.h
    - Fix typos for consistent spelling.
    ReadOnlyBlockDevice.h
    - Fix typos for consistent spelling.
    README.md
    - Fix typos, mostly for branding.
    DESIGN.md
    - Make minor changes for consistent spelling and precise language.
    SPEC.md
    - Make minor changes for consistent spelling and precise language.
    README.md
    - Make minor changes for consistent spelling and precise language.
    Amanda Butler authored and geky committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    634fcf0 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2017

  1. Configuration menu
    Copy the full SHA
    c613030 View commit details
    Browse the repository at this point in the history