Adds methods for asynchronous cls group_snap_list and
group_snap_list_order, and a helper class which will list group snaps
asynchronously.The helper class also takes try_to_sort and
fail_if_not_sorted arguments. It will attempt to sort the group snaps
listing in order of creation if try_to_sort is true. If sorting fails and
fail_if_not_sorted is true, an error is returned. Otherwise the
unsorted list is returned.
librbd::Group::group_snap_list() now uses the async helper function with
try_to_sort set to true and fail_if_not_sorted to false so it will
attempt to return a sorted listing but will not fail if it cannot.
Credit: Mykola Golub <mgolub@suse.com>
Fixes: https://tracker.ceph.com/issues/51686 Signed-off-by: N Balachandran <nibalach@redhat.com>