def imap_lookup(agno, agino)
      ag = get_ag(agno)
      cursor = InodeBtreeCursor.new(@sb, ag.agi, agno, XFS_BTNUM_INO)
      cursor.block_ptr = ag.agblock
      error = inobt_lookup(cursor, agino, XFS_LOOKUP_LE)
      raise "XFS::Superblock.imap_lookup: #{error}" if error
      inode_rec = inode_btree_record(cursor)
      if inode_rec.nil?
        raise "XFS::Superblock.imap_lookup: Error #{cursor.error} getting InodeBtreeRecord for inode #{agino}"
      end
      if inode_rec.start_ino > agino ||
         inode_rec.start_ino + @ialloc_inos <= agino
        raise "XFS::Superblock.imap_lookup: InodeBtreeRecord does not contain required inode #{agino}"
      end
      inode_rec.start_ino
    end
def imap_lookup(agno, agino)
      ag = get_ag(agno)
      cursor = InodeBtreeCursor.new(@sb, ag.agi, agno, XFS_BTNUM_INO)
      cursor.block_ptr = ag.agblock
      error = inobt_lookup(cursor, agino, XFS_LOOKUP_LE)
      raise "XFS::Superblock.imap_lookup: #{error}" if error
      inode_rec = inode_btree_record(cursor)
      if inode_rec.nil?
        raise "XFS::Superblock.imap_lookup: Error #{cursor.error} getting InodeBtreeRecord for inode #{agino}"
      end
      if inode_rec.start_ino > agino ||
         inode_rec.start_ino + @ialloc_inos <= agino
        raise "XFS::Superblock.imap_lookup: InodeBtreeRecord does not contain required inode #{agino}"
      end
      inode_rec.start_ino
    end
initialize