1
2 #ifndef __CEPH_FEATURES
3 #define __CEPH_FEATURES
4
5
6
7
8
9
10 #define CEPH_FEATURE_INCARNATION_1 (0ull)
11 #define CEPH_FEATURE_INCARNATION_2 (1ull<<57)
12
13 #define DEFINE_CEPH_FEATURE(bit, incarnation, name) \
14 static const uint64_t CEPH_FEATURE_##name = (1ULL<<bit); \
15 static const uint64_t CEPH_FEATUREMASK_##name = \
16 (1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation);
17
18
19 #define DEFINE_CEPH_FEATURE_DEPRECATED(bit, incarnation, name, when) \
20 static const uint64_t DEPRECATED_CEPH_FEATURE_##name = (1ULL<<bit); \
21 static const uint64_t DEPRECATED_CEPH_FEATUREMASK_##name = \
22 (1ULL<<bit | CEPH_FEATURE_INCARNATION_##incarnation);
23
24
25
26
27
28 #define DEFINE_CEPH_FEATURE_RETIRED(bit, inc, name, unused, unadvertised)
29
30
31
32
33
34
35
36
37 #define CEPH_HAVE_FEATURE(x, name) \
38 (((x) & (CEPH_FEATUREMASK_##name)) == (CEPH_FEATUREMASK_##name))
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75 DEFINE_CEPH_FEATURE( 0, 1, UID)
76 DEFINE_CEPH_FEATURE( 1, 1, NOSRCADDR)
77 DEFINE_CEPH_FEATURE_RETIRED( 2, 1, MONCLOCKCHECK, JEWEL, LUMINOUS)
78
79 DEFINE_CEPH_FEATURE( 3, 1, FLOCK)
80 DEFINE_CEPH_FEATURE( 4, 1, SUBSCRIBE2)
81 DEFINE_CEPH_FEATURE( 5, 1, MONNAMES)
82 DEFINE_CEPH_FEATURE( 6, 1, RECONNECT_SEQ)
83 DEFINE_CEPH_FEATURE( 7, 1, DIRLAYOUTHASH)
84 DEFINE_CEPH_FEATURE( 8, 1, OBJECTLOCATOR)
85 DEFINE_CEPH_FEATURE( 9, 1, PGID64)
86 DEFINE_CEPH_FEATURE(10, 1, INCSUBOSDMAP)
87 DEFINE_CEPH_FEATURE(11, 1, PGPOOL3)
88 DEFINE_CEPH_FEATURE(12, 1, OSDREPLYMUX)
89 DEFINE_CEPH_FEATURE(13, 1, OSDENC)
90 DEFINE_CEPH_FEATURE_RETIRED(14, 1, OMAP, HAMMER, JEWEL)
91 DEFINE_CEPH_FEATURE(14, 2, SERVER_KRAKEN)
92 DEFINE_CEPH_FEATURE(15, 1, MONENC)
93 DEFINE_CEPH_FEATURE_RETIRED(16, 1, QUERY_T, JEWEL, LUMINOUS)
94
95 DEFINE_CEPH_FEATURE_RETIRED(17, 1, INDEP_PG_MAP, JEWEL, LUMINOUS)
96
97 DEFINE_CEPH_FEATURE(18, 1, CRUSH_TUNABLES)
98 DEFINE_CEPH_FEATURE_RETIRED(19, 1, CHUNKY_SCRUB, JEWEL, LUMINOUS)
99
100 DEFINE_CEPH_FEATURE_RETIRED(20, 1, MON_NULLROUTE, JEWEL, LUMINOUS)
101
102 DEFINE_CEPH_FEATURE_RETIRED(21, 1, MON_GV, HAMMER, JEWEL)
103 DEFINE_CEPH_FEATURE(21, 2, SERVER_LUMINOUS)
104 DEFINE_CEPH_FEATURE(21, 2, RESEND_ON_SPLIT)
105 DEFINE_CEPH_FEATURE(21, 2, RADOS_BACKOFF)
106 DEFINE_CEPH_FEATURE(21, 2, OSDMAP_PG_UPMAP)
107 DEFINE_CEPH_FEATURE(21, 2, CRUSH_CHOOSE_ARGS)
108 DEFINE_CEPH_FEATURE_RETIRED(22, 1, BACKFILL_RESERVATION, JEWEL, LUMINOUS)
109
110 DEFINE_CEPH_FEATURE(23, 1, MSG_AUTH)
111 DEFINE_CEPH_FEATURE_RETIRED(24, 1, RECOVERY_RESERVATION, JEWEL, LUNINOUS)
112
113 DEFINE_CEPH_FEATURE(25, 1, CRUSH_TUNABLES2)
114 DEFINE_CEPH_FEATURE(26, 1, CREATEPOOLID)
115 DEFINE_CEPH_FEATURE(27, 1, REPLY_CREATE_INODE)
116 DEFINE_CEPH_FEATURE_RETIRED(28, 1, OSD_HBMSGS, HAMMER, JEWEL)
117 DEFINE_CEPH_FEATURE(28, 2, SERVER_M)
118 DEFINE_CEPH_FEATURE(29, 1, MDSENC)
119 DEFINE_CEPH_FEATURE(30, 1, OSDHASHPSPOOL)
120 DEFINE_CEPH_FEATURE(31, 1, MON_SINGLE_PAXOS)
121 DEFINE_CEPH_FEATURE_RETIRED(32, 1, OSD_SNAPMAPPER, JEWEL, LUMINOUS)
122
123 DEFINE_CEPH_FEATURE_RETIRED(33, 1, MON_SCRUB, JEWEL, LUMINOUS)
124
125 DEFINE_CEPH_FEATURE_RETIRED(34, 1, OSD_PACKED_RECOVERY, JEWEL, LUMINOUS)
126
127 DEFINE_CEPH_FEATURE(35, 1, OSD_CACHEPOOL)
128 DEFINE_CEPH_FEATURE(36, 1, CRUSH_V2)
129 DEFINE_CEPH_FEATURE(37, 1, EXPORT_PEER)
130 DEFINE_CEPH_FEATURE(38, 1, OSD_ERASURE_CODES)
131 DEFINE_CEPH_FEATURE(38, 1, OSD_OSD_TMAP2OMAP)
132 DEFINE_CEPH_FEATURE(39, 1, OSDMAP_ENC)
133 DEFINE_CEPH_FEATURE(40, 1, MDS_INLINE_DATA)
134 DEFINE_CEPH_FEATURE(41, 1, CRUSH_TUNABLES3)
135 DEFINE_CEPH_FEATURE(41, 1, OSD_PRIMARY_AFFINITY)
136 DEFINE_CEPH_FEATURE(42, 1, MSGR_KEEPALIVE2)
137 DEFINE_CEPH_FEATURE(43, 1, OSD_POOLRESEND)
138 DEFINE_CEPH_FEATURE(44, 1, ERASURE_CODE_PLUGINS_V2)
139 DEFINE_CEPH_FEATURE_RETIRED(45, 1, OSD_SET_ALLOC_HINT, JEWEL, LUMINOUS)
140
141 DEFINE_CEPH_FEATURE(46, 1, OSD_FADVISE_FLAGS)
142 DEFINE_CEPH_FEATURE_RETIRED(46, 1, OSD_REPOP, JEWEL, LUMINOUS)
143 DEFINE_CEPH_FEATURE_RETIRED(46, 1, OSD_OBJECT_DIGEST, JEWEL, LUMINOUS)
144 DEFINE_CEPH_FEATURE_RETIRED(46, 1, OSD_TRANSACTION_MAY_LAYOUT, JEWEL, LUMINOUS)
145
146 DEFINE_CEPH_FEATURE(47, 1, MDS_QUOTA)
147 DEFINE_CEPH_FEATURE(48, 1, CRUSH_V4)
148 DEFINE_CEPH_FEATURE_RETIRED(49, 1, OSD_MIN_SIZE_RECOVERY, JEWEL, LUMINOUS)
149 DEFINE_CEPH_FEATURE_RETIRED(49, 1, OSD_PROXY_FEATURES, JEWEL, LUMINOUS)
150
151 DEFINE_CEPH_FEATURE(50, 1, MON_METADATA)
152 DEFINE_CEPH_FEATURE(51, 1, OSD_BITWISE_HOBJ_SORT)
153 DEFINE_CEPH_FEATURE(52, 1, OSD_PROXY_WRITE_FEATURES)
154 DEFINE_CEPH_FEATURE(53, 1, ERASURE_CODE_PLUGINS_V3)
155 DEFINE_CEPH_FEATURE(54, 1, OSD_HITSET_GMT)
156 DEFINE_CEPH_FEATURE(55, 1, HAMMER_0_94_4)
157 DEFINE_CEPH_FEATURE(56, 1, NEW_OSDOP_ENCODING)
158 DEFINE_CEPH_FEATURE(57, 1, MON_STATEFUL_SUB)
159 DEFINE_CEPH_FEATURE(57, 1, MON_ROUTE_OSDMAP)
160 DEFINE_CEPH_FEATURE(57, 1, OSDSUBOP_NO_SNAPCONTEXT)
161 DEFINE_CEPH_FEATURE(57, 1, SERVER_JEWEL)
162 DEFINE_CEPH_FEATURE(58, 1, CRUSH_TUNABLES5)
163 DEFINE_CEPH_FEATURE(58, 1, NEW_OSDOPREPLY_ENCODING)
164 DEFINE_CEPH_FEATURE(58, 1, FS_FILE_LAYOUT_V2)
165 DEFINE_CEPH_FEATURE(59, 1, FS_BTIME)
166 DEFINE_CEPH_FEATURE(59, 1, FS_CHANGE_ATTR)
167 DEFINE_CEPH_FEATURE(59, 1, MSG_ADDR2)
168 DEFINE_CEPH_FEATURE(60, 1, OSD_RECOVERY_DELETES)
169 DEFINE_CEPH_FEATURE(61, 1, CEPHX_V2)
170
171 DEFINE_CEPH_FEATURE(62, 1, RESERVED)
172 DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS)
173
174
175
176
177
178 #define CEPH_FEATURES_SUPPORTED_DEFAULT \
179 (CEPH_FEATURE_NOSRCADDR | \
180 CEPH_FEATURE_FLOCK | \
181 CEPH_FEATURE_SUBSCRIBE2 | \
182 CEPH_FEATURE_RECONNECT_SEQ | \
183 CEPH_FEATURE_DIRLAYOUTHASH | \
184 CEPH_FEATURE_PGID64 | \
185 CEPH_FEATURE_PGPOOL3 | \
186 CEPH_FEATURE_OSDENC | \
187 CEPH_FEATURE_CRUSH_TUNABLES | \
188 CEPH_FEATURE_SERVER_LUMINOUS | \
189 CEPH_FEATURE_RESEND_ON_SPLIT | \
190 CEPH_FEATURE_RADOS_BACKOFF | \
191 CEPH_FEATURE_OSDMAP_PG_UPMAP | \
192 CEPH_FEATURE_CRUSH_CHOOSE_ARGS | \
193 CEPH_FEATURE_MSG_AUTH | \
194 CEPH_FEATURE_CRUSH_TUNABLES2 | \
195 CEPH_FEATURE_REPLY_CREATE_INODE | \
196 CEPH_FEATURE_MDSENC | \
197 CEPH_FEATURE_OSDHASHPSPOOL | \
198 CEPH_FEATURE_OSD_CACHEPOOL | \
199 CEPH_FEATURE_CRUSH_V2 | \
200 CEPH_FEATURE_EXPORT_PEER | \
201 CEPH_FEATURE_OSDMAP_ENC | \
202 CEPH_FEATURE_MDS_INLINE_DATA | \
203 CEPH_FEATURE_CRUSH_TUNABLES3 | \
204 CEPH_FEATURE_OSD_PRIMARY_AFFINITY | \
205 CEPH_FEATURE_MSGR_KEEPALIVE2 | \
206 CEPH_FEATURE_OSD_POOLRESEND | \
207 CEPH_FEATURE_MDS_QUOTA | \
208 CEPH_FEATURE_CRUSH_V4 | \
209 CEPH_FEATURE_NEW_OSDOP_ENCODING | \
210 CEPH_FEATURE_SERVER_JEWEL | \
211 CEPH_FEATURE_MON_STATEFUL_SUB | \
212 CEPH_FEATURE_CRUSH_TUNABLES5 | \
213 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \
214 CEPH_FEATURE_MSG_ADDR2 | \
215 CEPH_FEATURE_CEPHX_V2)
216
217 #define CEPH_FEATURES_REQUIRED_DEFAULT 0
218
219 #endif