laddr_t get_data_hint() const {
return get_hint();
}
- omap_root_t get_root(omap_type_t type, extent_len_t block_size) const {
- return get_layout().get_root(type).get(
- get_metadata_hint(block_size));
+ const omap_root_le_t& get_root(omap_type_t type) const {
+ return get_layout().get_root(type);
}
friend std::ostream& operator<<(std::ostream &out, const Onode &rhs);
};
{
auto olayout = onode->get_layout();
uint32_t size = olayout.size;
- auto omap_root = get_omap_root(omap_type_t::OMAP, *onode);
- auto xattr_root = get_omap_root(omap_type_t::XATTR, *onode);
- auto log_root = get_omap_root(omap_type_t::LOG, *onode);
+ auto omap_root = rename_omap_root(omap_type_t::OMAP, *onode, *d_onode);
+ auto xattr_root = rename_omap_root(omap_type_t::XATTR, *onode, *d_onode);
+ auto log_root = rename_omap_root(omap_type_t::LOG, *onode, *d_onode);
auto object_data = olayout.object_data.get();
auto oi_bl = ceph::bufferlist::static_from_mem(
&olayout.oi[0],
*/
omap_root_t get_omap_root(omap_type_t type, Onode& onode) const {
- return onode.get_root(type, device->get_block_size());
+ return onode.get_root(type).get(
+ onode.get_metadata_hint(device->get_block_size()));
+ }
+
+ omap_root_t rename_omap_root(
+ omap_type_t type,
+ Onode& onode,
+ Onode& d_onode) const {
+ return onode.get_root(type).get(
+ d_onode.get_metadata_hint(device->get_block_size()));
}
omaptree_get_value_ret omaptree_get_value(