Lines Matching refs:le
555 log_entry* le, std::vector<char>& buffer) { in restoreSector() argument
557 uint32_t index = le - ((log_entry*)&ls_buffer[ls.header_size]); in restoreSector()
558 int count = (le->size - 1) / kSectorSize + 1; in restoreSector()
560 if (checkCollision(used_sectors, le->source, le->source + count)) { in restoreSector()
571 markUsed(used_sectors, le->dest, le->dest + count); in restoreSector()
580 lseek64(device_fd, le->source * kSectorSize, SEEK_SET); in restoreSector()
581 write(device_fd, &buffer[0], le->size); in restoreSector()
662 for (log_entry* le = in cp_restoreCheckpoint() local
664 le >= reinterpret_cast<log_entry*>(&ls_buffer[ls.header_size]); --le) { in cp_restoreCheckpoint()
666 LOG(VERBOSE) << action << " " << le->size << " bytes from sector " << le->dest in cp_restoreCheckpoint()
667 << " to " << le->source << " with checksum " << std::hex in cp_restoreCheckpoint()
668 << le->checksum; in cp_restoreCheckpoint()
670 auto buffer = relocatedRead(device_fd, relocations, validating, le->dest, le->size, in cp_restoreCheckpoint()
672 uint32_t checksum = le->source / (ls.block_size / kSectorSize); in cp_restoreCheckpoint()
673 for (size_t i = 0; i < le->size; i += ls.block_size) { in cp_restoreCheckpoint()
677 if (le->checksum && checksum != le->checksum) { in cp_restoreCheckpoint()
683 relocate(relocations, le->source, le->dest, (le->size - 1) / kSectorSize + 1); in cp_restoreCheckpoint()
685 restoreSector(device_fd, used_sectors, ls_buffer, le, buffer); in cp_restoreCheckpoint()