Problem:
rbd diff between two snapshots lists entire image content with `whole-object` switch.
Solution:
While computing resize diff during object map do not mark state as new data
unless diff state is valid.
Fixes: https://tracker.ceph.com/issues/50787
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
uint8_t object_map_state = *it;
if (object_map_state == OBJECT_NONEXISTENT) {
*diff_it = DIFF_STATE_HOLE;
- } else if (diff_from_start || object_map_state != OBJECT_EXISTS_CLEAN) {
+ } else if (diff_from_start ||
+ (m_object_diff_state_valid &&
+ object_map_state != OBJECT_EXISTS_CLEAN)) {
*diff_it = DIFF_STATE_DATA_UPDATED;
} else {
*diff_it = DIFF_STATE_DATA;