Since commit
73f50a13109f ("rbd-mirror: use generalized deep copy for
image sync"), the only user of calc_snap_set_diff() immediately unsets
end_size otherwise.
calc_snap_set_diff() semantics are clearer if end_size is set together
with end_exists and clone_end_snap_id.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
c0747922040841c371dbe2706354c08c73d8e59f)
saw_start = true;
}
- *end_size = r->size;
if (end < a) {
ldout(cct, 20) << " past end " << end << ", end object does not exist" << dendl;
*end_exists = false;
}
if (end <= b) {
ldout(cct, 20) << " end" << dendl;
+ *end_size = r->size;
*end_exists = true;
*clone_end_snap_id = b;
break;
diff.insert(0, image_ctx->layout.object_size);
end_size = image_ctx->layout.object_size;
clone_end_snap_id = end_snap_id;
- } else if (!exists) {
- end_size = 0;
}
if (exists) {