]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | #include <experimental/iterator> | |
4 | #include <iostream> | |
5 | ||
6 | #include "crimson/os/seastore/transaction_manager.h" | |
7 | #include "crimson/os/seastore/extentmap_manager.h" | |
8 | #include "crimson/os/seastore/extentmap_manager/btree/btree_extentmap_manager.h" | |
9 | namespace crimson::os::seastore::extentmap_manager { | |
10 | ||
20effc67 TL |
11 | ExtentMapManagerRef create_extentmap_manager( |
12 | TransactionManager &trans_manager) { | |
f67539c2 TL |
13 | return ExtentMapManagerRef(new BtreeExtentMapManager(trans_manager)); |
14 | } | |
15 | ||
16 | } | |
17 | ||
18 | namespace crimson::os::seastore { | |
19 | ||
20 | std::ostream &operator<<(std::ostream &out, const extent_mapping_t &rhs) | |
21 | { | |
22 | return out << "extent_mapping_t (" << rhs.logical_offset << "~" << rhs.length | |
23 | << "->" << rhs.laddr << ")"; | |
24 | } | |
25 | ||
26 | std::ostream &operator<<(std::ostream &out, const extent_map_list_t &rhs) | |
27 | { | |
28 | out << '['; | |
29 | std::copy(std::begin(rhs), std::end(rhs), std::experimental::make_ostream_joiner(out, ", ")); | |
30 | return out << ']'; | |
31 | } | |
32 | ||
33 | } |