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);
}
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;
*
* @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)