code: private Pair<Boolean, BlockStoreLocation> requestSpaceInternal(long blockId, long additionalBytes)
        throws BlockDoesNotExistException {
      // NOTE: a temp block is supposed to be visible for its own writer, unnecessary to acquire
      // block lock here since no sharing
      try (LockResource r = new LockResource(mMetadataWriteLock)) {
        TempBlockMeta tempBlockMeta = mMetaManager.getTempBlockMeta(blockId);
        if (tempBlockMeta.getParentDir().getAvailableBytes() < additionalBytes) {
          return new Pair<>(false, tempBlockMeta.getBlockLocation());
        }
        // Increase the size of this temp block
        try {
          mMetaManager.resizeTempBlockMeta(tempBlockMeta,
              tempBlockMeta.getBlockSize() + additionalBytes);
        } catch (InvalidWorkerStateException e) {
          throw Throwables.propagate(e); // we shall never reach here
        }
        return new Pair<>(true, null);
      }
    }
docs: Increases the temp block size only if this temp block's parent dir has enough available space.
  
  @param blockId block id
  @param additionalBytes additional bytes to request for this block
  @return a pair of boolean and {@link BlockStoreLocation}. The boolean indicates if the
  operation succeeds and the {@link BlockStoreLocation} denotes where to free more space
  if it fails.
  @throws BlockDoesNotExistException if this block is not found