From: Greg Farnum Date: Fri, 4 Oct 2013 22:55:41 +0000 (-0700) Subject: ReplicatedPG: copy: add a C_KickBlockedObject X-Git-Tag: v0.72-rc1~13^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=91b589fb1ff838392eb3c02d2ee81f6dc9738b78;p=ceph.git 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 --- diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 9a39fd8f7a2..9b8cf1faf7f 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -1153,6 +1153,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,