librbd: diff-iterate shouldn't crash on an empty byte range
Commit
0b5ba5fedf70 ("librbd/object_map: add support for ranged
diff-iterate") introduced a regression for the case when whole_object
parameter is set to true. Despite DiffRequest being called into and
another DiffIterate potentially being spawned recursively, an empty
byte range previously happened to make it.
Bail on an empty byte range early just like we have always done on an
empty snap id range (i.e. when start and end versions are the same).
Fixes: https://tracker.ceph.com/issues/66418
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
a3441a701963fef155fdda7d8f949d73bae26b69)