code: void updateSpaceConsumed(String path, INode[] inodes, long nsDelta, long dsDelta)
    throws QuotaExceededException,
           FileNotFoundException {
      writeLock();
      try {
        if (inodes == null) {
          inodes = rootDir.getExistingPathINodes(path);
        }
        int len = inodes.length;
        if (inodes[len - 1] == null) {
          throw new FileNotFoundException(path +
                                          " does not exist under rootDir.");
        }
        updateCount(inodes, len-1, nsDelta, dsDelta, true);
      } finally {
        writeUnlock();
      }
    }
docs: Updates namespace and diskspace consumed for all
  directories until the parent directory of file represented by path.
  
  @param path path for the file.
  @param inodes inode array representation of the path
  @param nsDelta the delta change of namespace
  @param dsDelta the delta change of diskspace
  @throws QuotaExceededException if the new count violates any quota limit
  @throws FileNotFound if path does not exist.