From: Sage Weil Date: Wed, 5 Jun 2019 21:50:53 +0000 (-0500) Subject: mon/OSDMonitor: document osd snap metadata format X-Git-Tag: v15.1.0~2308^2~36 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=14fdb52c50c018c6580fc0a1115495875ebb1a9e;p=ceph.git mon/OSDMonitor: document osd snap metadata format Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 0e30d6f74a5..01b18fb884d 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -91,6 +91,27 @@ static const string OSD_PG_CREATING_PREFIX("osd_pg_creating"); static const string OSD_METADATA_PREFIX("osd_metadata"); static const string OSD_SNAP_PREFIX("osd_snap"); +/* + + OSD snapshot metadata + --------------------- + + "removed_epoch_%llu_%08lx" % (pool, epoch) + -> interval_set + + "removed_snap_%llu_%016llx" % (pool, last_snap) + -> { first_snap, end_snap, epoch } (last_snap = end_snap - 1) + + "purged_snap_%llu_%016llx" % (pool, last_snap) + -> { first_snap, end_snap, epoch } (last_snap = end_snap - 1) + + - note that the {removed,purged}_snap put the last snap in they key so + that we can use forward iteration only to search for an epoch in an + interval. e.g., to test if epoch N is removed/purged, we'll find a key + >= N that either does or doesn't contain the given snap. + + */ + namespace { const uint32_t MAX_POOL_APPLICATIONS = 4;