Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f6c26c9
perf: replace the annoyed ext4 crate with a new choice (called anothe…
SMS-Derfflinger Jul 23, 2025
f050373
feat(fs): impl write, create and mkdir for ext4 fs
SMS-Derfflinger Jul 25, 2025
d59a550
feat(fs): impl remove file and dir.
SMS-Derfflinger Jul 26, 2025
5c40166
fix(fs): fix some informations
SMS-Derfflinger Jul 26, 2025
1d1a025
feat(fs): impl rename
SMS-Derfflinger Jul 29, 2025
22458ed
fix(fs): fix rename's metadata
SMS-Derfflinger Jul 29, 2025
806c4fe
fix(fs): fix ext4's write offset update
SMS-Derfflinger Jul 31, 2025
46f3a90
feat(syscall): impl copy_file_range's base function
SMS-Derfflinger Jul 31, 2025
e157761
feat(syscall): impl copy_file_range's boundary case check, and add ex…
SMS-Derfflinger Jul 31, 2025
86561a1
feat(syscall): impl copy_file_range's complete functions, can pass os…
SMS-Derfflinger Jul 31, 2025
10df512
feat(syscall): add some syscall's temporary implement
SMS-Derfflinger Jul 31, 2025
dded5e1
style(syscall): update copy file range syscall
SMS-Derfflinger Aug 2, 2025
2fedf6d
feat(syscall): impl splice syscall for comp test
SMS-Derfflinger Aug 2, 2025
ab85423
refactor(syscall): refactor copy_file_range and splice syscall
SMS-Derfflinger Aug 2, 2025
082c5c5
Merge branch 'master' into ext4-replace
SMS-Derfflinger Aug 3, 2025
db1caeb
feat(fs): partial work for ext4's page cache
SMS-Derfflinger Aug 4, 2025
a2c50b9
feat(fs): temporary cache write back strategy for ext4
SMS-Derfflinger Aug 5, 2025
bff5334
Merge branch 'ext4-replace' into oscomp-final
SMS-Derfflinger Aug 5, 2025
ffbd955
fix(fs): fix ext4's truncate cache update
SMS-Derfflinger Aug 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ itertools = { version = "0.13.0", default-features = false }
acpi = "5.2.0"
align_ext = "0.1.0"
xmas-elf = "0.10.0"
ext4_rs = "1.3.2"
another_ext4 = { git = "https://github.com/SMS-Derfflinger/another_ext4", branch = "main" }

[target.'cfg(any(target_arch = "riscv64", target_arch = "loongarch64"))'.dependencies]
virtio-drivers = { version = "0.11.0" }
Expand Down
18 changes: 17 additions & 1 deletion src/driver/virtio/virtio_blk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,23 @@ where

fn submit(&self, req: BlockDeviceRequest) -> KResult<()> {
match req {
BlockDeviceRequest::Write { .. } => todo!(),
BlockDeviceRequest::Write {
sector,
count,
buffer,
} => {
let mut dev = self.lock();
for ((start, len), buffer_page) in
Chunks::new(sector as usize, count as usize, 8).zip(buffer.iter())
{
let buffer = unsafe {
// SAFETY: Pages in `req.buffer` are guaranteed to be exclusively owned by us.
&buffer_page.as_memblk().as_bytes()[..len as usize * 512]
};

dev.write_blocks(start, buffer).map_err(|_| EIO)?;
}
}
BlockDeviceRequest::Read {
sector,
count,
Expand Down
Loading
Loading