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

Add lfs_fs_gc to enable proactive finding of free blocks #875

Merged
merged 5 commits into from
Sep 21, 2023
Merged

Add lfs_fs_gc to enable proactive finding of free blocks #875

merged 5 commits into from
Sep 21, 2023

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    b637379 View commit details
    Browse the repository at this point in the history
  2. Move lookahead buffer offset at the first free block if such block do…

    …esn't exist move it for whole lookahead size.
    ondrapCZE authored and geky committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    d85a0fe View commit details
    Browse the repository at this point in the history
  3. Added API boilerplate for lfs_fs_findfreeblocks and consistent style

    This adds the tracing and optional locking for the littlefs API.
    
    Also updated to match the code style, and added LFS_READONLY guards
    where necessary.
    geky committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    dbe4598 View commit details
    Browse the repository at this point in the history
  4. Extended alloc tests to test some properties of lfs_fs_findfreeblocks

    - Test that the code actually runs.
    
    - Test that lfs_fs_findfreeblocks does not break block allocations.
    
    - Test that lfs_fs_findfreeblocks does not error when no space is
      available, it should only errors when the block is actually needed.
    geky committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    63e4408 View commit details
    Browse the repository at this point in the history
  5. Renamed lfs_fs_findfreeblocks -> lfs_fs_gc, tweaked documentation

    The idea is in the future this function may be extended to support other
    block janitorial work. In such a case calling this lfs_fs_gc provides a
    more general name that can include other operations.
    
    This is currently just wishful thinking, however.
    geky committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    6b33ee5 View commit details
    Browse the repository at this point in the history