Lines Matching refs:ls
518 log_sector_v1_0& ls = *reinterpret_cast<log_sector_v1_0*>(&ls_buffer[0]); in restoreSector() local
519 uint32_t index = le - ((log_entry*)&ls_buffer[ls.header_size]); in restoreSector()
525 ls.count = index + 1; in restoreSector()
526 ls.magic = kPartialRestoreMagic; in restoreSector()
527 write(device_fd, &ls_buffer[0], ls.block_size); in restoreSector()
535 if (index == 0 && ls.sequence != 0) { in restoreSector()
606 log_sector_v1_0& ls = *reinterpret_cast<log_sector_v1_0*>(&ls_buffer[0]); in cp_restoreCheckpoint() local
611 if (ls.magic != kMagic && (ls.magic != kPartialRestoreMagic || validating)) { in cp_restoreCheckpoint()
617 if (ls.block_size != original_ls.block_size) { in cp_restoreCheckpoint()
623 if ((int)ls.sequence != sequence) { in cp_restoreCheckpoint()
624 LOG(ERROR) << "Expecting log sector " << sequence << " but got " << ls.sequence; in cp_restoreCheckpoint()
627 std::to_string(ls.sequence)) in cp_restoreCheckpoint()
632 LOG(INFO) << action << " from log sector " << ls.sequence; in cp_restoreCheckpoint()
634 reinterpret_cast<log_entry*>(&ls_buffer[ls.header_size]) + ls.count - 1; in cp_restoreCheckpoint()
635 le >= reinterpret_cast<log_entry*>(&ls_buffer[ls.header_size]); --le) { in cp_restoreCheckpoint()
642 ls.block_size); in cp_restoreCheckpoint()
643 uint32_t checksum = le->source / (ls.block_size / kSectorSize); in cp_restoreCheckpoint()
644 for (size_t i = 0; i < le->size; i += ls.block_size) { in cp_restoreCheckpoint()
645 crc32(&buffer[i], ls.block_size, &checksum); in cp_restoreCheckpoint()