]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/OSD: introduce reset_purged_snaps_last
authorMatan Breizman <mbreizma@redhat.com>
Thu, 21 Sep 2023 12:10:07 +0000 (12:10 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 26 Sep 2023 10:49:31 +0000 (10:49 +0000)
commit120ed0f0e8f65c18bfcd1d649617770c2c5af663
tree0aeda5d9ea839161b56809cfa9e95f453a2f8e75
parente900cf5f32727a04f6916250c53bbd7a91cb18ca
osd/OSD: introduce reset_purged_snaps_last

When the OSD preboots it sends a MMonGetPurgedSnaps message to
the monitor (`_get_purged_snaps`).
The monitor will reply with all the purged snapshots that their purged_epoch_ is in the
range of superblock.purged_snaps_last + 1 up to the last superblock.current_epoch + 1.
When the OSD will handle the reply from the mon (`handle_get_purged_snaps_reply`)
it will call `record_purged_snaps` to write those purged snapshots in the
OSD store as well (PSN_ keys).

Once purged_snaps_last is reset, in the following OSD reboot, the snapshots that were marked as
purged (purged_snaps_ keys) in the mon's store will be also marked,
correspondingly, in the OSD store.
That way `scrub_purged_snaps` will be able to re-trim the snapshots that weren't
marked as purged in the OSD side (for some reason)

Fixes: https://tracker.ceph.com/issues/62981
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/osd/OSD.cc