summaryrefslogtreecommitdiffstats
path: root/src/crimson/os/seastore/backref_mapping.h
blob: d0a6a0ea6fff66cbdf46df328f5441e4325b073a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab

#pragma once

#include "crimson/os/seastore/btree/btree_range_pin.h"

namespace crimson::os::seastore {

class BackrefMapping : public BtreeNodeMapping<paddr_t, laddr_t> {
  extent_types_t type;
public:
  BackrefMapping(op_context_t<paddr_t> ctx)
    : BtreeNodeMapping(ctx) {}
  template <typename... T>
  BackrefMapping(extent_types_t type, T&&... t)
    : BtreeNodeMapping(std::forward<T>(t)...),
      type(type) {}
  extent_types_t get_type() const {
    return type;
  }
};

using BackrefMappingRef = std::unique_ptr<BackrefMapping>;
using backref_pin_list_t = std::list<BackrefMappingRef>;

} // namespace crimson::os::seastore