]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/ObjectCacher: add complete flag
authorSage Weil <sage@inktank.com>
Wed, 24 Oct 2012 21:35:24 +0000 (14:35 -0700)
committerSage Weil <sage@inktank.com>
Fri, 26 Oct 2012 18:31:45 +0000 (11:31 -0700)
This is set when we know we have *all* the data for this object.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osdc/ObjectCacher.h

index ff0676f6e2b9649a6c924756928f8b01bfc323e7..efc672a62eaee34e418f8dff1b7e279ba66bf50a 100644 (file)
@@ -168,6 +168,7 @@ class ObjectCacher {
     xlist<Object*>::item set_item;
     object_locator_t oloc;
     
+    bool complete;
 
   public:
     map<loff_t, BufferHead*>     data;
@@ -203,6 +204,7 @@ class ObjectCacher {
       ref(0),
       oc(_oc),
       oid(o), oset(os), set_item(this), oloc(l),
+      complete(false),
       last_write_tid(0), last_commit_tid(0),
       dirty_or_tx(0),
       lock_state(LOCK_NONE), wrlock_ref(0), rdlock_ref(0) {
@@ -662,6 +664,9 @@ inline ostream& operator<<(ostream& out, ObjectCacher::Object &ob)
   case ObjectCacher::Object::LOCK_RDUNLOCKING: out << " rdunlocking"; break;
   }
 
+  if (ob.complete)
+    out << " COMPLETE";
+
   out << "]";
   return out;
 }