mirror of
https://github.com/ceph/ceph
synced 2024-12-18 09:25:49 +00:00
mon: debug propagate_snaps_to_tiers
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
6719d30288
commit
48306e47d0
@ -555,7 +555,8 @@ void OSDMonitor::encode_pending(MonitorDBStore::Transaction *t)
|
||||
// finalize up pending_inc
|
||||
pending_inc.modified = ceph_clock_now(g_ceph_context);
|
||||
|
||||
pending_inc.propagate_snaps_to_tiers(osdmap);
|
||||
int r = pending_inc.propagate_snaps_to_tiers(g_ceph_context, osdmap);
|
||||
assert(r == 0);
|
||||
|
||||
bufferlist bl;
|
||||
|
||||
|
@ -178,7 +178,8 @@ int OSDMap::Incremental::identify_osd(uuid_d u) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
int OSDMap::Incremental::propagate_snaps_to_tiers(const OSDMap& osdmap)
|
||||
int OSDMap::Incremental::propagate_snaps_to_tiers(CephContext *cct,
|
||||
const OSDMap& osdmap)
|
||||
{
|
||||
assert(epoch == osdmap.get_epoch() + 1);
|
||||
for (map<int64_t,pg_pool_t>::iterator p = new_pools.begin();
|
||||
@ -201,6 +202,8 @@ int OSDMap::Incremental::propagate_snaps_to_tiers(const OSDMap& osdmap)
|
||||
if (tier->tier_of != p->first)
|
||||
return -EIO;
|
||||
|
||||
ldout(cct, 10) << __func__ << " from " << p->first << " to "
|
||||
<< r->first << dendl;
|
||||
tier->snap_seq = base.snap_seq;
|
||||
tier->snap_epoch = base.snap_epoch;
|
||||
tier->snaps = base.snaps;
|
||||
|
@ -174,7 +174,7 @@ public:
|
||||
}
|
||||
|
||||
/// propage update pools' snap metadata to any of their tiers
|
||||
int propagate_snaps_to_tiers(const OSDMap &base);
|
||||
int propagate_snaps_to_tiers(CephContext *cct, const OSDMap &base);
|
||||
};
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user