blob: e601c84ee688717599a0dd0a17406babf88ae88d (
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
|
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#pragma once
/* This feature set defines a set of features supported by OSDs once a PG has
* gone active.
* Mechanically, pretty much the same as include/ceph_features.h */
using pg_feature_vec_t = uint64_t;
static constexpr pg_feature_vec_t PG_FEATURE_INCARNATION_1 = 0ull;
#define DEFINE_PG_FEATURE(bit, incarnation, name) \
static constexpr pg_feature_vec_t PG_FEATURE_##name = (1ull << bit); \
static constexpr pg_feature_vec_t PG_FEATUREMASK_##name = \
(1ull << bit) | PG_FEATURE_INCARNATION_##incarnation;
#define PG_HAVE_FEATURE(x, name) \
(((x) & (PG_FEATUREMASK_##name)) == (PG_FEATUREMASK_##name))
DEFINE_PG_FEATURE(0, 1, PCT)
static constexpr pg_feature_vec_t PG_FEATURE_NONE = 0ull;
static constexpr pg_feature_vec_t PG_FEATURE_CRIMSON_ALL = 0ull;
static constexpr pg_feature_vec_t PG_FEATURE_CLASSIC_ALL =
PG_FEATURE_PCT;
|