fix:Fixes the "Block is free" issue when using the rsext4 file system.#368
Open
Dirinkbottle wants to merge 5 commits intoarceos-hypervisor:masterfrom
Open
fix:Fixes the "Block is free" issue when using the rsext4 file system.#368Dirinkbottle wants to merge 5 commits intoarceos-hypervisor:masterfrom
Dirinkbottle wants to merge 5 commits intoarceos-hypervisor:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.rsaccess layer of rsext4, callsync_to_diskfunction for all write operations to ensure timely synchronization, even if it results in some performance loss.