Skip to content

Commit f315805

Browse files
zhscnMatan-B
authored andcommitted
crimson/os/seastore/btree: remove the unused template argument of op_context_t
Signed-off-by: Zhang Song <[email protected]> (cherry picked from commit 796b1ec)
1 parent 477fb14 commit f315805

File tree

12 files changed

+78
-83
lines changed

12 files changed

+78
-83
lines changed

src/crimson/os/seastore/backref/btree_backref_manager.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ phy_tree_root_t& get_phy_tree_root<
2222
template<>
2323
const get_phy_tree_root_node_ret get_phy_tree_root_node<
2424
crimson::os::seastore::backref::BackrefBtree>(
25-
const RootBlockRef &root_block, op_context_t<paddr_t> c) {
25+
const RootBlockRef &root_block, op_context_t c) {
2626
auto backref_root = root_block->backref_root_node;
2727
if (backref_root) {
2828
ceph_assert(backref_root->is_initial_pending()
@@ -455,7 +455,7 @@ BtreeBackrefManager::scan_mapped_space(
455455
}
456456

457457
BtreeBackrefManager::base_iertr::future<> _init_cached_extent(
458-
op_context_t<paddr_t> c,
458+
op_context_t c,
459459
const CachedExtentRef &e,
460460
BackrefBtree &btree,
461461
bool &ret)

src/crimson/os/seastore/backref/btree_backref_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ namespace crimson::os::seastore::backref {
1111

1212
class BtreeBackrefMapping : public BackrefMapping {
1313
public:
14-
BtreeBackrefMapping(op_context_t<paddr_t> ctx)
14+
BtreeBackrefMapping(op_context_t ctx)
1515
: BackrefMapping(ctx) {}
1616
BtreeBackrefMapping(
17-
op_context_t<paddr_t> ctx,
17+
op_context_t ctx,
1818
BackrefLeafNodeRef parent,
1919
uint16_t pos,
2020
backref_map_val_t &val,
@@ -101,8 +101,8 @@ class BtreeBackrefManager : public BackrefManager {
101101
private:
102102
Cache &cache;
103103

104-
op_context_t<paddr_t> get_context(Transaction &t) {
105-
return op_context_t<paddr_t>{cache, t};
104+
op_context_t get_context(Transaction &t) {
105+
return op_context_t{cache, t};
106106
}
107107
};
108108

src/crimson/os/seastore/backref_mapping.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace crimson::os::seastore {
1010
class BackrefMapping : public BtreeNodeMapping<paddr_t, laddr_t> {
1111
extent_types_t type;
1212
public:
13-
BackrefMapping(op_context_t<paddr_t> ctx)
13+
BackrefMapping(op_context_t ctx)
1414
: BtreeNodeMapping(ctx) {}
1515
template <typename... T>
1616
BackrefMapping(extent_types_t type, T&&... t)

src/crimson/os/seastore/btree/btree_range_pin.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
namespace crimson::os::seastore {
1515
class Cache;
1616

17-
template <typename node_key_t>
1817
struct op_context_t {
1918
Cache &cache;
2019
Transaction &trans;
@@ -104,7 +103,7 @@ struct __attribute__((packed)) fixed_kv_node_meta_le_t {
104103
template <typename key_t, typename val_t>
105104
class BtreeNodeMapping : public PhysicalNodeMapping<key_t, val_t> {
106105
protected:
107-
op_context_t<key_t> ctx;
106+
op_context_t ctx;
108107
/**
109108
* parent
110109
*
@@ -123,10 +122,10 @@ class BtreeNodeMapping : public PhysicalNodeMapping<key_t, val_t> {
123122

124123
public:
125124
using val_type = val_t;
126-
BtreeNodeMapping(op_context_t<key_t> ctx) : ctx(ctx) {}
125+
BtreeNodeMapping(op_context_t ctx) : ctx(ctx) {}
127126

128127
BtreeNodeMapping(
129-
op_context_t<key_t> ctx,
128+
op_context_t ctx,
130129
CachedExtentRef parent,
131130
uint16_t pos,
132131
pladdr_t value,

0 commit comments

Comments
 (0)