]>
git.proxmox.com Git - ceph.git/blob - ceph/src/crimson/os/seastore/omap_manager.cc
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>
6 #include "crimson/os/seastore/transaction_manager.h"
7 #include "crimson/os/seastore/omap_manager.h"
8 #include "crimson/os/seastore/omap_manager/btree/btree_omap_manager.h"
10 namespace crimson::os::seastore::omap_manager
{
12 OMapManagerRef
create_omap_manager(TransactionManager
&trans_manager
) {
13 return OMapManagerRef(new BtreeOMapManager(trans_manager
));
19 std::ostream
&operator<<(std::ostream
&out
, const std::pair
<std::string
, std::string
> &rhs
)
21 return out
<< "key_value_map (" << rhs
.first
<< "->" << rhs
.second
<< ")";
25 namespace crimson::os::seastore
{
27 std::ostream
&operator<<(std::ostream
&out
, const std::list
<std::string
> &rhs
)
30 std::copy(std::begin(rhs
), std::end(rhs
), std::experimental::make_ostream_joiner(out
, ", "));
34 std::ostream
&operator<<(std::ostream
&out
, const std::vector
<std::pair
<std::string
, std::string
>> &rhs
)
37 std::ostream_iterator
<std::pair
<std::string
, std::string
>> out_it(out
, ", ");
38 std::copy(rhs
.begin(), rhs
.end(), out_it
);