Skip to content

fix:Fixes the "Block is free" issue when using the rsext4 file system.#368

Open
Dirinkbottle wants to merge 5 commits intoarceos-hypervisor:masterfrom
Dirinkbottle:fix/rsext4-journal-playback
Open

fix:Fixes the "Block is free" issue when using the rsext4 file system.#368
Dirinkbottle wants to merge 5 commits intoarceos-hypervisor:masterfrom
Dirinkbottle:fix/rsext4-journal-playback

Conversation

@Dirinkbottle
Copy link
Contributor

Problem

After a client machine performs a file write operation and restarts, a "block is free" error occurs.

Analysis:

rsext4 is designed with multi-level caching to improve runtime speed. However, currently, Axvisor does not perform any data synchronization during rsext4 integration.
This means that if the machine modifies a file and shuts down immediately, the cache remains in memory, inevitably leading to hard drive failure.

Solution:

In the ext4fs.rs access layer of rsext4, call sync_to_disk function for all write operations to ensure timely synchronization, even if it results in some performance loss.

The previous rsext4 version (dev-251222) had a bug where mount() reads
superblock and group descriptors before journal_replay(), but never
reloads them after replay. This causes in-memory metadata to be stale,
leading to incorrect block allocation and data corruption (TEE htree
authenc_decrypt_final error 0xFFFF3071) after system restart.

Updated rsext4 to main branch which includes the fix.
…arting a guest machine using the rsext4 filesystem.

Problem: After a client machine performs a file write operation and restarts, a "block is free" error occurs.
Analysis: 1. rsext4 is designed with multi-level caching to improve runtime speed. However, currently, Axvisor does not perform any data synchronization during rsext4 integration.
This means that if the machine modifies a file and shuts down immediately, the cache remains in memory, inevitably leading to hard drive failure.
Solution: In the ext4fs access layer of rsext4, call `sync_to_disk` for all write operations to ensure timely synchronization, even if it results in some performance loss.
@Dirinkbottle Dirinkbottle changed the title Fixes the "Block is ree" issue when using the rsext4 file system. Fixes the "Block is free" issue when using the rsext4 file system. Feb 13, 2026
@Dirinkbottle Dirinkbottle changed the title Fixes the "Block is free" issue when using the rsext4 file system. fix:Fixes the "Block is free" issue when using the rsext4 file system. Feb 13, 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.

1 participant