code: private boolean isConsistent() {
      if (this.reached < 0) {
        return true; // Safemode is off.
      }
      if (namesystem.getTotalBlocks() == -1 && namesystem.getSafeBlocks() == -1) {
        return true; // manual safe mode
      }
      long activeBlocks = namesystem.getBlocksTotal()
        - namesystem.getPendingDeletionBlocks();
      return (namesystem.getTotalBlocks() == activeBlocks)
        || (namesystem.getSafeBlocks() >= 0 && namesystem.getSafeBlocks() <= namesystem
            .getTotalBlocks());
    }
docs: Checks consistency of the class state. This is costly and currently called
  only in assert.