summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2013-10-04 15:55:41 -0700
committerGreg Farnum <greg@inktank.com>2013-10-17 13:11:44 -0700
commitc8d31000e4b9dd3a93b9f074e4acbaff9a8dca3e (patch)
tree9669de052eaf0f8fcda95026ac47a90d1ae4503c
parent491d81fdbc8443aea63269b30b41bf45a01ea694 (diff)
downloadceph-c8d31000e4b9dd3a93b9f074e4acbaff9a8dca3e.tar.gz
ReplicatedPG: copy: add a C_KickBlockedObject
As the name says, you give it an obc and it kicks the block list when finish()ed. Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h
index b30f8628a51..76628e7c122 100644
--- a/src/osd/ReplicatedPG.h
+++ b/src/osd/ReplicatedPG.h
@@ -987,6 +987,17 @@ public:
void wait_for_blocked_object(const hobject_t& soid, OpRequestRef op);
void kick_object_context_blocked(ObjectContextRef obc);
+ struct C_KickBlockedObject : public Context {
+ ObjectContextRef obc;
+ ReplicatedPG *pg;
+ C_KickBlockedObject(ObjectContextRef obc_, ReplicatedPG *pg_) :
+ obc(obc_), pg(pg_) {}
+ protected:
+ void finish(int r) {
+ pg->kick_object_context_blocked(obc);
+ }
+ };
+
void mark_all_unfound_lost(int what);
eversion_t pick_newest_available(const hobject_t& oid);
ObjectContextRef mark_object_lost(ObjectStore::Transaction *t,