]> 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 15:01:59 +0000 (17:01 +0200)
commit76fc2c32795fed721432d51db5d74a1f0adbd700
tree0474ce1290f2d9600d4465d092bf84bbfe7cb127
parent7ae97667c9b7e4d86bb8976c2a96700aa3d4b1ce
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 quincy ]
src/librbd/operation/SnapshotRemoveRequest.cc
src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc