mon: debug propagate_snaps_to_tiers

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2014-01-05 17:43:23 -08:00
parent 6719d30288
commit 48306e47d0
3 changed files with 7 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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: