• Home
  • Raw
  • Download

Lines Matching refs:extent

79 void ExtentRanges::AddExtent(Extent extent) {  in AddExtent()  argument
80 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in AddExtent()
89 if (ExtentsOverlapOrTouch(*it, extent)) { in AddExtent()
96 extent = UnionOverlappingExtents(extent, *it); in AddExtent()
100 extent_set_.insert(extent); in AddExtent()
102 blocks_ += extent.num_blocks(); in AddExtent()
123 void ExtentRanges::SubtractExtent(const Extent& extent) { in SubtractExtent() argument
124 if (extent.start_block() == kSparseHole || extent.num_blocks() == 0) in SubtractExtent()
134 if (!ExtentsOverlap(*it, extent)) in SubtractExtent()
144 ExtentSet subtraction = SubtractOverlappingExtents(*it, extent); in SubtractExtent()
205 bool ExtentRanges::OverlapsWithExtent(const Extent& extent) const { in OverlapsWithExtent()
207 if (ExtentsOverlap(entry, extent)) { in OverlapsWithExtent()
267 const Extent& extent = *it; in GetExtentsForBlockCount() local
268 out.push_back(extent); in GetExtentsForBlockCount()
269 out_blocks += extent.num_blocks(); in GetExtentsForBlockCount()
270 if (extent.num_blocks() < blocks_needed) in GetExtentsForBlockCount()
272 if (extent.num_blocks() == blocks_needed) in GetExtentsForBlockCount()
275 out_blocks -= extent.num_blocks(); in GetExtentsForBlockCount()
288 for (Extent extent : extents) { in FilterExtentRanges() local
294 auto lower = extent_set.lower_bound(extent); in FilterExtentRanges()
300 ExtentForRange(extent.start_block() + extent.num_blocks(), 0)); in FilterExtentRanges()
302 if (!ExtentRanges::ExtentsOverlap(extent, *iter)) in FilterExtentRanges()
304 if (iter->start_block() <= extent.start_block()) { in FilterExtentRanges()
307 iter->start_block() + iter->num_blocks() - extent.start_block(); in FilterExtentRanges()
308 if (cut_blocks >= extent.num_blocks()) { in FilterExtentRanges()
309 extent.set_num_blocks(0); in FilterExtentRanges()
312 extent = ExtentForRange(extent.start_block() + cut_blocks, in FilterExtentRanges()
313 extent.num_blocks() - cut_blocks); in FilterExtentRanges()
318 extent.start_block(), iter->start_block() - extent.start_block())); in FilterExtentRanges()
320 uint64_t old_end = extent.start_block() + extent.num_blocks(); in FilterExtentRanges()
322 extent.set_num_blocks(0); in FilterExtentRanges()
325 extent = ExtentForRange(new_start, old_end - new_start); in FilterExtentRanges()
328 if (extent.num_blocks() > 0) in FilterExtentRanges()
329 result.push_back(extent); in FilterExtentRanges()