librbd/migration: prune snapshot extents in RawFormat::list_snaps()
list-snaps is exempt from clipping in ImageDispatcher::PreprocessVisitor
because it's considered to be an internal API. Further, reads issued
by ObjectCopyRequest based on list-snaps results may also be exempt
because of READ_FLAG_DISABLE_CLIPPING.
Since RawFormat allows specifying a set of snapshots (possibly of
varying size!) to be imported, it needs to compensate for that in its
list-snaps implementation. Otherwise, an out-of-bounds read will
eventually be submitted to the stream.
Fixes: https://tracker.ceph.com/issues/67845
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
d9192b5aca156b706f14bd858df6fb3e45050079)