The problem shown up when stripping was used, and assembling a
nonexistent destination object from source objects, and one of these
objects existed and snap diff returned a zero interval. The non-zero
end_size in that case triggered invalid object map update.
Signed-off-by: Mykola Golub <mgolub@suse.com>
ldout(m_cct, 20) << "COPY_OP_TYPE_TRUNC " << z.get_start() << dendl;
}
}
- end_size = z.get_start();
+ end_size = std::min(end_size, z.get_start());
} else {
// zero interval inside the object
m_write_ops[src_snap_seq]