]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: remove image directory object during rollback
authorRamana Raja <rraja@redhat.com>
Thu, 28 Mar 2024 20:15:44 +0000 (16:15 -0400)
committerRamana Raja <rraja@redhat.com>
Thu, 28 Mar 2024 21:15:26 +0000 (17:15 -0400)
commitbdc50a9720276fa38d30b4f1aa23143333b861be
treeea4d28b4cfaf99fa3dc7adb295fcbee8d8cb491e
parent1c349451176cc5b4ebfb24b22eaaa754e05cff6c
librbd: remove image directory object during rollback

... of rbd namespace creation.

During rbd namespace creation, the image directory object may leak if
the initalization of the image directory fails. Initialization of image
directory involves creation of the rbd_directory object and a state
being set in the object's omap. After creation of the object, error
can occur when setting the state in the object's omap. This would fail
the rbd namespace creation and leave behind the rbd_directory object.
So try to remove the rbd_directory object when rolling back namespace
creation.

Signed-off-by: Ramana Raja <rraja@redhat.com>
src/librbd/api/Namespace.cc