From: Samuel Just Date: Tue, 12 Feb 2013 21:08:36 +0000 (-0800) Subject: PG: check object_contexts on flushed X-Git-Tag: v0.59~160^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=22ec5bc315024c00e5f50c513658de9e779c929c;p=ceph.git PG: check object_contexts on flushed At FlushedEvt, all outstanding io should be complete and the object_contexts map should be empty. Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 3c10230c41ac..09d27a6a037c 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5436,6 +5436,7 @@ PG::RecoveryState::Reset::react(const FlushedEvt&) { PG *pg = context< RecoveryMachine >().pg; pg->flushed = true; + pg->on_flushed(); pg->requeue_ops(pg->waiting_for_active); return discard_event(); } diff --git a/src/osd/PG.h b/src/osd/PG.h index ec3d4664a907..39bc6b5ab984 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1916,6 +1916,7 @@ public: virtual void on_role_change() = 0; virtual void on_change() = 0; virtual void on_activate() = 0; + virtual void on_flushed() = 0; virtual void on_shutdown() = 0; virtual void remove_watchers_and_notifies() = 0; diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 23174b937dd9..ffa1a93845ba 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6256,6 +6256,11 @@ void ReplicatedPG::on_shutdown() remove_watchers_and_notifies(); } +void ReplicatedPG::on_flushed() +{ + assert(object_contexts.empty()); +} + void ReplicatedPG::on_activate() { for (unsigned i = 1; i