docs: private long reserveLogFileSpace(long reservedDelta)
      {
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.entry(this,
                          cclass,
                          "reserveLogFileSpace",
                          new Object[] { new Long(reservedDelta) });
  
          long stillToReserve = reservedDelta;
          // Pick an arbitrary starting point in the array of sub totals.
          int index = new java.util.Random(Thread.currentThread().hashCode()).nextInt(fileSpaceAvailable.length);
          int startIndex = index;
  
          while (stillToReserve != 0) {
              synchronized (fileSpaceAvailableLock[index]) {
                  if (stillToReserve <= fileSpaceAvailable[index]) {
                      fileSpaceAvailable[index] = fileSpaceAvailable[index] - stillToReserve;
                      stillToReserve = 0;
                  } else {
                      stillToReserve = stillToReserve - fileSpaceAvailable[index];
                      fileSpaceAvailable[index] = 0;
                      // Move on to the next subTotal.
                      index++;
                      if (index == fileSpaceAvailable.length)
                          index = 0;
                      if (index == startIndex)
                          break;
                  } // if (stillToReserve <= fileSpaceAvailable[index]).
              } // synchronized (fileSpaceAvailableLock[index]).
          } // while...
  
          // Did we get all we needed?
          if (stillToReserve != 0) {
              // Give back what we got.
              long giveBack = reservedDelta - stillToReserve;
              for (int i = 0; i < fileSpaceAvailable.length; i++) {
                  synchronized (fileSpaceAvailableLock[i]) {
                      fileSpaceAvailable[i] = fileSpaceAvailable[i] + giveBack / fileSpaceAvailable.length;
                      if (i == startIndex)
                          fileSpaceAvailable[i] = fileSpaceAvailable[i] + giveBack % fileSpaceAvailable.length;
                  } // synchronized (fileSpaceAvailableLock[i]).
              } // for ..
          } // if (stillToReserve != 0).
  
          if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
              trace.exit(this, cclass
                         , "reserveLogFileSpace"
                         , new Object[] { new Long(stillToReserve), new Integer(startIndex) });
          return stillToReserve;
      }