code: void fsync(String src, String clientName) throws IOException {
  
      NameNode.stateChangeLog.info("BLOCK* NameSystem.fsync: file "
        + src + " for " + clientName);
      writeLock();
      try {
        if (isInSafeMode()) {
          throw new SafeModeException("Cannot fsync file " + src, safeMode);
        }
        INodeFileUnderConstruction pendingFile = checkLease(src, clientName);
  
        // If the block has a length of zero, set it to size 1 so 
        // that lease recovery will not discard it.
        Block last = pendingFile.getLastBlock();
        if (last.getNumBytes() == 0) {
          last.setNumBytes(1);
        }
        dir.persistBlocks(src, pendingFile);
      } finally {
        writeUnlock();
      }
      getEditLog().logSync();
    }
docs: Persist all metadata about this file.
  
  @param src        The string representation of the path
  @param clientName The string representation of the client
  @throws IOException if path does not exist