Remove unused code.

This commit is contained in:
Yifan Wu 2021-03-04 08:42:47 +08:00
parent a589179adc
commit 230e4442d0
2 changed files with 0 additions and 22 deletions

View File

@ -119,12 +119,6 @@ impl EasyFileSystem {
) )
} }
/*
fn get_super_block(&self) -> Dirty<SuperBlock> {
Dirty::new(0, 0, self.block_device.clone())
}
*/
pub fn get_disk_inode_pos(&self, inode_id: u32) -> (u32, usize) { pub fn get_disk_inode_pos(&self, inode_id: u32) -> (u32, usize) {
let inode_size = core::mem::size_of::<DiskInode>(); let inode_size = core::mem::size_of::<DiskInode>();
let inodes_per_block = (BLOCK_SZ / inode_size) as u32; let inodes_per_block = (BLOCK_SZ / inode_size) as u32;
@ -136,16 +130,6 @@ impl EasyFileSystem {
self.data_area_start_block + data_block_id self.data_area_start_block + data_block_id
} }
/*
fn get_block(&self, block_id: u32) -> Dirty<DataBlock> {
Dirty::new(
block_id as usize,
0,
self.block_device.clone(),
)
}
*/
pub fn alloc_inode(&mut self) -> u32 { pub fn alloc_inode(&mut self) -> u32 {
self.inode_bitmap.alloc(&self.block_device).unwrap() as u32 self.inode_bitmap.alloc(&self.block_device).unwrap() as u32
} }

View File

@ -48,12 +48,6 @@ impl Inode {
).lock().modify(self.block_offset, f) ).lock().modify(self.block_offset, f)
} }
/*
fn get_disk_inode(&self, fs: &mut MutexGuard<EasyFileSystem>) -> Dirty<DiskInode> {
fs.get_disk_inode(self.inode_id)
}
*/
fn find_inode_id( fn find_inode_id(
&self, &self,
name: &str, name: &str,