Add Debug support for some fs components

This commit is contained in:
LI Qing
2023-08-04 12:00:22 +08:00
committed by Tate, Hongliang Tian
parent acfbc7efdc
commit 55267f0d81
10 changed files with 100 additions and 1 deletions

View File

@ -255,6 +255,15 @@ impl Vnode {
}
}
impl Debug for Vnode {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Vnode")
.field("inode", &self.inner.read().inode)
.field("page_cache", &self.inner.read().page_cache)
.finish()
}
}
pub struct VnodeWriter<'a> {
inner: &'a Vnode,
offset: usize,