]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: more inode ref counting debugging
authorSage Weil <sage.weil@dreamhost.com>
Thu, 30 Jun 2011 03:32:59 +0000 (20:32 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 30 Jun 2011 03:32:59 +0000 (20:32 -0700)
blech

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/client/Client.cc
src/client/Client.h

index 0927f85aa0c84258c42765949609b1cccc9c0d60..556ae253e14cbc017b6d979a7d73204abd76abca 100644 (file)
@@ -106,7 +106,7 @@ ostream& operator<<(ostream &out, Inode &in)
       out << " parent=" << *i;
       ++i;
   }
-  out << ")";
+  out << &in << ")";
   return out;
 }
 
@@ -1730,20 +1730,21 @@ void Client::release_lease(Inode *in, Dentry *dn, int mask)
 
 void Client::put_inode(Inode *in, int n)
 {
-  //cout << "put_inode on " << in << " " << in->ino << endl;
+  ldout(cct, 10) << "put_inode on " << *in << dendl;
   in->put(n);
   if (in->ref == 0) {
     // release any caps
     remove_all_caps(in);
 
-    //cout << "put_inode deleting " << in << " " << in->ino << std::endl;
+    ldout(cct, 10) << "put_inode deleting " << *in << dendl;
     objectcacher->release_set(&in->oset);
     if (in->snapdir_parent)
       put_inode(in->snapdir_parent);
     inode_map.erase(in->vino());
     in->cap_item.remove_myself();
     in->snaprealm_item.remove_myself();
-    if (in == root) root = 0;
+    if (in == root)
+      root = 0;
     delete in;
   }
 }
index aa2863c586cb092d424f4fb039d8570e81330401..e790a49850ae125237e1e15213178de78ac995e8 100644 (file)
@@ -504,11 +504,13 @@ class Inode {
 
   void get() { 
     ref++; 
-    ldout(cct, 15) << "inode.get on " << this << " " << hex << ino << dec << " now " << ref << dendl;
+    ldout(cct, 15) << "inode.get on " << this << " " <<  ino << '.' << snapid
+                  << " now " << ref << dendl;
   }
   void put(int n=1) { 
     ref -= n; 
-    ldout(cct, 15) << "inode.put on " << this << " " << hex << ino << dec << " now " << ref << dendl;
+    ldout(cct, 15) << "inode.put on " << this << " " << ino << '.' << snapid
+                  << " now " << ref << dendl;
     assert(ref >= 0);
   }