]> git.apps.os.sepia.ceph.com Git - ceph-ci.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 13:47:53 +0000 (15:47 +0200)
commit03f42f38fadc6d8d1958330ddd8f3afc488a62da
treee6d17cfcccce045a3224c1f31bc8cfb644318603
parent0c5021eaf3340d34ece21e550ae81e791a8fb498
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)
src/librbd/operation/SnapshotRemoveRequest.cc
src/test/librbd/operation/test_mock_SnapshotRemoveRequest.cc