It turns out that in octopus both fast-diff and list-snaps (slow)
modes were broken. As long as whole_object=true, the same incorrect
offset was reported in both modes. The fast-diff mode is fixed in
in previous commit.
This is an octopus-only patch for list-snaps mode. In pacific this
issue was addressed with
4429ed4f3f4c ("librbd: switch diff iterate
API to use new snaps list dispatch methods").
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
// provide the full object extents to the callback
for (vector<ObjectExtent>::iterator q = m_object_extents.begin();
q != m_object_extents.end(); ++q) {
- diffs->push_back(boost::make_tuple(m_offset + q->offset, q->length,
- end_exists));
+ for (vector<pair<uint64_t,uint64_t> >::iterator r =
+ q->buffer_extents.begin();
+ r != q->buffer_extents.end(); ++r) {
+ diffs->push_back(boost::make_tuple(m_offset + r->first, r->second,
+ end_exists));
+ }
}
return;
}