ENCODE_START(8, 7, bl);
{
- uint8_t v = 7;
+ uint8_t v = 8;
if (!HAVE_FEATURE(features, SERVER_LUMINOUS)) {
v = 3;
} else if (!HAVE_FEATURE(features, SERVER_MIMIC)) {
encode(new_removed_snaps, bl);
encode(new_purged_snaps, bl);
}
+ if (v >= 8) {
+ encode(new_last_up_change, bl);
+ encode(new_last_in_change, bl);
+ }
ENCODE_FINISH(bl); // client-usable data
}
return;
}
{
- DECODE_START(7, bl); // client-usable data
+ DECODE_START(8, bl); // client-usable data
decode(fsid, bl);
decode(epoch, bl);
decode(modified, bl);
decode(new_removed_snaps, bl);
decode(new_purged_snaps, bl);
}
+ if (struct_v >= 8) {
+ decode(new_last_up_change, bl);
+ decode(new_last_in_change, bl);
+ }
DECODE_FINISH(bl); // client-usable data
}
f->dump_int("epoch", epoch);
f->dump_stream("fsid") << fsid;
f->dump_stream("modified") << modified;
+ f->dump_stream("new_last_up_change") << new_last_up_change;
+ f->dump_stream("new_last_in_change") << new_last_in_change;
f->dump_int("new_pool_max", new_pool_max);
f->dump_int("new_flags", new_flags);
f->dump_float("new_full_ratio", new_full_ratio);
}
}
+ if (inc.new_last_up_change != utime_t()) {
+ last_up_change = inc.new_last_up_change;
+ }
+ if (inc.new_last_in_change != utime_t()) {
+ last_in_change = inc.new_last_in_change;
+ }
+
for (const auto &pname : inc.new_pool_names) {
auto pool_name_entry = pool_name.find(pname.first);
if (pool_name_entry != pool_name.end()) {
{
// NOTE: any new encoding dependencies must be reflected by
// SIGNIFICANT_FEATURES
- uint8_t v = 8;
+ uint8_t v = 9;
if (!HAVE_FEATURE(features, SERVER_LUMINOUS)) {
v = 3;
} else if (!HAVE_FEATURE(features, SERVER_MIMIC)) {
encode(new_removed_snaps, bl);
encode(new_purged_snaps, bl);
}
+ if (v >= 9) {
+ encode(last_up_change, bl);
+ encode(last_in_change, bl);
+ }
ENCODE_FINISH(bl); // client-usable data
}
* Since we made it past that hurdle, we can use our normal paths.
*/
{
- DECODE_START(8, bl); // client-usable data
+ DECODE_START(9, bl); // client-usable data
// base
decode(fsid, bl);
decode(epoch, bl);
decode(new_removed_snaps, bl);
decode(new_purged_snaps, bl);
}
+ if (struct_v >= 9) {
+ decode(last_up_change, bl);
+ decode(last_in_change, bl);
+ }
DECODE_FINISH(bl); // client-usable data
}
f->dump_stream("fsid") << get_fsid();
f->dump_stream("created") << get_created();
f->dump_stream("modified") << get_modified();
+ f->dump_stream("last_up_change") << last_up_change;
+ f->dump_stream("last_in_change") << last_in_change;
f->dump_string("flags", get_flag_string());
f->dump_unsigned("flags_num", flags);
f->open_array_section("flags_set");
int8_t new_require_min_compat_client = -1;
+ utime_t new_last_up_change, new_last_in_change;
+
mutable bool have_crc; ///< crc values are defined
uint32_t full_crc; ///< crc of the resulting OSDMap
mutable uint32_t inc_crc; ///< crc of this incremental
int32_t max_osd;
vector<uint32_t> osd_state;
+ utime_t last_up_change, last_in_change;
+
// These features affect OSDMap[::Incremental] encoding, or the
// encoding of some type embedded therein (CrushWrapper, something
// from osd_types, etc.).