eden/fs/service/EdenServiceHandler.cpp
/**
 * Starting from the provided delta, walks the chain backwards until it finds
 * the delta whose [fromSequence, toSequence] range includes `target`.
 */
Starting from the provided delta, walks the chain backwards until it finds
the delta whose [fromSequence, toSequence] range includes `target`.
Starting from the provided delta walks the chain backwards until it finds the delta whose [ fromSequence toSequence ] range includes ` target ` .
const JournalDelta* FOLLY_NULLABLE
findJournalDelta(const JournalDelta* delta, Journal::SequenceNumber target) {
#ifndef _WIN32
  if (delta == nullptr || delta->toSequence < target) {
    return nullptr;
  }
  while (delta) {
    if (delta->fromSequence <= target && target <= delta->toSequence) {
      return delta;
    }
    delta = delta->previous.get();
  }
  return nullptr;
#else
  NOT_IMPLEMENTED();
#endif 
}
const JournalDelta * FOLLY_NULLABLE findJournalDelta ( const JournalDelta * delta , Journal :: SequenceNumber target ) { #ifndef _WIN32 if ( delta == nullptr || delta -> toSequence < target ) { return nullptr ; } while ( delta ) { if ( delta -> fromSequence <= target && target <= delta -> toSequence ) { return delta ; } delta = delta -> previous . get ( ) ; } return nullptr ; #else NOT_IMPLEMENTED ( ) ; #endif }
Starting from the provided delta, walks the chain backwards until it finds
 the delta whose [fromSequence, toSequence] range includes `target`.
Starting from the provided delta walks the chain backwards until it finds the delta whose [ fromSequence toSequence ] range includes ` target ` .
// If the tip of the delta chain precedes the target, then do not bother to // search. // !_WIN32