Skip to content

tentacle: librbd/mirror: detect trashed snapshots in UnlinkPeerRequest - #67583

Merged
batrick merged 1 commit into
ceph:tentaclefrom
idryomov:wip-68279-tentacle
Apr 6, 2026
Merged

batrick merged 1 commit into
ceph:tentaclefrom
idryomov:wip-68279-tentacle

Conversation

@idryomov

Copy link
Copy Markdown
Contributor

If two instances of UnlinkPeerRequest race with each other (e.g. due
to rbd-mirror daemon unlinking from a previous mirror snapshot and the
user taking another mirror snapshot at same time), the snapshot that
UnlinkPeerRequest was created for may be in the process of being removed
(which may mean trashed by SnapshotRemoveRequest::trash_snap()) or fully
removed by the time unlink_peer() grabs the image lock.  Because trashed
snapshots weren't handled explicitly, UnlinkPeerRequest could spuriously
fail with EINVAL ("not mirror snapshot" case) instead of the expected
ENOENT ("missing snapshot" case).  This in turn could lead to spurious
ImageReplayer failures with it stopping prematurely.

Fixes: https://tracker.ceph.com/issues/68279
Signed-off-by: Ilya Dryomov <[email protected]>
(cherry picked from commit 3596ca0)
@ronen-fr

ronen-fr commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

@batrick
batrick merged commit e2ba632 into ceph:tentacle Apr 6, 2026
8 checks passed
@idryomov
idryomov deleted the wip-68279-tentacle branch April 14, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants