If 'begin' isn't found, we'll get a [pbegin,pend) range back that was
nearby. Only if it overlaps the [begin,end) range do we want to shorten
our range to [begin,pbegin); the old assert was making the assumption
that the lookup would only return a range that was after 'begin', but in
reality it can return was that comes before it too.
Signed-off-by: Sage Weil <sage@redhat.com>
<< "~" << (pend - pbegin) << dendl;
break; // next pool
}
- if (pbegin && pbegin < end) {
+ if (pbegin && pbegin > begin && pbegin < end) {
// the tail of [begin,end) is purged; shorten the range
- ceph_assert(pbegin > begin);
end = pbegin;
}
to_prune.insert(begin, end - begin);