Skip to content

Commit 352d1a4

Browse files
authored
Merge pull request ceph#62079 from myoungwon/seastore-omap-log-cleanup
crimson/os/seastore: cleanups related to managing omap and log tree Reviewed-by: Yingxin Cheng <[email protected]>
2 parents 9b38df4 + 5bcccab commit 352d1a4

File tree

5 files changed

+687
-688
lines changed

5 files changed

+687
-688
lines changed

src/crimson/os/seastore/omap_manager/btree/btree_omap_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BtreeOMapManager : public OMapManager {
2727

2828
omap_context_t get_omap_context(
2929
Transaction &t, const omap_root_t &omap_root) {
30-
ceph_assert(omap_root.type < omap_type_t::NUM_TYPES);
30+
ceph_assert(omap_root.type < omap_type_t::NONE);
3131
return omap_context_t{tm, t, omap_root.hint, omap_root.type};
3232
}
3333

src/crimson/os/seastore/onode.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct onode_layout_t {
4949
} else if (type == omap_type_t::OMAP) {
5050
return omap_root;
5151
} else {
52-
ceph_assert(type == omap_type_t::LOG);
52+
assert(type == omap_type_t::LOG);
5353
return log_root;
5454
}
5555
}
@@ -105,6 +105,9 @@ class Onode : public boost::intrusive_ref_counter<
105105
laddr_t get_data_hint() const {
106106
return get_hint();
107107
}
108+
const omap_root_le_t& get_root(omap_type_t type) const {
109+
return get_layout().get_root(type);
110+
}
108111
friend std::ostream& operator<<(std::ostream &out, const Onode &rhs);
109112
};
110113

0 commit comments

Comments
 (0)