Lines Matching refs:src
387 static int ReadBlocks(const RangeSet& src, std::vector<uint8_t>& buffer, int fd) { in ReadBlocks() argument
389 for (const auto& range : src) { in ReadBlocks()
484 RangeSet src = RangeSet::Parse(params.tokens[pos++]); in PrintHashForCorruptedSourceBlocks() local
490 locs = RangeSet(std::vector<Range>{ Range{ 0, src.blocks() } }); in PrintHashForCorruptedSourceBlocks()
497 CHECK_EQ(src.blocks(), locs.blocks()); in PrintHashForCorruptedSourceBlocks()
500 LOG(INFO) << "printing hash in hex for " << src.blocks() << " source blocks"; in PrintHashForCorruptedSourceBlocks()
501 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedSourceBlocks()
502 size_t block_num = src.GetBlockNumber(i); in PrintHashForCorruptedSourceBlocks()
517 const RangeSet& src) { in PrintHashForCorruptedStashedBlocks() argument
519 CHECK_EQ(src.blocks() * BLOCKSIZE, buffer.size()); in PrintHashForCorruptedStashedBlocks()
521 for (size_t i = 0; i < src.blocks(); i++) { in PrintHashForCorruptedStashedBlocks()
522 size_t block_num = src.GetBlockNumber(i); in PrintHashForCorruptedStashedBlocks()
540 const RangeSet& src = stash_map[id]; in PrintHashForMissingStashedBlocks() local
541 std::vector<uint8_t> buffer(src.blocks() * BLOCKSIZE); in PrintHashForMissingStashedBlocks()
542 if (ReadBlocks(src, buffer, fd) == -1) { in PrintHashForMissingStashedBlocks()
546 PrintHashForCorruptedStashedBlocks(id, buffer, src); in PrintHashForMissingStashedBlocks()
637 const RangeSet& src = stash_map[id]; in LoadStash() local
638 allocate(src.blocks() * BLOCKSIZE, buffer); in LoadStash()
640 if (ReadBlocks(src, buffer, params.fd) == -1) { in LoadStash()
644 if (VerifyBlocks(id, buffer, src.blocks(), true) != 0) { in LoadStash()
646 PrintHashForCorruptedStashedBlocks(id, buffer, src); in LoadStash()
696 const RangeSet& src = stash_map[id]; in LoadStash() local
697 PrintHashForCorruptedStashedBlocks(id, buffer, src); in LoadStash()
928 RangeSet src = RangeSet::Parse(params.tokens[params.cpos++]); in LoadSourceBlocks() local
929 *overlap = src.Overlaps(tgt); in LoadSourceBlocks()
931 if (ReadBlocks(src, params.buffer, params.fd) == -1) { in LoadSourceBlocks()
1138 RangeSet src = RangeSet::Parse(params.tokens[params.cpos++]); in PerformCommandStash() local
1140 allocate(src.blocks() * BLOCKSIZE, params.buffer); in PerformCommandStash()
1141 if (ReadBlocks(src, params.buffer, params.fd) == -1) { in PerformCommandStash()
1144 blocks = src.blocks(); in PerformCommandStash()
1145 stash_map[id] = src; in PerformCommandStash()