void adjust_addrs_from_base(paddr_t base) {
lba_root.adjust_addrs_from_base(base);
}
+
+ meta_t get_meta() {
+ bufferlist bl;
+ bl.append(ceph::buffer::create_static(MAX_META_LENGTH, meta));
+ meta_t ret;
+ auto iter = bl.cbegin();
+ decode(ret, iter);
+ return ret;
+ }
+
+ void set_meta(const meta_t &m) {
+ ceph::bufferlist bl;
+ encode(m, bl);
+ ceph_assert(bl.length() < MAX_META_LENGTH);
+ bl.rebuild();
+ auto &bptr = bl.front();
+ ::memset(meta, 0, MAX_META_LENGTH);
+ ::memcpy(meta, bptr.c_str(), bl.length());
+ }
};
+ using blk_id_t = uint64_t;
+ constexpr blk_id_t NULL_BLK_ID =
+ std::numeric_limits<blk_id_t>::max();
+
+ // use absolute address
+ using blk_paddr_t = uint64_t;
+ struct rbm_alloc_delta_t {
+ enum class op_types_t : uint8_t {
+ SET = 1,
+ CLEAR = 2
+ };
+ extent_types_t type;
+ interval_set<blk_id_t> alloc_blk_ids;
+ op_types_t op;
+ };
+
}
WRITE_CLASS_DENC_BOUNDED(crimson::os::seastore::seastore_meta_t)