Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d0c4104
refactor: replace ext4_rs with ext4plus
muou000 Jun 23, 2026
eb83b23
docs: update records
muou000 Jun 23, 2026
7fea774
fix: Optimize mount registry lock handling and fix sorting reflexivity
muou000 Jun 23, 2026
cc99953
fix: use origin version of ext4plus
muou000 Jun 24, 2026
39e890b
feat: improve sync safety, fix futex deadlocks, refine ext4/tmpfs unl…
muou000 Jun 25, 2026
9c046c7
fix: optimize I/O performance via contiguous block coalescing and mul…
muou000 Jun 25, 2026
07a0df4
fix: fix block size initialization order and cache corruption
muou000 Jun 25, 2026
0400ed3
fix: propagate ext4 I/O errors and correct dirty flag clearing in flu…
muou000 Jun 25, 2026
0e22e79
feat(tmpfs): reject overwriting non-empty directory on rename
muou000 Jun 25, 2026
365fbbb
fix: prevent directory entry insertion from overwriting metadata chec…
muou000 Jun 25, 2026
5f07866
fix: zero allocated blocks on write and add rollback logic
muou000 Jun 25, 2026
539e694
fix: fix the issues in PR comments
muou000 Jun 25, 2026
ac35717
fix(ext4plus): resolve block map, write error representation, and ext…
muou000 Jun 25, 2026
ac50160
fix(ext4plus): defer link count persistence in dir operations
muou000 Jun 25, 2026
2db1ebc
fix: defer unlinked file deletion to a queue to prevent Inode::drop d…
muou000 Jun 25, 2026
591f857
fix: fix the locking, cache eviction, and self-tests
muou000 Jun 25, 2026
186439f
fix(axfs/ext4): re-enqueue failed deletions in process_pending_deletions
muou000 Jun 25, 2026
07b8137
fix(axfs/ext4): prevent race condition on active_inodes cleanup
muou000 Jun 25, 2026
44969ae
feat(axsync): implement writer-preferential reader-writer lock
muou000 Jun 25, 2026
1314486
fix: remove the check of journal, recovery and checksums features
muou000 Jun 27, 2026
3857581
perf(axfs): optimize ext4 read cache hit path to avoid cloning
muou000 Jun 27, 2026
39b00f0
fix(fs): address review comments on block IO spinlock, MutexGuard sim…
muou000 Jun 27, 2026
067ba7c
fix: adjust the log level
muou000 Jun 27, 2026
f26e0a0
fix(ext4): address second batch of review comments on TOCTOU, fs_id, …
muou000 Jun 27, 2026
7ce9107
fix(ext4): address third batch of review comments on cursor, magic nu…
muou000 Jun 27, 2026
d33c343
fix(vfs): resolve disk race condition and tmpfs memory leak circular …
muou000 Jun 27, 2026
df218d2
fix(axfs): fix block cache eviction race, seekable disk concurrency, …
muou000 Jun 27, 2026
458b720
fix(vmm, syscall): prevent unmanaged physical frame panic and resolve…
muou000 Jun 27, 2026
2993624
fix(ext4): avoid deadlock risk in read/write cache operations
muou000 Jun 27, 2026
2f513e5
fix(axmm): revert page table locks back to spin::Mutex and remove ker…
muou000 Jun 27, 2026
b1a745a
fix(fs, vfs): revert filesystem and vfs locks back to spin::Mutex
muou000 Jun 27, 2026
af12dbb
fix(fs,mm): address deadlock, cycle, and refcount tracking issues in …
muou000 Jun 27, 2026
31f292a
fix(tmpfs): reject '.' and '..' in rename path and update configs
muou000 Jun 27, 2026
ea503cd
fix(axfs): simplify seekable disk locking and avoid reading flushing …
muou000 Jun 27, 2026
81e1d16
fix(axfs): resolve race condition in ext4 block cache eviction
muou000 Jun 27, 2026
d8e63eb
feat(axsync, axfs): address PR review comments for RwLock APIs and ex…
muou000 Jun 27, 2026
448185a
fix(axfs): store strong root DirEntry in TmpFilesystem
muou000 Jun 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
122 changes: 113 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]

exclude = ["arceos", "crates/axconfig-gen"]
exclude = ["arceos", "crates/axconfig-gen", "crates/ext4plus"]
members = ["pulse_core", "pulse_syscalls"]

[workspace.package]
Expand Down Expand Up @@ -71,7 +71,6 @@ axsched = { path = "crates/axsched" }
memory_set = { path = "crates/memory_set" }
memory_addr = { path = "crates/memory_addr" }
axfs-ng-vfs = { path = "crates/axfs-ng-vfs" }
ext4_rs = { path = "crates/ext4_rs" }
axcpu = { path = "crates/axcpu" }
axplat-loongarch64-qemu-virt = { path = "crates/axplat-loongarch64-qemu-virt" }
axplat-riscv64-qemu-virt = { path = "crates/axplat-riscv64-qemu-virt" }
Expand Down
1 change: 0 additions & 1 deletion arceos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ axsched = { path = "../crates/axsched" }
memory_set = { path = "../crates/memory_set" }
memory_addr = { path = "../crates/memory_addr" }
axfs-ng-vfs = { path = "../crates/axfs-ng-vfs" }
ext4_rs = { path = "../crates/ext4_rs" }
axcpu = { path = "../crates/axcpu" }
axplat-loongarch64-qemu-virt = { path = "../crates/axplat-loongarch64-qemu-virt" }
axplat-riscv64-qemu-virt = { path = "../crates/axplat-riscv64-qemu-virt" }
Expand Down
7 changes: 4 additions & 3 deletions arceos/modules/axfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ homepage.workspace = true
default = ["ext4"]
use-ramdisk = [] # TODO: init ramdisk
fat = ["dep:fatfs"]
ext4 = ["dep:ext4_rs"]
ext4 = ["dep:ext4plus"]
times = []
std = []

Expand All @@ -38,9 +38,10 @@ scope-local = { workspace = true }
slab = { version = "0.4.9", default-features = false }
spin = { workspace = true }

[dependencies.ext4_rs]
version = "1.3.3"
[dependencies.ext4plus]
path = "../../../crates/ext4plus"
default-features = false
features = ["sync", "multi-threaded"]
optional = true

[dependencies.fatfs]
Expand Down
23 changes: 11 additions & 12 deletions arceos/modules/axfs/src/disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use alloc::{
use core::mem;

use axdriver::{AxBlockDevice, prelude::*};
use spin::Mutex;
use kspin::SpinNoIrq as Mutex;

fn take<'a>(buf: &mut &'a [u8], cnt: usize) -> &'a [u8] {
let (first, rem) = buf.split_at(cnt);
Expand Down Expand Up @@ -124,15 +124,14 @@ pub static DISK_FLUSHERS: spin::Lazy<Mutex<alloc::vec::Vec<alloc::sync::Weak<dyn

/// Flushes all registered disks.
pub fn flush_all_disks() -> DevResult<()> {
let mut flushers = DISK_FLUSHERS.lock();
flushers.retain(|weak| {
if let Some(flusher) = weak.upgrade() {
let _ = flusher.flush_disk();
true
} else {
false
}
});
let flushers: alloc::vec::Vec<Arc<dyn DiskFlushable>> = {
let mut guard = DISK_FLUSHERS.lock();
guard.retain(|weak| weak.strong_count() > 0);
guard.iter().filter_map(|weak| weak.upgrade()).collect()
};
Comment thread
muou000 marked this conversation as resolved.
for flusher in flushers {
flusher.flush_disk()?;
}
Comment thread
muou000 marked this conversation as resolved.
Ok(())
}

Expand Down Expand Up @@ -278,10 +277,10 @@ impl<D: BlockDriverOps + 'static> SeekableDisk<D> {
if buf.len() >= self.block_size() {
let blocks = buf.len() >> self.block_size_log2;
let length = blocks << self.block_size_log2;
self.dev.lock().write_block(self.inner.lock().block_id, take(&mut buf, length))?;
let mut inner = self.inner.lock();
self.dev.lock().write_block(inner.block_id, take(&mut buf, length))?;
written += length;

let mut inner = self.inner.lock();
inner.block_id += blocks as u64;
Comment thread
muou000 marked this conversation as resolved.
}
if !buf.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion arceos/modules/axfs/src/fs/devfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use axfs_ng_vfs::{
use axpoll::{IoEvents, Pollable};
use rand_core::{Rng, SeedableRng};
use rand_pcg::Pcg64Mcg;
use spin::Mutex;
use kspin::SpinNoIrq as Mutex;

use super::super::disk::{SeekableDisk, SharedBlockDevice};

Expand Down
Loading