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-08 16:24:06 -0700
commit44826d97ca77cdfb313ad3f267a0b91d52cca489 (patch)
tree3fb78a1729f7c6730934178e66de73d3740d6d45
parent38959b01d77f52c2dc2dcb962e5a0f952da428c9 (diff)
downloadceph-44826d97ca77cdfb313ad3f267a0b91d52cca489.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 674f34cc4a6..dcf40c00df1 100644
--- a/src/osd/ReplicatedPG.h
+++ b/src/osd/ReplicatedPG.h
@@ -981,6 +981,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,