code: int getBlockIndex(INodeFile inode, Block blk, String file) throws IOException {
      if (inode == null) {
        throw new IOException("inode for file " + file + " is null");
      }
      readLock();
      try {
        return inode.getBlockIndex(blk, file);
      } finally {
        readUnlock();
      }
    }
docs: /*
  Search the given block from the file and return the block index