]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: print mds_caps_wanted on inode
authorSage Weil <sage.weil@dreamhost.com>
Wed, 13 Jul 2011 00:24:47 +0000 (17:24 -0700)
committerSage Weil <sage@newdream.net>
Wed, 13 Jul 2011 21:57:57 +0000 (14:57 -0700)
along with the client caps info

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

index 5a5f69f1fc5e73ad49ce8e73da9f38713b597d2c..2c6cdd1bac14c89d78fc80cc42b708d998f64334 100644 (file)
@@ -213,7 +213,16 @@ ostream& operator<<(ostream& out, CInode& in)
       if (in.get_loner() != in.get_wanted_loner())
        out << "(" << in.get_wanted_loner() << ")";
     }
-    
+  }
+  if (!in.get_mds_caps_wanted().empty()) {
+    out << " mcw={";
+    for (map<int,int>::iterator p = in.get_mds_caps_wanted().begin();
+        p != in.get_mds_caps_wanted().end(); ++p) {
+      if (p != in.get_mds_caps_wanted().begin())
+       out << ',';
+      out << p->first << '=' << ccap_string(p->second);
+    }
+    out << '}';
   }
 
   if (in.get_num_ref()) {
index cb3a4d27d804226e5d57524b0d58a066b3897344..db9285f99cc1517a42ae3589501e640232f84055 100644 (file)
@@ -885,6 +885,8 @@ public:
   bool is_any_caps() { return !client_caps.empty(); }
   bool is_any_nonstale_caps() { return count_nonstale_caps(); }
 
+  map<int,int>& get_mds_caps_wanted() { return mds_caps_wanted; }
+
   map<client_t,Capability*>& get_client_caps() { return client_caps; }
   Capability *get_client_cap(client_t client) {
     if (client_caps.count(client))