Lines Matching refs:src

482 static int ReadBlocks(const RangeSet& src, std::vector<uint8_t>* buffer, int fd) {  in ReadBlocks()  argument
484 for (const auto& [begin, end] : src) { in ReadBlocks()
584 RangeSet src = RangeSet::Parse(params.tokens[pos++]); in PrintHashForCorruptedSourceBlocks() local
585 if (!src) { in PrintHashForCorruptedSourceBlocks()
594 locs = RangeSet(std::vector<Range>{ Range{ 0, src.blocks() } }); in PrintHashForCorruptedSourceBlocks()
601 CHECK_EQ(src.blocks(), locs.blocks()); in PrintHashForCorruptedSourceBlocks()
604 LOG(INFO) << "printing hash in hex for " << src.blocks() << " source blocks"; in PrintHashForCorruptedSourceBlocks()
605 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedSourceBlocks()
606 size_t block_num = src.GetBlockNumber(i); in PrintHashForCorruptedSourceBlocks()
621 const RangeSet& src) { in PrintHashForCorruptedStashedBlocks() argument
623 CHECK_EQ(src.blocks() * BLOCKSIZE, buffer.size()); in PrintHashForCorruptedStashedBlocks()
625 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedStashedBlocks()
626 size_t block_num = src.GetBlockNumber(i); in PrintHashForCorruptedStashedBlocks()
644 const RangeSet& src = stash_map[id]; in PrintHashForMissingStashedBlocks() local
645 std::vector<uint8_t> buffer(src.blocks() * BLOCKSIZE); in PrintHashForMissingStashedBlocks()
646 if (ReadBlocks(src, &buffer, fd) == -1) { in PrintHashForMissingStashedBlocks()
650 PrintHashForCorruptedStashedBlocks(id, buffer, src); in PrintHashForMissingStashedBlocks()
741 const RangeSet& src = stash_map[id]; in LoadStash() local
742 allocate(src.blocks() * BLOCKSIZE, buffer); in LoadStash()
744 if (ReadBlocks(src, buffer, params.fd) == -1) { in LoadStash()
748 if (VerifyBlocks(id, *buffer, src.blocks(), true) != 0) { in LoadStash()
751 PrintHashForCorruptedStashedBlocks(id, *buffer, src); in LoadStash()
799 const RangeSet& src = stash_map[id]; in LoadStash() local
800 PrintHashForCorruptedStashedBlocks(id, *buffer, src); in LoadStash()
1012 RangeSet src = RangeSet::Parse(params.tokens[params.cpos++]); in LoadSourceBlocks() local
1013 CHECK(static_cast<bool>(src)); in LoadSourceBlocks()
1014 *overlap = src.Overlaps(tgt); in LoadSourceBlocks()
1016 if (ReadBlocks(src, &params.buffer, params.fd) == -1) { in LoadSourceBlocks()
1227 RangeSet src = RangeSet::Parse(params.tokens[params.cpos++]); in PerformCommandStash() local
1228 CHECK(static_cast<bool>(src)); in PerformCommandStash()
1230 size_t blocks = src.blocks(); in PerformCommandStash()
1232 if (ReadBlocks(src, &params.buffer, params.fd) == -1) { in PerformCommandStash()
1235 stash_map[id] = src; in PerformCommandStash()