]> git.proxmox.com Git - ceph.git/blame - ceph/src/common/FixedCDC.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / common / FixedCDC.h
CommitLineData
f67539c2
TL
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3
4#pragma once
5
6#include "CDC.h"
7
8class FixedCDC : public CDC {
9private:
10 size_t chunk_size;
11
12public:
13 FixedCDC(int target = 18, int window_bits = 0) {
14 set_target_bits(target, window_bits);
15 };
16
17 void set_target_bits(int target, int window_bits) override {
18 chunk_size = 1ul << target;
19 }
20 void calc_chunks(
21 const bufferlist& bl,
22 std::vector<std::pair<uint64_t, uint64_t>> *chunks) const override;
23};