]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: retry list_snap_orders() once instead of failing sort_snaps() 63302/head
authorVinayBhaskar-V <vvarada@redhat.com>
Thu, 15 May 2025 14:18:30 +0000 (19:48 +0530)
committerVinayBhaskar-V <vvarada@redhat.com>
Thu, 29 May 2025 14:18:01 +0000 (19:48 +0530)
commit3c21aec85e986f5206e83fcdcf5b1e0441b35f56
tree6a95b44883c3b5b55f9226c25ad45f2356a0479f
parente1f7b2c3a5b8a983581263b4a7be4c17f4d18174
librbd: retry list_snap_orders() once instead of failing sort_snaps()

If snapshot listing races with snapshot creation, rbd group snap ls
may spuriously return an unsorted listing and internal fail_if_not_sorted=true
consumers may generate a spurious EINVAL error. This is because snap orders
are listed before snaps themselves and the "missing order for snap" check in
sort_snaps() is driven by the list of snaps.
This can be improved by grabbing snap order keys one more time, adding the newly
discovered snap orders to m_snap_orders and retrying instead of immediately failing the sort.

Fixes: https://tracker.ceph.com/issues/67984
Signed-off-by: VinayBhaskar-V <vvarada@redhat.com>
src/librbd/group/ListSnapshotsRequest.cc
src/librbd/group/ListSnapshotsRequest.h