Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rafs: git rid of several unimplemented() #1166

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions rafs/src/metadata/inode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_mtime,
InodeWrapper::V6(i) => i.i_mtime,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().mtime,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to implement it in other methods like fn gid(&self), fn uid(&self)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could be an following-on optimization:)

}
}

Expand All @@ -357,7 +357,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_mtime_nsec,
InodeWrapper::V6(i) => i.i_mtime_nsec,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().mtimensec,
}
}

Expand All @@ -376,7 +376,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_blocks,
InodeWrapper::V6(i) => i.i_blocks,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().blocks,
}
}

Expand Down Expand Up @@ -424,7 +424,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_nlink,
InodeWrapper::V6(i) => i.i_nlink,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_attr().nlink,
}
}

Expand Down Expand Up @@ -506,7 +506,7 @@ impl InodeWrapper {
match self {
InodeWrapper::V5(i) => i.i_child_index,
InodeWrapper::V6(_i) => u32::MAX,
InodeWrapper::Ref(_i) => unimplemented!(),
InodeWrapper::Ref(i) => i.get_child_index().unwrap_or(u32::MAX),
}
}

Expand Down