src/worker.cc
// Copy data from file into memory block.
Copy data from file into memory block.
Copy data from file into memory block .
bool FileThread::ReadPageFromFile(int fd, struct page_entry *dst) {
  int page_length = sat_->page_length();
  int64 size = read(fd, dst->addr, page_length);
  if (size != page_length) {
    os_->ErrorReport(devicename_.c_str(), "read-error", 1);
    logprintf(0, "Block Error: file_thread failed to read, "
              "bailing\n");
    errorcount_++;
    return false;
  }
  return true;
}
bool FileThread :: ReadPageFromFile ( int fd , struct page_entry * dst ) { int page_length = sat_ -> page_length ( ) ; int64 size = read ( fd , dst -> addr , page_length ) ; if ( size != page_length ) { os_ -> ErrorReport ( devicename_ . c_str ( ) , " " , 1 ) ; logprintf ( 0 , " " " \n " ) ; errorcount_ ++ ; return false ; } return true ; }
Copy data from file into memory block.
Copy data from file into memory block .
// Do the actual read.