fix: ext2 RwLock conversion for ARM64 CI boot test hang #188
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.
Summary
spin::Mutextospin::RwLockto allow concurrent read access (exec, file reads, getdents, stat) while reserving exclusive access for writes (create, truncate, rename, link)sys_opento use read lock for non-modifying opens and write lock only for O_CREAT/O_TRUNCProblem
ARM64 CI boot test hung at stage 125 (
fs_write_test) because the ext2 filesystem used a globalspin::Mutex, forcing all operations to take exclusive access. Under slow QEMU TCG emulation in CI, a writing process holding the mutex blocked all concurrent exec/read/getdents operations, causing 21 stages to fail (163/184 passing).Fix
ROOT_EXT2: Mutex<Option<Ext2Fs>>→RwLock<Option<Ext2Fs>>root_fs()→root_fs_read()(shared) /root_fs_write()(exclusive)Test plan
🤖 Generated with Claude Code