]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/rbd: async methods for group snap list 59107/head
authorN Balachandran <nibalach@redhat.com>
Fri, 9 Aug 2024 07:43:13 +0000 (13:13 +0530)
committerN Balachandran <nibalach@redhat.com>
Fri, 30 Aug 2024 11:25:34 +0000 (16:55 +0530)
commit0e7767a00524e23a2647311244b7aaca587b7fab
tree9edcfcb7ec87b7f15c849e97039d6b0441eb89a8
parent1e2b5973eca23bcdc35108155fd4f77ebb1652c9
cls/rbd: async methods for group snap list

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>
src/cls/rbd/cls_rbd_client.cc
src/cls/rbd/cls_rbd_client.h
src/librbd/CMakeLists.txt
src/librbd/api/Group.cc
src/librbd/api/Group.h
src/librbd/group/ListSnapshotsRequest.cc [new file with mode: 0644]
src/librbd/group/ListSnapshotsRequest.h [new file with mode: 0644]
src/librbd/librbd.cc
src/test/librados_test_stub/LibradosTestStub.cc
src/test/librbd/test_Groups.cc