diff options
author | Kefu Chai <tchaikov@gmail.com> | 2017-04-20 04:49:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-20 04:49:12 +0200 |
commit | ee653ba87c145cc4be7abbf80a4accbf2ae786a5 (patch) | |
tree | 860b99cf2c09895c2e2f9a7fe830e8ffcb5c801f /src/mon | |
parent | Merge pull request #14496 from jdurgin/wip-ec-overwrites-cleanup (diff) | |
parent | mon/OSDMonitor: use inc.modified as the ctime for MOSDPGCreate (diff) | |
download | ceph-ee653ba87c145cc4be7abbf80a4accbf2ae786a5.tar.xz ceph-ee653ba87c145cc4be7abbf80a4accbf2ae786a5.zip |
Merge pull request #14608 from tchaikov/wip-19594
qa/tasks: assert on pg status with a timeout
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/mon')
-rw-r--r-- | src/mon/OSDMonitor.cc | 5 | ||||
-rw-r--r-- | src/mon/OSDMonitor.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 1b48c8edccb..554ba3a575b 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -868,9 +868,11 @@ OSDMonitor::update_pending_creatings(const OSDMap::Incremental& inc) } scan_for_creating_pgs(osdmap.get_pools(), inc.old_pools, + inc.modified, &pending_creatings); scan_for_creating_pgs(inc.new_pools, inc.old_pools, + inc.modified, &pending_creatings); pending_creatings.last_scan_epoch = osdmap.get_epoch(); return pending_creatings; @@ -3041,6 +3043,7 @@ void OSDMonitor::check_pg_creates_sub(Subscription *sub) void OSDMonitor::scan_for_creating_pgs(const map<int64_t,pg_pool_t>& pools, const set<int64_t>& removed_pools, + utime_t modified, creating_pgs_t* creating_pgs) const { for (auto& p : pools) { @@ -3076,7 +3079,7 @@ void OSDMonitor::scan_for_creating_pgs(const map<int64_t,pg_pool_t>& pools, dout(20) << __func__ << " already have " << pgid << dendl; continue; } - creating_pgs->pgs.emplace(pgid, make_pair(created, ceph_clock_now())); + creating_pgs->pgs.emplace(pgid, make_pair(created, modified)); dout(10) << __func__ << " adding " << pgid << " at " << osdmap.get_epoch() << dendl; } diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h index 5144e89b6d1..0ac7bc28d2f 100644 --- a/src/mon/OSDMonitor.h +++ b/src/mon/OSDMonitor.h @@ -432,6 +432,7 @@ private: void trim_creating_pgs(creating_pgs_t *creating_pgs, const PGMap& pgm); void scan_for_creating_pgs(const std::map<int64_t,pg_pool_t>& pools, const std::set<int64_t>& removed_pools, + utime_t modified, creating_pgs_t* creating_pgs) const; pair<int32_t, pg_t> get_parent_pg(pg_t pgid) const; void update_creating_pgs(); |