apache / apache/mynewt-nffs

NFFS can store a valid file-system instance which is unrecoverable after reset.

Open
#10 18 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
36
Forks
13
PR merge metrics
No merged PRs in 30d

Description

It is possible that during regular filesystem operation filesystem footprint is shaped such that during subsequent NFFS restore operation maximum number of block will be exceeded in peek. This is caused by difference in algorithm which should lead to expected (the same) NFFS runtime variables state.

Proposition for resolution of that is to rework NFFS restore in such manner that will be more sequential process than is now:
* 1st restore inodes to RAM
* 2nd restore valid block to RAM, thanks to that inodes state are known, the maximum block number shouldn’t be exceeded.

It also looks like both scans should be perform by traversing oldest to newest area. Descending solution should be even more effective, but it is not supported by nffs objects on the flash.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the NFFS restore process and the runtime variables used during its inode and block scans. Compare the current scan order with the proposed sequential restore order, and verify that a valid filesystem shaped during regular operation can be restored after reset without exceeding the maximum block number.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.