bump to 0.1.0-alpha.5

This commit is contained in:
Ashwin Naren
2026-03-11 00:32:33 -07:00
parent 136fb16275
commit 654b31efc6
3 changed files with 21 additions and 20 deletions

4
Cargo.lock generated
View File

@@ -256,9 +256,9 @@ dependencies = [
[[package]]
name = "ext4plus"
version = "0.1.0-alpha.4"
version = "0.1.0-alpha.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d4c717f942d8f2d0ba620e17afac4fd8c2c9ad315ca205d652bcd4c0503ed1b"
checksum = "866bc656467be17c403c70ab35ccb0f3294a7aaa6425c879b63d6aa878e3ffab"
dependencies = [
"async-trait",
"bitflags 2.11.0",

View File

@@ -6,7 +6,7 @@ edition = "2024"
[dependencies]
async-trait = { workspace = true }
bitflags = { workspace = true }
ext4plus = { version = "0.1.0-alpha.4" }
ext4plus = "0.1.0-alpha.5"
intrusive-collections = { version = "0.10.0", default-features = false }
log = { workspace = true }
object = { version = "0.38.0", default-features = false, features = ["core", "elf", "read_core"] }

View File

@@ -31,9 +31,10 @@ use core::marker::PhantomData;
use core::num::NonZeroU32;
use core::ops::{Deref, DerefMut};
use core::time::Duration;
use ext4plus::{
AsyncIterator, AsyncSkip, Dir, DirEntryName, Ext4, Ext4Read, Ext4Write, File, FollowSymlinks,
InodeCreationOptions, InodeFlags, InodeMode, Metadata, ReadDir, write_at,
use ext4plus::prelude::{
AsyncIterator, AsyncSkip, Dir, DirEntryName, Ext4, Ext4Error, Ext4Read, Ext4Write, File,
FollowSymlinks, Inode as ExtInode, InodeCreationOptions, InodeFlags, InodeMode, Metadata,
PathBuf as ExtPathBuf, ReadDir, write_at,
};
use log::error;
@@ -59,13 +60,13 @@ impl Ext4Write for BlockBuffer {
}
}
impl From<ext4plus::Ext4Error> for KernelError {
fn from(err: ext4plus::Ext4Error) -> Self {
impl From<Ext4Error> for KernelError {
fn from(err: Ext4Error) -> Self {
match err {
ext4plus::Ext4Error::NotFound => KernelError::Fs(FsError::NotFound),
ext4plus::Ext4Error::NotADirectory => KernelError::Fs(FsError::NotADirectory),
ext4plus::Ext4Error::AlreadyExists => KernelError::Fs(FsError::AlreadyExists),
ext4plus::Ext4Error::Corrupt(c) => {
Ext4Error::NotFound => KernelError::Fs(FsError::NotFound),
Ext4Error::NotADirectory => KernelError::Fs(FsError::NotADirectory),
Ext4Error::AlreadyExists => KernelError::Fs(FsError::AlreadyExists),
Ext4Error::Corrupt(c) => {
error!("Corrupt EXT4 filesystem: {c}, likely a bug");
KernelError::Fs(FsError::InvalidFs)
}
@@ -146,11 +147,11 @@ impl DirStream for ReadDirWrapper {
enum InodeInner {
Regular(File),
Directory(Dir),
Other(ext4plus::Inode),
Other(ExtInode),
}
impl InodeInner {
async fn new(inode: ext4plus::Inode, fs: &Ext4) -> Self {
async fn new(inode: ExtInode, fs: &Ext4) -> Self {
match inode.file_type() {
ext4plus::FileType::Regular => {
InodeInner::Regular(File::open_inode(fs, inode).unwrap())
@@ -164,7 +165,7 @@ impl InodeInner {
}
impl Deref for InodeInner {
type Target = ext4plus::Inode;
type Target = ExtInode;
fn deref(&self) -> &Self::Target {
match self {
@@ -189,7 +190,7 @@ pub struct Ext4Inode<CPU: CpuOps> {
fs_ref: Weak<Ext4Filesystem<CPU>>,
id: NonZeroU32,
inner: Mutex<InodeInner, CPU>,
path: ext4plus::PathBuf,
path: ExtPathBuf,
}
#[async_trait]
@@ -377,7 +378,7 @@ where
if inode.id().fs_id() != fs.id() {
return Err(KernelError::Fs(FsError::CrossDevice));
}
let mut other_inode = ext4plus::Inode::read(
let mut other_inode = ExtInode::read(
&fs.inner,
(inode.id().inode_id() as u32).try_into().unwrap(),
)
@@ -445,7 +446,7 @@ where
let old_parent_id = old_parent.id();
let fs = self.fs_ref.upgrade().unwrap();
let old_parent_inode = ext4plus::Inode::read(
let old_parent_inode = ExtInode::read(
&fs.inner,
(old_parent_id.inode_id() as u32).try_into().unwrap(),
)
@@ -548,7 +549,7 @@ where
.symlink(
inner_dir,
DirEntryName::try_from(name.as_bytes()).unwrap(),
ext4plus::PathBuf::new(target.as_str().as_bytes()),
ExtPathBuf::new(target.as_str().as_bytes()),
0,
0,
Duration::from_secs(0),
@@ -618,7 +619,7 @@ where
fs_ref: self.this.clone(),
id: root.index,
inner: Mutex::new(InodeInner::new(root, &self.inner).await),
path: ext4plus::PathBuf::new("/"),
path: ExtPathBuf::new("/"),
}))
}