public void flush(LogSeqNum lsn){
  logMgrLock.lock();
  try {
    if (lsn.compareTo(lastFlushedLsn) >= 0)     flush();
  }
  finally {
    logMgrLock.unlock();
  }
}

public void flush ( LogSeqNum lsn ) { logMgrLock . lock ( ) ; try { if ( lsn . compareTo ( lastFlushedLsn ) >= 0 ) flush ( ) ; } finally { logMgrLock . unlock ( ) ; } }
ensures that the log records corresponding to the specified lsn has been written to disk . all earlier log records will also be written to disk .
