def inode_number_to_block(offset, inode_num): inode = inode_number_to_inode(inode_num) o = offset / blockLayer.get_block_size() b = inode.index_to_block_number(o) return blockLayer.block_number_to_block(b)
def inode_to_block(self, byte_offset): o = byte_offset / blockLayer.get_block_size() b = self.index_to_block_number(o) return blockLayer.block_number_to_block(b)