File createReserveFile(long sizeInBytes, File dir) throws IOException {
    File fileSizeDir = prepareDirectory(new File(dir, FILE_SIZE_DIR_PREFIX + sizeInBytes));
    File reserveFile;
    do {
      reserveFile = new File(fileSizeDir, generateFilename());
    } while (!reserveFile.createNewFile());
    Utils.preAllocateFileIfNeeded(reserveFile, sizeInBytes);
    return reserveFile;
  }
Create and preallocate (if supported) a reserve file of the specified size.
@param sizeInBytes the size to preallocate for the reserve file.
@return the created file.
@throws IOException if the file could not be created, or if an error occurred during the fallocate call.
ambry-store/src/main/java/com/github/ambry/store/DiskSpaceAllocator.java