/** * Check if safe mode is on. * @return true if in safe mode */ synchronized boolean isOn() { try { assert isConsistent() : " SafeMode: Inconsistent filesystem state: " + "Total num of blocks, active blocks, or " + "total safe blocks don't match."; } catch(IOException e) { System.err.print(StringUtils.stringifyException(e)); } return this.reached >= 0; }