osd/PG: move shutdown into PG

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2018-02-23 09:17:12 -06:00
parent c454184d5e
commit 40a92a1f56
4 changed files with 10 additions and 10 deletions

View File

@ -3298,6 +3298,13 @@ void PG::init(
write_if_dirty(*t);
}
void PG::shutdown()
{
lock();
on_shutdown();
unlock();
}
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

View File

@ -446,7 +446,8 @@ public:
void get_pg_stats(std::function<void(const pg_stat_t&, epoch_t lec)> f);
void with_heartbeat_peers(std::function<void(int)> f);
virtual void shutdown() = 0;
void shutdown();
virtual void on_shutdown() = 0;
bool get_must_scrub() const {
return scrubber.must_scrub;

View File

@ -11676,13 +11676,6 @@ void PrimaryLogPG::clear_async_reads()
}
}
void PrimaryLogPG::shutdown()
{
lock();
on_shutdown();
unlock();
}
void PrimaryLogPG::on_shutdown()
{
dout(10) << __func__ << dendl;

View File

@ -1824,8 +1824,7 @@ public:
void on_activate() override;
void on_flushed() override;
void on_removal(ObjectStore::Transaction *t) override;
void shutdown() override;
void on_shutdown();
void on_shutdown() override;
bool check_failsafe_full() override;
bool check_osdmap_full(const set<pg_shard_t> &missing_on) override;
bool maybe_preempt_replica_scrub(const hobject_t& oid) override {