Skip to content

[DO NOT MERGE] Power-cut Test#7274

Open
gidori98 wants to merge 11 commits intoSamsung:masterfrom
gidori98:pr7184
Open

[DO NOT MERGE] Power-cut Test#7274
gidori98 wants to merge 11 commits intoSamsung:masterfrom
gidori98:pr7184

Conversation

@gidori98
Copy link
Copy Markdown
Contributor

No description provided.

singh-aditya-04 and others added 11 commits January 29, 2026 14:25
Add support to littlefs VFS layer to choose the driver based on
INODE. For MTD driver select the MTD defined functions otherwise
use block device.
Register dhara as block driver on top of MTD device.
This block device is used to mount littlfs on /mnt.
Dhara documentation shows that in case of successful read 0 should
be returned. But current TizeRT code returns numnber of read.
These changes modifies the format_filesystem function to add support for
formatting LittleFS over Dhara (MTD-based filesystem)
in addition to the existing block device formatting capabilities.
autoformat not working in case mount fails.
memory corruption due to wrong assignment for dhara.
causing corruption of dhara structure.
in case nand erase encounter bad block, return eagain and continue erasing other blocks.
Also fix return for nand_bread
Two changes are done for this to sync the behaviour between Dhara and littleFS
1) We change littlefs_blocksize from fs->geo.erasesize (128 KB) to fs->geo.blocksize(2 KB).
2) As we are reserving some sectors (pages) for dhara inside files
os/fs/driver/mtd/dhara/journal.c and os/fs/driver/mtd/dhara/map.c so
we are going to give total pages - reserved pages as available blocks
to Littlefs.

Signed-off-by: Aditya Singh <aditya.s4@samsung.com>
Signed-off-by: Aashish Lakhwara <aashish.l@samsung.com>
We have varified dhara itself manages bad block checking
so we do not need mtd to manage bad block checking as
it increases flash read operations.

Signed-off-by: Aditya Singh <aditya.s4@samsung.com>
Signed-off-by: Aashish Lakhwara <aashish.l@samsung.com>
A Metadata Cache based on Most Recently Used Metadata Page
has been implemented inside file dhara.c that can be useful
for faster page reads.

Signed-off-by: Aditya Singh <aditya.s4@samsung.com>
Signed-off-by: Aashish Lakhwara <aashish.l@samsung.com>w
@gidori98 gidori98 changed the title Pr7184 Power-cut Test Apr 16, 2026
@gidori98 gidori98 changed the title Power-cut Test [DO NOT MERGE] Power-cut Test Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants