Lines Matching refs:tgt
279 def __init__(self, tgt, src=None, threads=None, version=4,
297 self.tgt = tgt
303 assert tgt.blocksize == 4096
309 self.AssertPartition(tgt.care_map, tgt.file_map.values())
433 # bsdiff patchstart patchlen srchash tgthash <tgt rangeset> <src_str>
434 # imgdiff patchstart patchlen srchash tgthash <tgt rangeset> <src_str>
435 # move hash <tgt rangeset> <src_str>
500 assert max_stashed_blocks * self.tgt.blocksize <= max_allowed, \
502 max_stashed_blocks * self.tgt.blocksize, max_stashed_blocks,
503 self.tgt.blocksize, max_allowed, cache_size,
509 if self.tgt.extended:
510 assert (WriteSplitTransfers(out, "zero", self.tgt.extended) ==
511 self.tgt.extended.size())
512 total += self.tgt.extended.size()
520 all_tgt = RangeSet(data=(0, self.tgt.total_blocks))
521 all_tgt_minus_extended = all_tgt.subtract(self.tgt.extended)
522 new_dontcare = all_tgt_minus_extended.subtract(self.tgt.care_map)
542 self._max_stashed_size = max_stashed_blocks * self.tgt.blocksize
573 max_allowed = cache_size * stash_threshold / self.tgt.blocksize
641 num_of_bytes = new_blocks * self.tgt.blocksize
653 tgt_size = xf.tgt_ranges.size() * self.tgt.blocksize
659 self.tgt.WriteRangeDataToFd(xf.tgt_ranges, new_f)
660 tgt_size = xf.tgt_ranges.size() * self.tgt.blocksize
666 # We can't compare src and tgt directly because they may have
678 tgt_size = xf.tgt_ranges.size() * self.tgt.blocksize
749 tgt_file = common.MakeTempFile(prefix="tgt-")
751 self.tgt.WriteRangeDataToFd(tgt_ranges, fd)
758 "Failed to generate %s for %s: tgt=%s, src=%s:\n%s" % (
800 tgt_size = xf.tgt_ranges.size() * self.tgt.blocksize
814 touched = array.array("B", "\0" * self.tgt.total_blocks)
828 for i in range(s, min(e, self.tgt.total_blocks)):
840 for s, e in self.tgt.care_map:
1148 self.tgt.blocksize)
1154 self.tgt.RangeSha1(tgt_ranges), self.src.RangeSha1(src_ranges),
1166 self.tgt.RangeSha1(tgt_first), self.src.RangeSha1(src_first),
1180 self.tgt.RangeSha1(tgt_ranges), self.src.RangeSha1(src_ranges),
1191 self.tgt.RangeSha1(tgt_ranges), self.src.RangeSha1(src_ranges),
1217 if self.src.ReadRangeSet(src_rs) == self.tgt.ReadRangeSet(tgt_rs):
1254 for tgt_fn, tgt_ranges in self.tgt.file_map.items():