code: private Block allocateBlock(String src, INode[] inodes) throws IOException {
      Block b = new Block(generateBlockId(), 0, 0);
      while (isValidBlock(b)) {
        b.setBlockId(generateBlockId());
      }
      b.setGenerationStamp(getGenerationStamp());
      b = dir.addBlock(src, inodes, b);
      return b;
    }
docs: Allocate a block at the given pending filename
  
  @param src    path to the file
  @param inodes INode representing each of the components of src.
  <code>inodes[inodes.length-1]</code> is the INode for the file.