]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/InoTable.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / mds / InoTable.h
index 5f6a0b385ac7876c16e2d37908c82910cb1f93f9..0e26e1e9872ef828923247be2b46340095f3417b 100644 (file)
@@ -50,12 +50,12 @@ class InoTable : public MDSTable {
   void reset_state() override;
   void encode_state(bufferlist& bl) const override {
     ENCODE_START(2, 2, bl);
-    ::encode(free, bl);
+    encode(free, bl);
     ENCODE_FINISH(bl);
   }
-  void decode_state(bufferlist::iterator& bl) override {
+  void decode_state(bufferlist::const_iterator& bl) override {
     DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
-    ::decode(free, bl);
+    decode(free, bl);
     projected_free = free;
     DECODE_FINISH(bl);
   }
@@ -65,7 +65,7 @@ class InoTable : public MDSTable {
   void encode(bufferlist& bl) const {
     encode_state(bl);
   }
-  void decode(bufferlist::iterator& bl) {
+  void decode(bufferlist::const_iterator& bl) {
     decode_state(bl);
   }
   void dump(Formatter *f) const;
@@ -96,19 +96,7 @@ class InoTable : public MDSTable {
    *
    * @return true if the table was modified
    */
-  bool force_consume_to(inodeno_t ino)
-  {
-    if (free.contains(ino)) {
-      inodeno_t min = free.begin().get_start();
-      std::cerr << "Erasing 0x" << std::hex << min << " to 0x" << ino << std::dec << std::endl;
-      free.erase(min, ino - min + 1);
-      projected_free = free;
-      projected_version = ++version;
-      return true;
-    } else {
-      return false;
-    }
-  }
+  bool force_consume_to(inodeno_t ino);
 };
 WRITE_CLASS_ENCODER(InoTable)