]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Tue, 21 May 2024 18:50:30 +0000 (14:50 -0400)
commitfdf2d64c33c6a4569e0113376aaf42bf293e58bb
tree4d3a4fc6ef1032cd32100138c377e782f823f1f5
parent1340775becf34c25cdd317a668cbd5f0d19c6024
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>
(cherry picked from commit bdc50a9720276fa38d30b4f1aa23143333b861be)
src/librbd/api/Namespace.cc