]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: add rbd_snap_get_trash_namespace2() API to return full namespace
authorIlya Dryomov <idryomov@gmail.com>
Fri, 7 Jun 2024 10:12:29 +0000 (12:12 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 13 Jun 2024 12:08:46 +0000 (14:08 +0200)
commited09f3403f0f2cdb8a62f094d0654a8c6d8f49df
tree642dcf4af45ca63b7c5bc692d8f99b18bce15a84
parentfa29a6e754906c03060e1f6f5f703a1fb1e919a7
librbd: add rbd_snap_get_trash_namespace2() API to return full namespace

The existing rbd_snap_get_trash_namespace() API returns only the
original name of the deleted snapshot, omitting its namespace type.
While non-user snapshots have distinctive names, there is nothing
preventing the user from creating user snapshots with identical names
(i.e. starting with ".group" or ".mirror" prefix).  After cloning from
non-user snapshots is allowed, it's possible for such user snapshots to
get mixed up with non-user snapshots in the trash, so let's provide
means for disambiguation.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/include/rbd/librbd.h
src/include/rbd/librbd.hpp
src/librbd/api/Snapshot.cc
src/librbd/api/Snapshot.h
src/librbd/librbd.cc
src/pybind/rbd/c_rbd.pxd
src/pybind/rbd/mock_rbd.pxi
src/pybind/rbd/rbd.pyx
src/test/pybind/test_rbd.py