Lines Matching refs:ls
556 log_sector_v1_0& ls = *reinterpret_cast<log_sector_v1_0*>(&ls_buffer[0]); in restoreSector() local
557 uint32_t index = le - ((log_entry*)&ls_buffer[ls.header_size]); in restoreSector()
563 ls.count = index + 1; in restoreSector()
564 ls.magic = kPartialRestoreMagic; in restoreSector()
565 write(device_fd, &ls_buffer[0], ls.block_size); in restoreSector()
573 if (index == 0 && ls.sequence != 0) { in restoreSector()
640 log_sector_v1_0& ls = *reinterpret_cast<log_sector_v1_0*>(&ls_buffer[0]); in cp_restoreCheckpoint() local
645 if (ls.magic != kMagic && (ls.magic != kPartialRestoreMagic || validating)) { in cp_restoreCheckpoint()
650 if (ls.block_size != original_ls.block_size) { in cp_restoreCheckpoint()
655 if ((int)ls.sequence != sequence) { in cp_restoreCheckpoint()
657 " but got " + std::to_string(ls.sequence)); in cp_restoreCheckpoint()
661 LOG(INFO) << action << " from log sector " << ls.sequence; in cp_restoreCheckpoint()
663 reinterpret_cast<log_entry*>(&ls_buffer[ls.header_size]) + ls.count - 1; in cp_restoreCheckpoint()
664 le >= reinterpret_cast<log_entry*>(&ls_buffer[ls.header_size]); --le) { in cp_restoreCheckpoint()
671 ls.block_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()
674 crc32(&buffer[i], ls.block_size, &checksum); in cp_restoreCheckpoint()