fn bmap_or_alloc(&mut self, inode: &mut Inode, blockno: u32) -> Result<u32, FsError> {
        let addr = inode.blocks[blockno as usize];
        if addr == UNUSED_BLOCKADDR {
            inode.blocks[blockno as usize] = self.alloc_block(inode.device)?;
        }
        Ok(inode.blocks[blockno as usize])
    }
/// Maps sequential block of file into a disk block address, or allocates one if the block
/// isn't mapped
Maps sequential block of file into a disk block address, or allocates one if the block
isn't mapped
Maps sequential block of file into a disk block address or allocates one if the block isn ' t mapped
fn bmap_or_alloc(&mut self, inode: &mut Inode, blockno: u32) -> Result<u32, FsError> {
        let addr = inode.blocks[blockno as usize];
        if addr == UNUSED_BLOCKADDR {
            inode.blocks[blockno as usize] = self.alloc_block(inode.device)?;
        }
        Ok(inode.blocks[blockno as usize])
    }
fn bmap_or_alloc ( & mut self , inode : & mut Inode , blockno : u32 ) -> Result < u32 , FsError > { let addr = inode . blocks [ blockno as usize ] ; if addr == UNUSED_BLOCKADDR { inode . blocks [ blockno as usize ] = self . alloc_block ( inode . device ) ? ; } Ok ( inode . blocks [ blockno as usize ] ) }
Maps sequential block of file into a disk block address, or allocates one if the block
isn't mapped
Maps sequential block of file into a disk block address or allocates one if the block isn ' t mapped
&mut self
inode
&mut Inode
blockno
u32
&mut self
inode
&mut Inode
blockno
u32