Commit Graph
18 Commits
Author SHA1 Message Date
Frédéric DesbiensandCopilot b9f54b87bb Updated version number constants (#74)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-04 17:12:31 -04:00
Frédéric DesbiensandCopilot 2e061ba319 Added a release preparation script (#73)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-04 17:11:35 -04:00
Frédéric DesbiensandCopilot bfb39676df Added opt-in lazy sector release to reduce O(N²) deletion (issue #70) (#71)
WARNING: This feature is brand new and has not been tested beyond the
existing regression suite.  It should be thoroughly tested — including
stress, power-loss, and wear-levelling scenarios — before being used in
any production system.

When LX_NAND_FLASH_ENABLE_LAZY_SECTOR_RELEASE is defined and free blocks
exceed LX_NAND_FLASH_SECTOR_RELEASE_LAZY_THRESHOLD (default 10), releasing
a sector from a full block defers the copy+erase.  A tombstone page is
written to a freshly-allocated block; the old full block is flagged
COMPACTION_PENDING in its block status and recorded in a new per-LG
compaction table.  Compaction (merge + erase) is triggered lazily:

  * sector_write: before writing to a full block with a pending source
  * block_data_move: intercepts wear-levelling moves for pending LGs
  * defragment: iterates all pending LGs (now actually implemented)
  * block_allocate: emergency compaction when the free list is empty

Reads transparently fall back to the compaction-pending block when the
primary block does not contain the requested sector.

Crash recovery is handled in open_extended:
  - Phase 1: detects COMPACTION_PENDING blocks and either clears the flag
    (crash before mapping update — abort) or rebuilds compaction_table
    (crash after mapping update — resume deferred compaction).
  - Phase 2: erases orphaned ALLOCATED blocks not present in any mapping.

Without the flag, all paths remain unchanged and defragment returns
LX_NOT_SUPPORTED as before.

Fixes: https://github.com/eclipse-threadx/levelx/issues/70

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-02 11:25:12 -04:00
Frédéric Desbiens a46b74fb8a Merge pull request #69 from eclipse-threadx/dev
Merge changes ahead of the v6.5.0.202601 release
2026-03-06 19:43:03 +01:00
Frédéric Desbiens b80f28e0e6 Merge pull request #68 from fdesbiens/dev
Updated copyright headers and version number constants
2026-03-05 09:39:50 +01:00
Frédéric Desbiens f98a5c4eb8 Updated version number constants. 2026-03-05 09:23:24 +01:00
Frédéric Desbiens b9ba4a97bf Updated copyright headers and removed trailing whitespace 2026-03-05 09:17:20 +01:00
Frédéric Desbiens fa1a8e5ff4 Merge pull request #65 from borlandong/fix-performance-issue
Updated the logic to skip unnecessary main data read in _lx_nand_flash_sector_read
2026-02-17 11:38:13 -05:00
Frédéric Desbiens 89c745fcf5 Merge pull request #66 from rahmanih/update_nand_simulator
Updated the nand flash simulator
2026-02-17 11:36:36 -05:00
Frédéric Desbiens 1751446fb0 Merge pull request #63 from eclipse-threadx/dev
Merge changes ahead of the 202504 release
2026-01-12 18:05:43 -05:00
Frédéric Desbiens c27eb52bd2 Updated version number constants 2026-01-12 18:01:37 -05:00
Frédéric Desbiens c03223909a Merge pull request #62 from rahmanih/fix_nor_flash_format
Fix: force initial erase count to 1
2026-01-12 17:55:06 -05:00
Frédéric Desbiens 6a534bed34 Update minimal CMake version in CMakeLists.txt to 3.13 2025-11-25 10:48:08 -05:00
Frédéric Desbiens 4585b92f15 Update minimal CMake version in CMakeLists.txt to 3.13 2025-11-25 10:45:08 -05:00
Frédéric Desbiens 63ed12cfd6 Merge pull request #60 from rahmanih/add_new_level_apis_pr
New APIs:
- lx_nor_flash_format(): setup the NOR Flash for a new and fresh filesystem.
- lx_nor_flash_open_extended(): adds a user data pointer that could be passed to the underlying low-level NOR driver.
-  lx_nand_flash_open_extended(): adds a user data pointer that could be passed to the underlying low-level NAND driver.

Updated APIs:
- lx_nor_flash_open(): call the lx_nor_flash_open_extended() with a NULL as user data pointer.
- lx_nand_flash_open(): call the lx_nand_flash_open_extended() with a NULL as user data pointer.
2025-11-25 10:40:13 -05:00
Frédéric Desbiens a1761869fd Merge pull request #59 from rahmanih/fix_issue_58
fix: "array out of bounds" error leading to memory corruption
2025-11-25 10:09:17 -05:00
Frédéric Desbiens 5783f64fe1 Merge pull request #61 from rahmanih/fix_issue_53
fix: Wrong out-of-range check in lx_nand_flash_block_find.
2025-11-25 09:59:41 -05:00
Frédéric Desbiens 04e385f3d5 Merge pull request #50 from ayedm1/fix_levelx_github_action_job
fix github levelx regression test action issue
2024-12-12 17:31:11 +01:00