Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
}
for (auto &p : oi.manifest.chunk_map) {
- if ((p.first <= src_offset && p.first + p.second.length > src_offset) ||
- (p.first > src_offset && p.first <= src_offset + src_length)) {
+ interval_set<uint64_t> chunk;
+ chunk.insert(p.first, p.second.length);
+ if (chunk.intersects(src_offset, src_length)) {
dout(20) << __func__ << " overlapped !! offset: " << src_offset << " length: " << src_length
<< " chunk_info: " << p << dendl;
result = -EOPNOTSUPP;