]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: don't attempt to remove image state on orphan snapshots
authorIlya Dryomov <idryomov@gmail.com>
Tue, 22 Aug 2023 15:27:50 +0000 (17:27 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 4 Sep 2023 14:55:33 +0000 (16:55 +0200)
commitf49978084fa339e6db77edb6cd8c69d8e359ee28
treed32573bbacff49095caf2addd5650bafd9835f06
parent6f288f53dfb0c5b25aeef4c430ce1e0721045101
librbd: don't attempt to remove image state on orphan snapshots

Despite being mirror snapshots, orphan snapshots don't have image
state: see CreateNonPrimaryRequest::write_image_state() for a similar
is_orphan() check.  Attempting to remove image state generates bogus
"failed to read image state object" and "failed to remove image state"
errors.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit cfae3f79bd0513e2753b0deb8c2624ab07cf2d1b)

Conflicts:
src/librbd/operation/SnapshotRemoveRequest.cc [ commit
  3a93b40721a1 ("librbd: s/boost::variant/std::variant/") not
  in pacific ]
src/librbd/operation/SnapshotRemoveRequest.cc
src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc